@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; }
@Override public void onClick(DialogInterface dialog, int which) { if (mCallback != null) { mTimePicker.clearFocus(); mCallback.onTimeSet( mTimePicker, mTimePicker.getCurrentHour(), mTimePicker.getCurrentMinute()); } }