툴바와 RecyclerView가 포함 된 CoordinatorLayout이 있습니다. 사용자가 RecyclerView를 스크롤 할 때 툴바가 축소되고 숨겨 지도록 레이아웃을 구성했습니다. 이것은 잘 작동합니다. RecyclerView 자체의 셀 (행)에 수평 스크롤 RecyclerView가 포함되어 있지 않은 한. 그런 셀을 탭하고 위로 스크롤하면 툴바가 숨기지 않습니다. CoordinatorLayout은 이러한 셀의 스크롤 이벤트를 처리하고 어떻게 든 혼란스러워합니다. 문제를 해결할 수있는 방법이 있습니까?CoordinatorLayout 스크롤 처리가 중단됩니다.
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.design.widget.AppBarLayout
android:id="@+id/main.appbar"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<android.support.v7.widget.Toolbar
android:id="@+id/main.toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_scrollFlags="scroll|enterAlways">
<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Button 1" />
<Button
android:id="@+id/button2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Button 2" />
</android.support.v7.widget.Toolbar>
</android.support.design.widget.AppBarLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/white"
android:paddingBottom="0pt"
android:paddingLeft="0pt"
android:paddingRight="0pt"
android:paddingTop="0pt"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<android.support.v7.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentBottom="true"
android:layout_alignParentEnd="true"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true">
</android.support.v7.widget.RecyclerView>
</RelativeLayout>
</android.support.design.widget.CoordinatorLayout>
RecycelerView 행 레이아웃을 게시하십시오. – amitairos