Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Custom picker dialog

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.

enter image description here

I have read these articles: (1) (2)

like image 875
gkiko Avatar asked Jun 10 '13 08:06

gkiko


1 Answers

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.

like image 101
YannPl Avatar answered Oct 13 '22 03:10

YannPl