0

So I'm using a TimePickerDialog in my app but it defaults to the clock style which I do not want to use. I want to use the spinner style.

If you look here: https://developer.android.com/reference/android/R.styleable.html#TimePicker_timePickerMode

It seems like this should be something I can easily change by setting the value of TimePicker_timePickerMode to 1 but I do not know how to do that. How can I change the value of this variable?

I've been Googling hard and haven't been able to find any information about the R.styleable class. The documentation only lists a bunch of constants with no other information. Is there any better documentation that explains how this class works or how to use it?

Aidan Rosswood
  • 1,212
  • 1
  • 10
  • 21
  • there are 2 method to add [timePickerMode](http://stackoverflow.com/questions/24449723/is-it-possible-to-change-the-style-of-an-android-l-timepickerdialog) – niju Feb 09 '17 at 20:12

1 Answers1

0

You can override it in layout .xml file:

<TimePicker
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:timePickerMode="spinner">

</TimePicker>
arkus
  • 405
  • 3
  • 11