Search code examples
androidandroid-appbarlayout

My listview is above the appbar


I have a whatsapp like appbar menu option, but the list view is above this frame layout. and I have added scroll behavior also. It was working perfectly fine until I made changes and now i dont know how to fix it.

<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"
    app:layout_behavior="@string/appbar_scrolling_view_behavior"
    tools:context="com.example.feelingoodlivinbeta.socialdreams_a1.HostMainMenuActivity">

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

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

            <io.codetail.widget.RevealFrameLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content">

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

            </io.codetail.widget.RevealFrameLayout>
        </FrameLayout>
    <include layout="@layout/content_host_main_menu" />

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

enter image description here


Solution

  • Try to add app:layout_behavior="@string/appbar_scrolling_view_behavior" in your "content_host_main_menu.xml" parent layout