启用对讲后,如果页面内容多于屏幕大小,则在屏幕 View 中的最后一个元素之后向右滑动,而不是滚动到 RecyclerView 的下一个元素。
XML 代码:
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingBottom="10dp">
<include
android:id="@+id/included_toolbar"
layout="@layout/header_layout" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginBottom="@dimen/activity_vertical_margin"
android:layout_marginTop="@dimen/activity_vertical_margin"
android:fontFamily="@font/msr_700"
android:text="@string/lbl_intro_user_guide"
android:textColor="@color/gunmetal"
android:textSize="24sp" />
<android.support.v7.widget.RecyclerView
android:id="@+id/guide_recycler"
android:layout_width="match_parent"
android:importantForAccessibility="no"
android:layout_height="wrap_content"
/>
</LinearLayout>
最佳答案
以下行停止自动滚动,删除它可以修复该行为:
android:importantForAccessibility="no"
不要将 RecyclerView 的 importantForAccessibility
设置为 no
,它会破坏自动滚动等功能。
关于RecyclerView 中的 Android TalkBack,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50744243/