Bottombar shaked when using CollapsingToolbarLayout
When I set one fragment (call it P) with its layout containing CollapsingToolbarLayout, the bottom bar shaked when switching some fragments (Only happening when these fragments contains P)
The P fragment's layout is as following:
<?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">
<android.support.design.widget.AppBarLayout
android:id="@+id/app_bar"
android:layout_width="match_parent"
android:layout_height="@dimen/app_bar_large"
android:fitsSystemWindows="true"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
<android.support.design.widget.CollapsingToolbarLayout
android:id="@+id/toolbar_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
app:contentScrim="?attr/colorPrimary"
app:layout_scrollFlags="scroll|exitUntilCollapsed">
<!-- some layout -->
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
app:layout_collapseMode="pin"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"/>
</android.support.design.widget.CollapsingToolbarLayout>
</android.support.design.widget.AppBarLayout>
<!-- some layout -->
</android.support.design.widget.CoordinatorLayout>
Thanks!
i have same issue, notify if you will have solved this
@yuriChechetkin @DanteAndroid sadly i'm a little busy with work stuff so i don't have time to look into this right now, but, i don't know if @roughike would have some time to look into this.
@yuriChechetkin I don't know why, but some day it suddenly works. Try to change your layout a little bit
@DanteAndroid it doesn't work when using attribute android:fitsSystemWindows="true" in root layout, just try to check it
@yuriChechetkin Yeah, I remember it has somthing to do with fitSystemWindows, thx.