Reputation: 2289
I'm new to Android. I have a default spinner in my app. I want to change the design of the spinner. When the spinner is clicked, picker dialog should appear on the screen, displaying scrollable list. I don't know how to implement the code to meet my requirements.
I have read these articles: (1) (2)
Upvotes: 8
Views: 22984
Reputation: 1322
You should take a look to the official guide for Dialogs usage in Android: http://developer.android.com/guide/topics/ui/dialogs.html
And more specifically for pickers : http://developer.android.com/guide/topics/ui/controls/pickers.html
For a number picker if your target is > to API 11: you can use the existing Android widget NumberPicker
-> http://developer.android.com/reference/android/widget/NumberPicker.html
Use this widget in a custom dialog box and it's done.
Upvotes: 4