Java tutorial
//package com.java2s; import android.text.TextUtils; import android.widget.EditText; public class Main { public static boolean chechField(String string) { return TextUtils.isEmpty(string); } public static boolean chechField(EditText editText) { return TextUtils.isEmpty(editText.getText().toString().trim()); } }