Android examples for User Interface:TextView
populate TextView by message
//package com.java2s; import android.view.View; import android.widget.TextView; public class Main { public static boolean populateTextView(View root, int id, String message) { return populateTextView(root.findViewById(id), message); }// w w w. j a v a 2s.c om public static boolean populateTextView(View view, String message) { if (view != null && view instanceof TextView) { return populateTextView((TextView) view, message); } return false; } public static boolean populateTextView(TextView textView, String message) { if (textView != null) { textView.setText(message); return true; } return false; } }