Ejemplo n.º 1
0
 @Override
 public Bundle onSaveInstanceState() {
   Bundle state = super.onSaveInstanceState();
   state.putInt(TimePickerDialog.HOUR, mTimePicker.getCurrentHour());
   state.putInt(TimePickerDialog.MINUTE, mTimePicker.getCurrentMinute());
   state.putBoolean(TimePickerDialog.IS_24_HOUR, mTimePicker.is24HourView());
   return state;
 }
Ejemplo n.º 2
0
 @Override
 public void onClick(DialogInterface dialog, int which) {
   if (mCallback != null) {
     mTimePicker.clearFocus();
     mCallback.onTimeSet(
         mTimePicker, mTimePicker.getCurrentHour(), mTimePicker.getCurrentMinute());
   }
 }