There is some markup, I will give as an example only a part of it. On the scroll up, it should hide the toolbar and leave tabs, on the version before lolipop everything happens as it should. However, starting with version 5.0 and higher, only the status bar is removed and the toolbar takes the place of the status bar .
Immediately I thought on android:fitsSystemWindow , and all that came out of me was to do it normally on versions after 5, and completely hide on versions up to 5.
I have never met with such a thing before, in my opinion the behavior is too strange.
Here is part of the markup code:
<android.support.v4.widget.DrawerLayout 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:id="@+id/drawer_layout" android:layout_width="match_parent" android:layout_height="match_parent" android:fitsSystemWindows="true" tools:openDrawer="start"> <android.support.design.widget.CoordinatorLayout android:id="@+id/coordinator" android:layout_width="match_parent" android:layout_height="match_parent" android:background="#f5f5f5" android:clickable="true" android:fitsSystemWindows="true"> <android.support.design.widget.AppBarLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@drawable/blue_gradient"> <android.support.v7.widget.Toolbar android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="56dp" android:clickable="true" app:layout_scrollFlags="scroll|enterAlwaysCollapsed" app:popupTheme="@style/Theme.AppCompat.Light.NoActionBar" app:theme="@style/Theme.AppCompat.NoActionBar" /> <android.support.design.widget.TabLayout xmlns:tools="http://schemas.android.com/tools" android:id="@+id/tabLayout" style="@style/MyCustomTabLayout" android:layout_width="match_parent" android:layout_height="38dp" android:layout_marginLeft="68dp" android:clickable="false" android:longClickable="false" android:paddingLeft="1dp" app:tabIndicatorColor="@android:color/white" app:tabIndicatorHeight="4dp" app:tabMode="scrollable" app:tabSelectedTextColor="@android:color/white" app:tabTextColor="@android:color/white" /> </android.support.design.widget.AppBarLayout> <android.support.v4.view.ViewPager android:id="@+id/viewPager" android:layout_width="match_parent" android:layout_height="match_parent" android:clickable="true" app:layout_behavior="@string/appbar_scrolling_view_behavior" /> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/framesheet" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="#ffffff" app:behavior_hideable="true" app:behavior_peekHeight="100dp" app:layout_behavior="com.asgard.power.ExpandedBottomSheetBehavior"> <android.support.v7.widget.CardView android:layout_width="match_parent" android:layout_height="match_parent" android:background="#ffffff">