java - (Android) Check if EditText is empty? -



java - (Android) Check if EditText is empty? -

this question has reply here:

check if edittext empty. 24 answers

how 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

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -