Im new to android. i have tried to built an application which has 2 spinner…
i have few doubts to clear before going deep to my application..
please give brief answer to my question…
- is it possible to have 2 spinners in one view?
- can i add
setOnItemSelectedListener(this)for both? - if yes, how could i know which option is selected on both the spinners? like
spinner.getSelectedItemPosition();on both the spinners?
waiting for ur valuable replies. reference materials are also appreciable
Yes, you can have multiple spinner’s that can be managed by single listener or you can have seperate Listener for each.
For Single Listener you can do something like this,
Set the Listener
Then you can use
onItemSelectedto get perform the action related to the spinner’s.