drop down menu - Android Spinner click away from dropdown -



drop down menu - Android Spinner click away from dropdown -

if user clicks on spinner, dropdown menu items show up, , onitemselected listener activated if 1 of items selected, however, how can detect, if user clicks away dropdown menu?

thanks

i think can utilize onnothingselected method that,

public class spinneractivity extends activity implements onitemselectedlistener { ... public void onnothingselected(adapterview<?> parent) { // add together code here } }

according doc

onnothingselected callback method invoked when selection disappears view. selection can disappear instance when touch activated or when adapter becomes empty.

if spinner disappear other reason except selecting item onnothingselected called. it's name tells needed find out when nil selected.

android drop-down-menu spinner android-spinner

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 -