2016-12-11 1 views
0

나는 다중보기 형식의 recyclerview를 가지고 있으며, 일부보기에는 onclick이있는 항목이 있습니다. 클릭 할 수있는 항목 외부 터치 숨기기/표시를 appbarlayout 경우 나는 recyclerview 스크롤,하지만 스크롤을 위해 클릭 할 수있는 항목에 내 손가락을 넣어 경우가 appbarlayout 초점을 훔치는 것 recyclerview는/숨기기 표시되지 않는 경우recycelerview item onclick appbarlayout 스크롤을 도용

활동

recyclerview와

<android.support.design.widget.AppBarLayout 
    android:id="@+id/app_bar" 
    android:layout_width="match_parent" 
    android:layout_height="56dp" 
    android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"> 

    <ViewSwitcher 
     android:id="@+id/vs" 
     android:layout_width="match_parent" 
     android:layout_height="match_parent" 
     android:fitsSystemWindows="true" 
     app:layout_scrollFlags="scroll|enterAlways|snap"> 

     <android.support.v7.widget.Toolbar 
      android:id="@+id/toolbar" 
      android:layout_width="match_parent" 
      android:layout_height="?attr/actionBarSize" 
      android:background="?attr/colorPrimary" 
      app:layout_scrollFlags="scroll|enterAlways|snap" 
      app:popupTheme="@style/ThemeOverlay.AppCompat.Light"> 

      <TextView 
       android:id="@+id/toolbar_title" 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:layout_gravity="right|center_horizontal" 
       android:ellipsize="end" 
       android:maxLines="1" 
       android:paddingRight="0dp" 
       android:textColor="@color/md_white_1000" 
       android:textSize="16dp" /> 
     </android.support.v7.widget.Toolbar> 

     <RelativeLayout xmlns:app="http://schemas.android.com/apk/res-auto" 
      android:layout_width="match_parent" 
      android:layout_height="56dp" 
      android:background="@color/md_white_1000" 
      android:elevation="2dp" 
      android:fitsSystemWindows="true"> 

     </RelativeLayout> 

    </ViewSwitcher> 


</android.support.design.widget.AppBarLayout> 

<include layout="@layout/content_activity_main" /> 

조각

,

답변

0

추가하는 경우 .setNestedScrollingEnabled (false); 내부 recyclelerview로 그것은 완료 될 것이다!