Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f66adbe7 authored by Svetoslav Ganov's avatar Svetoslav Ganov
Browse files

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
parent a8bdc2a4
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -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();
    }