【发布时间】:2020-05-13 10:28:32
【问题描述】:
我的ViewPager2 包含带有 RecyclerView 的片段。当我在具有一些项目(不覆盖整个屏幕)的适配器内向下和向上滚动时,它经常“滑动”到视图寻呼机中的下一个或上一个片段。有什么方法可以降低这个新版本 ViewPager2 的敏感度吗?
<androidx.viewpager2.widget.ViewPager2 xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/viewPager"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
<androidx.recyclerview.widget.RecyclerView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="match_parent" />
【问题讨论】:
标签: android android-viewpager2