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

[AppBarLayout] The layout will be broken after setting the status bar to the light appearance

Open
#2,700 0 comments 0 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

Just create a project by the template "Scrolling Activity" in Android Studio and add a menu item to set the status bar to the light appearance. After the menu item is clicked, the whole layout will be broken.

The bug exists in Android versions 6.0 to 9.0. But it's gone since Android 10.

[Sample Source Code.zip](https://github.com/material-components/material-components-android/files/8681473/Sample.Source.Code.zip)

https://user-images.githubusercontent.com/20295792/168137439-85e5b17e-3204-4d30-a7ef-6d3cc9344c38.mp4

https://user-images.githubusercontent.com/20295792/168137536-275a7589-6b18-4ddc-84ad-d759f7aea776.mp4

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

Start with the attached Sample Source Code and the Android Studio "Scrolling Activity" template, then reproduce the layout break after enabling light status-bar appearance on Android 6.0–9.0. Compare the behavior with Android 10 and verify that the AppBarLayout-based layout remains intact after the menu action.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.