Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/193.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 将回收器视图置于底部导航上方_Java_Android_Android Layout - Fatal编程技术网

Java 将回收器视图置于底部导航上方

Java 将回收器视图置于底部导航上方,java,android,android-layout,Java,Android,Android Layout,我在主活动中有一个底部导航,我试图在底部导航上方显示recyclerview,但我的问题是底部导航重叠recyclerview,我的recyclerview位于地图片段中,所以我无法将其置于底部导航上方。我尝试使用边距,但它切断了recyclerview 我的xml代码 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_pare

我在主活动中有一个底部导航,我试图在底部导航上方显示
recyclerview
,但我的问题是底部导航重叠
recyclerview
,我的
recyclerview
位于地图片段中,所以我无法将其置于底部导航上方。我尝试使用边距,但它切断了
recyclerview
我的xml代码

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent" >

<com.google.android.gms.maps.MapView
    android:id="@+id/mapview"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

</com.google.android.gms.maps.MapView>
<RelativeLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content">
    <android.support.v7.widget.RecyclerView
        android:layout_alignParentBottom="true"
        android:layout_alignParentRight="true"
        android:layout_width="match_parent"
        android:layout_height="150dp"
        android:id="@+id/item_picker">

    </android.support.v7.widget.RecyclerView>
</RelativeLayout>
</RelativeLayout>

您试图在父级的底部设置
RecyclerView
,这就是您的UI重叠的原因

试试这个

android:layout_below="@+id/mapView"
android:layout_above="@+id/yourBottomNavigationView"

这样它就不会彼此重叠。

您正试图在父级的底部设置
RecyclerView
,这就是您的UI重叠的原因

试试这个

android:layout_below="@+id/mapView"
android:layout_above="@+id/yourBottomNavigationView"
这样它就不会彼此重叠。

试试这个
android:layout_over=“@+id/navigationLayout”


试试这个
android:layout_over=“@+id/navigationLayout”



你的
底部导航视图在哪里
?它在主活动和回收视图中处于零碎状态无论如何,我解决了问题,不如提出一个实际的解决方案,而不是只说“我解决了问题”因此,面对这个问题的人知道该怎么办?你的
底部导航视图在哪里?
?它在主要活动中,而recyclerview在片段中。总之,我解决了这个问题。如何提出一个实际的解决方案,而不只是说“我解决了问题”所以面对这个问题的人知道该怎么办?谢谢,但我解决了问题,上面的布局不起作用,因为底部导航在主要活动中。谢谢,但我解决了问题,上面的布局不起作用,因为底部导航在主要活动中