Here you can find the source of checkEditText(EditText editText)
public static String checkEditText(EditText editText)
//package com.java2s; import android.widget.EditText; public class Main { public static String checkEditText(EditText editText) { if (editText != null && editText.getText() != null && !(editText.getText().toString().trim().equals(""))) { return editText.getText().toString().trim(); } else {//from ww w. j a v a 2s. c om return ""; } } }