底部导航重叠回收器在android中查看内容
我正在使用底部导航视图并显示三个选项卡,在其中一个选项卡中,我添加了回收器视图,但内容与底部导航重叠。无法滚动回收器视图。当我在回收器视图上滚动项目时,是否可以隐藏底部导航底部导航重叠回收器在android中查看内容,android,xml,android-layout,bottomnavigationview,Android,Xml,Android Layout,Bottomnavigationview,我正在使用底部导航视图并显示三个选项卡,在其中一个选项卡中,我添加了回收器视图,但内容与底部导航重叠。无法滚动回收器视图。当我在回收器视图上滚动项目时,是否可以隐藏底部导航 <?xml version="1.0" encoding="utf-8"?> <android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="h
<?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>
首先,我想您可以添加一个:
android:layout_over=“@id/bottom_导航”
到回收站
对于滚动部分,我建议寻找滚动行为
比如在这个问题上:
在RecyclerView之前添加NestedScrollView这可能会像上面那样工作
<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>
很简单:)android:layout_over=“@id/bottom_navigation”这就成功了