2017-06-08 30 views
3

私は下部のナビゲーションビューを使用していますが、タブの1つにリサイクルビューを追加しましたが、コンテンツは下部のナビゲーションで重なっています。リサイクルビューをスクロールできません。リサイクラービューで項目をスクロールするときに、下のナビゲーションを隠すことができる方法はありますか。私はあなたが追加できると思い下部のナビゲーションがリサイクルの表示内容を重複しています

<?xml version="1.0" encoding="utf-8"?> <android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    xmlns:app="http://schemas.android.com/apk/res-auto" 
    xmlns:fab="http://schemas.android.com/apk/res-auto" 
    xmlns:sv="http://schemas.android.com/apk/res-auto" 
    xmlns:tools="http://schemas.android.com/tools" 
    android:id="@+id/drawer_layout" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    android:fitsSystemWindows="true"> 

    <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" 
     xmlns:tools="http://schemas.android.com/tools" 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" 
     tools:context=".activity.patient.PatientsActivity"> 

     <include 
      layout="@layout/toolbar" 
      android:layout_width="match_parent" 
      android:layout_height="wrap_content" /> 

     <RelativeLayout 
      android:id="@+id/asd" 
      android:layout_width="match_parent" 
      android:layout_height="match_parent" 
      android:layout_marginTop="60dp" 
      android:orientation="vertical"> 

      <co.moonmonkeylabs.realmrecyclerview.RealmRecyclerView 
       android:id="@+id/appointmentsList" 
       android:layout_width="match_parent" 
       android:layout_height="wrap_content" 
       app:rrvEmptyLayoutId="@layout/empty_view" 
       app:rrvLayoutType="LinearLayout" 
       app:rrvSwipeToDelete="true" /> 

      <android.support.design.widget.BottomNavigationView 
       android:id="@+id/bottom_navigation" 
       android:layout_width="match_parent" 
       android:layout_height="wrap_content" 
       android:layout_alignParentBottom="true" 
       app:itemBackground="@color/white" 
       app:layout_behavior=".BottomNavigationBehavior" 
       app:menu="@menu/bottom_navigation_main" /> 
     </RelativeLayout> 
    </android.support.design.widget.CoordinatorLayout> </android.support.v4.widget.DrawerLayout> 

image

答えて

3

まず:

アンドロイド:layout_above = "@のID/bottom_navigation"

Recyclerview

にするにはスクロール部分は私がScrを探して示唆しているollingBehaviour この質問のように: How to scroll up/down of bottom bar on scrolling of RecyclerView

+0

感謝バディの上に、それは – winchester100

+0

を働いたように、これは動作する可能性だけでRecyclerView前NestedScrollViewを追加することだったシンプルな:) – winchester100

+0

アンドロイド:layout_above = "@のID/bottom_navigation"これはトリックを作った – winchester100

2

<android.support.v4.widget.NestedScrollView 
       android:layout_width="match_parent" 
       android:layout_height="match_parent"> 
      <co.moonmonkeylabs.realmrecyclerview.RealmRecyclerView 
       android:id="@+id/appointmentsList" 
       android:layout_width="match_parent" 
       android:layout_height="wrap_content" 
       app:rrvEmptyLayoutId="@layout/empty_view" 
       app:rrvLayoutType="LinearLayout" 
       app:rrvSwipeToDelete="true" /> 
</android.support.v4.widget.NestedScrollView> 
関連する問題