views:

33

answers:

1

Hi guys,

I am trying to create 2 different spinners in my main layout.

This is how it works. Let's say the 1st spinner shows the different continents (e.g. America, Asia, Europe, etc.). Assume a user chooses Asia in the 1st spinner.

My question is, how to make 2nd spinner to communicate with the 1st spinner? Meaning, the 2nd spinner is suppose to display the countries inside Asia (e.g. China, Korea, Singapore, etc.) due to Asia was chosen in the 1st spinner.

Thank you guys in advance. Sorry that I am a newbie in Android Java.

A: 

Umh, why don't you do it the other way around? You detect that an item has been selected in spinner 1 and in that listener you change spinner 2?

Jack
Well, I understand what you just said. However, I do not think I can code it because of I have limited knowledge on Java.
Sammm
Do you by any chance know any website tutorial or something that can teach me about this listener thing? Thank you
Sammm
http://www.dcpagesapps.com/developer-resources/android/23-android-spinner-tips nd the google developer site is usefull.
Jack