问题
Is there a way to hide these numbers? Im guessing there must be an attribute which once set to 'false' should to it.
Also, i've tried to use custom drawables for the the up/down arrow, but those seem to overlay on top of the numbers (ie,the numbers are still visible)
Note: I could make custom pickers where I use a textView in between two imageViews, but the default timePicker allows one to swipe up and scroll through numbers (so would prefer using the default)
Edit: Apparently the NumberPicker has different children in different versions of android(the emulator shows the up/bottom arrows, while on my Samsung Tab they return a nullpointerexception). Wow!
回答1:
Instead of using a time picker you could try and use a number picker instead, this means that you can specifically set what you want to be in the picker.
回答2:
Is there a way to hide these numbers?
No, sorry.
Im guessing there must be an attribute which once set to 'false' should to it.
Only if you fork TimePicker
and add such an attribute yourself.
来源:https://stackoverflow.com/questions/22988150/android-hide-timepicker-numbers