Android Spinner to give text answer displayed -


i have spinner giving same result spinner selection. example if selected word "blue" spinner drop down word "blue" displayed in text box below spinner.

how go displaying different text result spinner selection name. example, if select "blue" spinner different paragraph of text shown below in text box, corresponds selection?

any appreciated new this.

you need set listener on spinner. here example:

myspinner.setonitemselectedlistener(new onitemselectedlistener() {         public void onitemselected(adapterview<?> arg0, view arg1, int arg2, long arg3) {             string s = (string) myspinner.getselecteditem();             if (s.equals("blue")){                  mytextview.settext("giant paragraph");             }//else ifs , on...         }         public void onnothingselected(adapterview<?> arg0) {}     }); 

Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -