-
Notifications
You must be signed in to change notification settings - Fork 293
fix: android slider seek时与viewPager 滑动冲突 #268
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
Conversation
|
Hello, thanks for your contribution. Please translate comments in code to English & fill the description of pull request. |
|
OK, I have done. |
|
Hi @huaihong1986, The description of merge request is empty. |
| if (getParent() != null) { | ||
| try { | ||
| getParent().requestDisallowInterceptTouchEvent(true); | ||
| //SeekBar 放在其他视图中,手指放在 SeekBar 上面不会立即触发滑动操作 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code should always be self-explanatory.
If comments are required for the code to be more understandable they should be written in English.
Applies also to line 239.
| dispatchTouchEvent(evup); | ||
| evup.recycle(); | ||
| } | ||
| } catch (Exception exception) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why leaving an empty exception here?
| public boolean onTouchEvent(MotionEvent event) { | ||
| //设置父容器不拦截事件 | ||
| if (getParent() != null) { | ||
| try { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What exceptions do we expect here to be thrown by MotionEvent?
getParent() is already checked against null.

Summary:
Test Plan: