material-components / material-components/material-components-android

[AppBarLayout] statusBarForeground property cause visual glitch

Open
#447 4 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug Widget: TopAppBar
Dominant language
Java
Stars
17.4k
Forks
3.2k
PR merge metrics
No merged PRs in 30d

Description

**Description:** When we use this property (I was trying things to have a beautiful scrim on the status bar), it cause a visual glitch when scroll top and bottom, basically the a scrim colored status bar that appears in the various place of the collapsingtoolbarlayout. See this [video](https://streamable.com/i6urr) for an easier explanation

**Expected behavior:** The glitch doesn't appear

**Source code:** https://github.com/NitroG42/MaterialComponentBugs/tree/master
See activity [StatusBarScrimBugActivity](https://github.com/NitroG42/MaterialComponentBugs/blob/master/app/src/main/java/com/nitrog42/materialcomponentbugs/StatusBarScrimBugActivity.kt)
In this sample, using the following property
```
app:statusBarForeground="@color/colorAccent"
```

**Android API version:** Tested on API 28

**Material Library version:** 1.1.0-alpha08

**Device:** Google Pixel Android 9

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue from StatusBarScrimBugActivity.kt in the linked sample using app:statusBarForeground with the stated API and library versions. Trace the AppBarLayout and CollapsingToolbarLayout behavior while scrolling to the top and bottom, and verify that the status-bar scrim no longer appears in the wrong locations.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.