I have two spinners. Country and City. I want to dynamically change the City's values upon Country selection. I know how to create and initialize the values of Country but don't know how to set and change the City's values.
Any guidance is appreciated.
UPDATES1 The problem is, I don't have idea on how to update the content of City Spinner. I know listener and other basics on how to create a fixed spinner.
For the second spinner, use an Adapter over a List<String>
(or whatever your City representation is). After changing the contents of the list, call notifyDataSetChanged
on the adapter, and that will do.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With