Не могу поменять цвет statusBar при использовании CoordinatorLayout
Изучаю CoordinatorLayout и его вложенные компоненты. У CollapsingToolbarLayout есть xml атрибут statusBarScrim, который как я полнял из документации:
Status bar scrim
A scrim which is shown or hidden behind the status bar when the scroll position has hit a certain threshold. You can change this via setStatusBarScrim(Drawable). This only works on LOLLIPOP devices when we set to fit system windows.
меняет statusBar при сворачивании CollapsingToolbarLayout.
Вопрос: Почему у меня не получается изменить statusBar
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/appbar"
android:fitsSystemWindows="true"
android:layout_height="192dp"
android:layout_width="match_parent"
android:theme="@style/AppTheme.AppBarOverlay"
>
<com.google.android.material.appbar.CollapsingToolbarLayout
android:id="@+id/appbarCustom"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
app:layout_scrollFlags="scroll|exitUntilCollapsed|snap"
app:toolbarId="@+id/toolbar2"
app:contentScrim="@android:color/holo_red_dark"
app:statusBarScrim="@color/yellow"
>