android - how to stop a spinner from automatically selecting an option? -
i have spinner in app im doing, , when goes onitemselcted automatically selects first option, how stop in simple way?
spinner2.setonitemselectedlistener(new onitemselectedlistener(){ @override public void onitemselected(adapterview<?> parent, view view, int pos, long id) {
you can use boolean variable check if first time, not execute code. execute code second time, otherwise default behavior.
Comments
Post a Comment