android - Content behind CoordinatorLayout AppBarLayout -
i creating settings activity/layout app. have coordinatorlayout
appbarlayout
, toolbar
, beneath includes content_settings.xml
. when content loads .xml file behind app bar.
i'm using same setup load main content , works fine, reason isn't rendering correctly within settings section.
activity_settings.xml
<android.support.design.widget.appbarlayout android:layout_width="match_parent" android:layout_height="wrap_content" android:theme="@style/apptheme.appbaroverlay"> <android.support.v7.widget.toolbar android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="?attr/actionbarsize" android:background="?attr/colorprimary" app:popuptheme="@style/apptheme.popupoverlay" /> </android.support.design.widget.appbarlayout> <include layout="@layout/content_setting" />
the content_settings.xml framelayout
replaced preferencefragment
<?xml version="1.0" encoding="utf-8"?> <framelayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/settings_container" android:layout_width="match_parent" android:layout_height="match_parent" />
add recyclerview :
app:layout_behavior="@string/appbar_scrolling_view_behavior"
Comments
Post a Comment