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

BottomSheetDialog - BottomSheetDialog flickering Animation while comes to foreground

Open
#2,949 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

**Description:** When I set the dialog to show, the slide from bottom animation occurs and the dialog is shown. Now, If I set the app to background and then bring it back to the foreground, the dialog that was already showing does the same slide bottom to top animation.

**Expected behavior:** It should be not slide bottom to top as app comes from background to foreground

**Source code:**

```
final BottomSheetDialog bottomSheetDialog = new BottomSheetDialog(MainActivity.this);
bottomSheetDialog.setContentView(R.layout.bottom_sheet_dialog_layout);
bottomSheetDialog.show();
```

**Android API version:** Android 11 and below. Working fine with Android 12

**Material Library version:** 1.1.0/1.2.0

**Device:** Pixel 2 xl with Android 11

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 BottomSheetDialog and the provided show() reproduction, then test its behavior when the app moves to the background and returns to the foreground on Android 11. Compare the initial show animation with the foreground transition; done means the dialog remains visible without replaying the slide-up animation.

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.