material-components / material-components/material-components-android
[AppBarLayout] Does not expand when used with a nested CoordinatorLayout on version > 1.2.1
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 17.4k
- Forks
- 3.2k
- PR merge metrics
- No merged PRs in 30d
Description
**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) |
|---|---|
|  |  |
**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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked NestedCoordinatorLayout reproduction and app/src/main/res/layout/activity_coordinator.xml lines 32-52, comparing behavior between Material Library 1.0.0 and 1.2.1 or later on Android API 30. Trace the nested CoordinatorLayout and AppBarLayout interaction; done means the outer CollapsingToolbar and inner Toolbar honor their distinct scroll flags and expand or collapse as shown in the working version.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100