Monday, 4 January 2016

XML : How to hide toolbar fully under status bar when scrolling recyclerview

I try to make scrolling behavior for toolbar as embodied in Google Photo. But my toolbar not hiding fully under status bar.

enter image description here

enter image description here

enter image description here

  <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"  xmlns:app="http://schemas.android.com/apk/res-auto"  android:layout_width="match_parent"  android:layout_height="match_parent">  <android.support.design.widget.AppBarLayout      android:id="@+id/appbar"      android:layout_width="match_parent"      android:layout_height="wrap_content"      android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">      <android.support.v7.widget.Toolbar          android:id="@+id/toolbar"          android:layout_width="match_parent"          android:layout_height="wrap_content"          android:background="@color/colorPrimary"          app:layout_scrollFlags="scroll|enterAlways|snap" />  </android.support.design.widget.AppBarLayout>  <android.support.v7.widget.RecyclerView      android:id="@+id/rv"      android:layout_width="match_parent"      android:layout_height="match_parent"      android:clipToPadding="false"      android:clipChildren="false"      app:layout_behavior="@string/appbar_scrolling_view_behavior" />    

No comments:

Post a Comment