Android examples for User Interface:TextView
set Text Or Hide TextView
import android.view.View; import android.widget.TextView; public class Main{ public static void setTextOrHide(TextView pView, CharSequence pText) { if (StringHelper.isEmpty(pText)) { pView.setVisibility(View.GONE); } else {//from w w w . j a v a 2 s . c o m pView.setText(pText); pView.setVisibility(View.VISIBLE); } } }