java - (Android) Check if EditText is empty? -
java - (Android) Check if EditText is empty? -
this question has reply here:
check if edittext empty. 24 answershow check if edittext empty? want create if edittext blank, textview value " " (space). if it's not, resume normal. how go doing this? help!
to check edittext empty ,where myedittext edittext
if(myedittext.gettext().tostring().trim().length() == 0) or utilize below function
private boolean isempty(edittext myedittext) { homecoming myedittext.gettext().tostring().trim().length() == 0; } if function homecoming false means edittext not empty , homecoming true means edittext empty
for more info see best link check if edittext empty.
java android android-studio
Comments
Post a Comment