Recyclerview abgedeckt BottomNavigationView

Habe ich versucht den Google-Support-Bibliothek BottomNavigationView mit einem Framelayout für meine Fragmente .

Hier mein code

<?xml version="1.0" encoding="utf-8"?>

<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context="com.bottombarnavigation.MainActivity">

<android.support.design.widget.AppBarLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:theme="@style/AppTheme.AppBarOverlay">

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

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

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

<android.support.design.widget.BottomNavigationView
    android:background="#fcfcfc"
    android:id="@+id/bottom_navigation"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_gravity="bottom|end"
    app:menu="@menu/bottom_navigation" />

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

Wenn ich füllen meine Recyclerview innen das Fragment, dessen Inhalt bekam bei der BottomNavigationView .

Recyclerview abgedeckt BottomNavigationView

Ich habe keine Ahnung, warum dies geschieht. Ich Blick durch andere Menschen Anleitung und es funktioniert gut.

BEARBEITEN
Hier ist meine content_main.xml Datei

<?xml version="1.0" encoding="utf-8"?>
    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@android:color/white"
    app:layout_behavior="@string/appbar_scrolling_view_behavior"
    tools:context="com.bottombarnavigation.MainActivity"
    tools:showIn="@layout/activity_main">


<FrameLayout
    android:id="@+id/container"
    android:layout_width="match_parent"
    android:layout_height="match_parent"></FrameLayout>
</RelativeLayout>
  • Versuchen Sie, diese link. Ich denke, Attribute, app:layout_anchor und app:layout_anchorGravity verpasst werden.
  • ich habe es gerade ausprobiert und die Ergebnisse sind die gleichen. recyclerview Inhalt ist immer noch hinter bottomnavigationview
  • Haben Sie gefunden, die Antwort auf dieses problem?
InformationsquelleAutor EggRollMan | 2016-12-17
Schreibe einen Kommentar