Android examples for User Interface:TextView Value
set String to TextView
/*/*from w w w . j a v a2s . co m*/ * * * * Copyright 2012 fenbi.com. All rights reserved. * * FENBI.COM PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * */ //package com.java2s; import android.view.View; import android.widget.TextView; public class Main { public static TextView setTextView(View parent, int id, CharSequence string) { TextView t = (TextView) parent.findViewById(id); if (t != null) { t.setText(string); } return t; } }