Merge "change "next" to "done" in minute IME option under 24-hour format"

This commit is contained in:
Elliott Hughes
2013-06-05 23:20:37 +00:00
committed by Gerrit Code Review

View File

@@ -237,6 +237,7 @@ public class TimePicker extends FrameLayout {
// update controls to initial state
updateHourControl();
updateMinuteControl();
updateAmPmControl();
setOnTimeChangedListener(NO_OP_CHANGE_LISTENER);
@@ -428,6 +429,7 @@ public class TimePicker extends FrameLayout {
updateHourControl();
// set value after spinner range is updated
setCurrentHour(currentHour);
updateMinuteControl();
updateAmPmControl();
}
@@ -508,6 +510,14 @@ public class TimePicker extends FrameLayout {
}
}
private void updateMinuteControl() {
if (is24HourView()) {
mMinuteSpinnerInput.setImeOptions(EditorInfo.IME_ACTION_DONE);
} else {
mMinuteSpinnerInput.setImeOptions(EditorInfo.IME_ACTION_NEXT);
}
}
private void updateAmPmControl() {
if (is24HourView()) {
if (mAmPmSpinner != null) {