1

How to make the up down list of the preference dialog below? Is it a ListPreference? How to populate the arrays.xml with a range of integer?

enter image description here

Ming Leung
  • 385
  • 2
  • 13
  • 1
    it is a [NumberPicker](https://developer.android.com/reference/android/widget/NumberPicker.html). [This Link](https://shanetully.com/2011/12/android-3-x-and-4-x-numberpicker-example/) may be helpful. – Simon Schnell Dec 12 '16 at 14:07
  • Is some of us is answers solved your problem? @Ming Leung – Eren Utku Dec 13 '16 at 06:29

2 Answers2

1

That appears to be a custom DialogPreference, using a NumberPicker as its content.

See:

for various implementations.

Community
  • 1
  • 1
CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
1

You need custom dialog for this action. Create a layout for your custom dialog and you use NumberPicker class for that. You can check here: https://stackoverflow.com/a/17944205/4376058

Community
  • 1
  • 1
Eren Utku
  • 1,731
  • 1
  • 18
  • 27