material-components / material-components-android

Modular and customizable Material Design UI components for Android

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[AppBarLayout] Does not expand when used with a nested CoordinatorLayout on version > 1.2.1

serbelga opened this issue · comments

Description: When we use a CoordinatorLayout nested inside another CoordinatorLayout and we define different scroll flags for each AppBarLayout, it doesn't work properly in 1.2.1 version (and 1.3.0-rc01). Note that it works correctly on 1.0.0 version.
The goal is to have an AppBarLayout with a CollapsingToolbar (scrollFlags scroll|exitUntilCollapsed|snap) in the main CoordinatorLayout and an AppBarLayout with a Toolbar (scrollFlags scroll|enterAlways|snap) in the nested CoordinatorLayout.

Version 1.0.0 (Works as expected) Version 1.2.1 and above (Not working)
device-2020-12-14-113324 device-2020-12-14-113931

Source code:

Project:
https://github.com/serbelga/NestedCoordinatorLayout

Layout:
https://github.com/serbelga/NestedCoordinatorLayout/blob/24d3012553ab917df35360157c0654be4dfd638d/app/src/main/res/layout/activity_coordinator.xml#L32-L52

Android API version: Android API 30

Material Library version: 1.2.1

Any update on this one?

with a nested CoordinatorLayout on version > 1.2.1,in the main CoordinatorLayout,I found the app:layout_scrollFlags must have "enterAlways".