-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Will support RecyclerView + PagerSnapHelper #643
Comments
Works for me. |
RecyclerView + PagerSnapHelper can be scaled, but not smooth enough, often slides to the next page |
I have a need to add and remove children for the image list. |
RecyclerView + PagerSnapHelper can be scaled, but not smooth enough, often slides to the next page |
I fix it ,you only need override RecyclerView . public class RecyclerViewViewPager extends RecyclerView {
} |
还是不完美,你试一下一开始双指缩放,然后松开一个手指,很容易又滑到下一张了 |
I have just solved a similar problem recently and provided an idea that I hope will help you. if (mHorizontalScrollEdge == HORIZONTAL_EDGE_BOTH
|| (mHorizontalScrollEdge == HORIZONTAL_EDGE_LEFT && dx >= 1f)
|| (mHorizontalScrollEdge == HORIZONTAL_EDGE_RIGHT && dx <= -1f)
|| (mVerticalScrollEdge == VERTICAL_EDGE_TOP && dy >= 1f)
|| (mVerticalScrollEdge == VERTICAL_EDGE_BOTTOM && dy <= -1f)) {
//add the line below
if (Math.abs(dx) >= 10f && Math.abs(dx) > Math.abs(dy)) {
if (parent != null) {
parent.requestDisallowInterceptTouchEvent(false);
}
}
} The idea is to judge the instantaneous coordinate changes in the |
No description provided.
The text was updated successfully, but these errors were encountered: