-
Notifications
You must be signed in to change notification settings - Fork 312
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
如何每次只滑动一张 #28
Comments
@ITzhangyan 尝试了SnapHelper跟LinearSnapHelper都无效,貌似是跟自定义的LayoutManager冲突。最后自定义了RecyclerView,设置了抛掷速度的缩放因子,试了试可以解决快速滑动多张的问题。 public class CustomRecyclerView extends RecyclerView {
} 使用:mRecyclerView.setFlingScale(0.1); |
@ITzhangyan @yan-lixin @renjianan 可以自定义SnapHelper就可以实现一次滑动一张卡片,具体可以https://github.com/yangchong211/YCBanner |
滑动页数是CenterSnapHelper的onFling方法里的offsetPosition控制的,将offsetPosition设置为0就是滑动一页。 |
@xilost isFling是在哪里定义的 |
@yan-lixin 可以参考autoPlaying的定义。我是方便在xml里设置。 |
你好,3D效果如何设置每次滑动只能滑动一张,demo里可以滑动很多张,我通过设置滑动速度,但是效果不好
The text was updated successfully, but these errors were encountered: