material-components / material-components/material-components-android
[AppBarLayout] Elevation disappears when AppBarLayout is half visible
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 AppBarLayout has app:liftOnScroll="true" and its sibling has app:layout_scrollFlags="scroll|enterAlways|snap", the elevation disappears if you stop scrolling when the AppBarLayout is half-visible.
The issue is easy to see if after scrolling up and hiding the AppBarLayout you start scrolling down very slowly.
**Expected behavior:** Elevation should remain visible even if you stop scrolling when AppBarLayout is half-visible.
**Source code:**
**Android API version:** The problem is reproducible in APIs 16 through 30.
**Material Library version:** 1.3.0
**Device:** Android emulators (APIs 16 through 30) and Pixel 2 (API 30).
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 by reproducing the issue with the provided AppBarLayout, MaterialToolbar, scrolling flags, and appbar_scrolling_view_behavior configuration on an Android emulator. Verify the elevation while stopping with the AppBarLayout half-visible, and consider the issue done when the elevation remains visible in that state across the reported API versions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100