Merge "Cancel animation and jump to current state if not animating picker" into nyc-dev am: d8c38b892b am: 3f9d17fbe1
am: 93b15870d5
* commit '93b15870d52e9115225b5cc1c9b7fb78b2b9500b':
Cancel animation and jump to current state if not animating picker
Change-Id: Ic72675504ac72cd1b19ec8049fd56b3f54401b72
This commit is contained in:
@@ -658,6 +658,13 @@ public class RadialTimePickerView extends View {
|
||||
|
||||
if (animate) {
|
||||
animatePicker(hours, ANIM_DURATION_NORMAL);
|
||||
} else {
|
||||
// If we have a pending or running animator, cancel it.
|
||||
if (mHoursToMinutesAnimator != null && mHoursToMinutesAnimator.isStarted()) {
|
||||
mHoursToMinutesAnimator.cancel();
|
||||
mHoursToMinutesAnimator = null;
|
||||
}
|
||||
mHoursToMinutes = hours ? 0.0f : 1.0f;
|
||||
}
|
||||
|
||||
initData();
|
||||
|
||||
Reference in New Issue
Block a user