check User Text Emptiness - Android User Interface

Android examples for User Interface:EditText

Description

check User Text Emptiness

Demo Code


//package com.java2s;
import android.widget.EditText;

public class Main {
    public static boolean checkUserTextEmptiness(EditText editText) {
        if (editText.getText() == null
                || editText.getText().toString().isEmpty()) {
            return true;
        }//from w w w  . jav a 2 s .c om
        return false;
    }
}

Related Tutorials