Skip to content

[MaterialAlertDialog] [BottomSheetDialog] Enter and exit animation breaks when user switches device theme in an M3 app #4938

@HehehBoiii78

Description

@HehehBoiii78

Description: When a Material 3 app that uses MaterialAlertDialogs or BottomSheetDialogs is open, if the user turns dark mode on/off, the enter and exit animation of a MaterialAlertDialog and a modal BottomSheetDialog breaks.

Expected behavior: The animation shouldn't break when the user switches the device's theme.

Steps to reproduce:

  1. Download and install a recent version of the M3 Catalog app from this repository, then open it.
  2. Switch the device's theme (i.e., turn on dark mode if it's off or turn off dark mode if it's on). Don't change the theme using the app's settings dialog.
  3. Go to the "Dialogs" or the "Bottom Sheet" section within the app, and click on "Demo".
  4. Click on the button to make a dialog.
  5. See that the dialog's animation breaks and every dialog appears immediately instead of animating properly.

Android API version: 30 or higher

Material Library version: Happens with any recent version of this library from this repository, but I've only confirmed that this bug exists in v1.14.0-alpha04 and even v1.6.1.

Additional context:
To temporarily workaround this bug, the user has to restart the affected app to restore the proper animation of all M3 dialogs in the app.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions