After
I created a spinner in my main.xml:
and the value in strings.xml:
I can display it normally, but in reality there is a conversation that I think is a need to open a new activity for onClick example on an item ... So if I click an item on position 2 then I should go to the activity one
. Is it possible?
I tried to make a toast when I click on an item but rather works?
public void onItemSelected (AdapterView & lt; & gt; parent, views, int position, long id) {Toast.makeText (parent.getContext (), "OnItemSelectedListener:" + parent .getItemAtPosition (POS) .toString (), Toast.LENGTH_SHORT) .show (); // The change activity} @ have not been selected (adapter sequence & lt ;? & Gt; arg0) Override public void on {/ TODO Auto-generated method stub}
How can i do
This is a call in his coach after his setContentView:
< Code> Spinner Spinner = (Spinner) Find VVBID (RID Spinner 1); SpinnerksetOnItemSelectedListener (New Onitmsclit Listnr) {@Override public items selected to zero (Adaptrwu & lt ;? & Gt; parents, views, integer, long id) {toast. Mektekst (mother Pitaktagentekst), "on Items Cynkrtaः" + + parent.getItemAtPosition (Pos) .toString (), toast.LENGTH_SHORT) .show (); // change change activity} @Nothing selected override public zero (adapterview
Comments
Post a Comment