Java tutorial
//package com.java2s; import android.widget.TextView; public class Main { static public boolean isNullOrEmpty(CharSequence cs) { return cs == null || cs.toString().equals(""); } static public boolean isNullOrEmpty(TextView tv) { return isNullOrEmpty(tv.getText()); } }