Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Horizontal number picker scrolls when disabled #29

Closed
inhaledesign opened this issue Jan 17, 2017 · 3 comments
Closed

Horizontal number picker scrolls when disabled #29

inhaledesign opened this issue Jan 17, 2017 · 3 comments

Comments

@inhaledesign
Copy link

If I disable the number picker programmatically, it will still scroll in response to touch events. This doesn't seem to happen when the orientation is vertical, only horizontal.

@inhaledesign
Copy link
Author

Issue goes away if I do the following:

public class NumberPicker extends com.shawnlin.numberpicker.NumberPicker {
    public NumberPicker(Context context) {
        super(context);
    }

    public NumberPicker(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    public NumberPicker(Context context, AttributeSet attrs, int defStyle) {
        super(context, attrs, defStyle);
    }

    @Override
    public boolean onInterceptTouchEvent(MotionEvent event) {
        return isEnabled() && super.onInterceptTouchEvent(event);
    }
}

ShawnLin013 added a commit that referenced this issue Jan 23, 2017
…-picker-scrolls-when-disabled

🐛 Fix horizontal number picker scrolls when disabled (#29)
@ShawnLin013
Copy link
Owner

🐛 Fixed at v2.4.0.

@varunchandran333
Copy link

I am using version 2.4.12, I got the issue

20210211_172239.1.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants