Bạn có thể nhận được mỗi NumberPicker
của TimePicker và làm bất cứ điều gì bạn muốn như sửa đổi, yêu cầu sự tập trung và vân vân.
NumberPicker hourPicker = (NumberPicker) mTimePicker.findViewById(Resources.getSystem().getIdentifier("hour",
"id", "android"));
NumberPicker minutePicker = (NumberPicker) mTimePicker.findViewById(Resources.getSystem().getIdentifier("minute",
"id", "android"));
NumberPicker amPmPicker = (NumberPicker) mTimePicker.findViewById(Resources.getSystem().getIdentifier("amPm",
"id", "android"));
// this is a number picker modified and there is one for each NumerPicker above
View numberPickerModified = (View) mTimePicker.findViewById(Resources.getSystem().getIdentifier("numberpicker_input",
"id", "android"));
Nguồn
2015-03-10 12:54:21
Hi, bạn có thể vui lòng giải thích làm thế nào tôi có thể sử dụng addfocusables trên timerpicker? – Gaurav
Tốt hơn bạn nên làm khác với tôi đã nói. Xin hãy xem lại những gì tôi đã chỉnh sửa –
Điều này làm việc hoàn hảo cho tôi. Cảm ơn – Gaurav