summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Svetoslav Ganov <svetoslavganov@google.com> 2011-02-24 15:08:39 -0800
committer Svetoslav Ganov <svetoslavganov@google.com> 2011-02-24 15:08:43 -0800
commitf66adbe7565ad5dbb75c07dbf36212beeaa582fb (patch)
tree5ea42c54cb28a9f374bb5a06ae17667792700815
parenta8bdc2a42e49a8262de2ceb351e7437655ff7c66 (diff)
The NumberPicker input cotrols are somtimes not shown.
bug:3452868 1. Now hiding the input controls, which also cancels the input controls fade-in animation, on every intercept of down since the fade-in anumation flips a flag used to guide the drawing of the input controls. Note that we also want the scroll wheel shown on down but the fade-in anumation is actually hiding it upon completion. Change-Id: Ib161ed757e537365b21e6913370d264152dca1fe
-rw-r--r--core/java/android/widget/NumberPicker.java5
1 files changed, 1 insertions, 4 deletions
diff --git a/core/java/android/widget/NumberPicker.java b/core/java/android/widget/NumberPicker.java
index 8e660ff17a73..7a591782564f 100644
--- a/core/java/android/widget/NumberPicker.java
+++ b/core/java/android/widget/NumberPicker.java
@@ -608,6 +608,7 @@ public class NumberPicker extends LinearLayout {
case MotionEvent.ACTION_DOWN:
mLastMotionEventY = mLastDownEventY = event.getY();
removeAllCallbacks();
+ hideInputControls();
mBeginEditOnUpEvent = false;
mAdjustScrollerOnUpEvent = true;
if (mDrawSelectorWheel) {
@@ -620,7 +621,6 @@ public class NumberPicker extends LinearLayout {
}
mBeginEditOnUpEvent = scrollersFinished;
mAdjustScrollerOnUpEvent = true;
- hideInputControls();
return true;
}
if (isEventInViewHitRect(event, mInputText)
@@ -630,7 +630,6 @@ public class NumberPicker extends LinearLayout {
&& isEventInViewHitRect(event, mDecrementButton))) {
mAdjustScrollerOnUpEvent = false;
setDrawSelectorWheel(true);
- hideInputControls();
return true;
}
break;
@@ -641,7 +640,6 @@ public class NumberPicker extends LinearLayout {
mBeginEditOnUpEvent = false;
onScrollStateChange(OnScrollListener.SCROLL_STATE_TOUCH_SCROLL);
setDrawSelectorWheel(true);
- hideInputControls();
return true;
}
break;
@@ -1265,7 +1263,6 @@ public class NumberPicker extends LinearLayout {
}
}
- postAdjustScrollerCommand(flingScroller.getDuration());
invalidate();
}