问题描述
先看出现抖动时的录屏:
android_coordinatorLayout_appbarlayout_bug.gif
如何复现:
只需要在Android Studio中按照谷歌官方模板, 生成一个Scrolling Activity:
图片.png
修改它的布局文件 activity_scrolling.xml 把Appbarlayout控件的高度设置的大一点, 这里使用380dp. 不修改也能复现这个问题, 但是高度值修改的大一点, 容易复现.
如下:
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"
tools:context=".ScrollingActivity">
android:id="@+id/app_bar"
android:layout_width&