首页 > 代码库 > Disable keyboard input on Android TimePicker

Disable keyboard input on Android TimePicker

try to use:

myTimePicker.setDescendantFocusability(TimePicker.FOCUS_BLOCK_DESCENDANTS);

to disable focus on the text views of the internal NumberPickers

This also works for DatePicker, just use DatePicker.FOCUS_BLOCK_DESCENDANTS instead. –  swanson Feb 20 ‘12 at 17:31
 
http://stackoverflow.com/questions/2391216/disable-keyboard-input-on-android-timepicker