views:

65

answers:

1

I'm working on the android automatic test, and try to test the alarmclock app in the android. I want to get the TimePicker after the TimePickerDialog pop up, then we can use it to invoke the methods 'setCurrentHour(...)' and 'setCurrentMinute()' to set the alarm time programmatically instead of sending the key event so many times. Thank you.

A: 

When onTimeChanged fires at first time, save the View passed in the method. That view will be the reference to TimePicker.

Pentium10
I'm sorry, i did not describe the problem clearly. We can not touch the source code of the alarmclock app in the android, but just test it...