Hello, I am trying to add two spinners on a page with a submit button for an episode guide like program. I am trying to make it so the first spinner "seasons" controls the second spinner "episodes" (As there if different # of episodes each season) So far I have the two spinners using the following code:
public class Season extends Activity implements OnClickListener { public void onClick(View v) { switch (v.getId()) { } } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.arrays); Spinner s = (Spinner) findViewById(R.id.spinner); ArrayAdapter adapter = ArrayAdapter.createFromResource( this, R.array.seasons, android.R.layout.simple_spinner_item); adapter.setDropDownViewResource (android.R.layout.simple_spinner_dropdown_item); s.setAdapter(adapter); Spinner s1 = (Spinner) findViewById(R.id.Spinner01); ArrayAdapter adapter2 = ArrayAdapter.createFromResource( this, R.array.episodes, android.R.layout.simple_spinner_item); adapter2.setDropDownViewResource (android.R.layout.simple_spinner_dropdown_item); s1.setAdapter(adapter2); } I was wondering how you would do that, and also how when you submit it takes the season and episode and opens the right class. Thanks --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---