Android: focus on TimePicker elements

How to focus on timing elements? I am developing a TV application, so I need to control it using the remote control. Therefore, I need to pay attention to each element. TimePicker has 3 elements - column columns, minutes and AM / PM column.

So, how do I focus on each of these three columns?

thanks

+7
android android-layout timepicker
source share
1 answer

You can get each NumberPicker TimePicker and do whatever you want, like change, request focus, etc.

 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")); 
+7
source share

All Articles