Android examples for User Interface:TextView
is TextView Empty
//package com.java2s; import android.text.TextUtils; import android.widget.TextView; public class Main { public static boolean isTextViewEmpty(TextView tv) { if (tv == null) { throw new NullPointerException("TextView can not be null."); }/*from w w w .ja v a 2 s . co m*/ if (tv.getText() != null && TextUtils.isEmpty(tv.getText().toString())) { return true; } return false; } }