material-components / material-components/material-components-android
[AppBarLayout] Does not expand when used with a nested CoordinatorLayout on version > 1.2.1
还没有人认领这个 Issue。
- 主要语言
- Java
- 星标
- 17.4k
- 派生
- 3.2k
- PR 合并指标
- 30 天内没有已合并 PR
描述
**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
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从链接的 NestedCoordinatorLayout 复现以及 app/src/main/res/layout/activity_coordinator.xml 第 32-52 行开始,在 Android API 30 上比较 Material Library 1.0.0 与 1.2.1 或更高版本之间的行为。跟踪嵌套的 CoordinatorLayout 与 AppBarLayout 之间的交互;当外层 CollapsingToolbar 和内层 Toolbar 遵循各自不同的滚动标志,并像正常工作的版本一样展开或折叠时,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- java
- 领域
- mobile
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100