Android examples for User Interface:TextView Value
set View Text
//package com.java2s; import android.app.Activity; import android.view.View; import android.widget.TextView; public class Main { public static void setText(Activity activity, int textViewId, String text) {/*from w ww. j a va 2 s . c o m*/ ((TextView) activity.findViewById(textViewId)).setText(text); } public static void setText(View itemView, int textViewId, String text) { ((TextView) itemView.findViewById(textViewId)).setText(text); } }