Android examples for User Interface:TextView Value
Create TextView and Set text to TextView
//package com.java2s; import android.content.Context; import android.util.TypedValue; import android.widget.TextView; public class Main { public static TextView text(Context context, String value, int spSize) { TextView textView = new TextView(context); textView.setText(value);// w w w . j a v a2s .c o m textView.setTextSize(TypedValue.COMPLEX_UNIT_SP, spSize); return textView; } }