Skip to content
This repository was archived by the owner on Feb 12, 2026. It is now read-only.
This repository was archived by the owner on Feb 12, 2026. It is now read-only.

Fab does not return to original position after snackbar dismiss when using MaterialComponents themes #31

Description

@vpotvin

Overview

If your app theme uses a parent of "Theme.MaterialComponents.xxxxxx" then the FAB does not return to its normal position after snackbar dismisses.

I noticed this because I was using a MaterialComponents theme so that I could use the MaterialComponents BottomNavigationView. After much experimenting I narrowed this down as the issue.

Environment (required for bug report)

  • OS: Pie
  • Device: Pixel 2 Emulator
  • Can reproduce on sample app: Yes, if theme is changed

Also saw this behavior on a Samsung S7 Edge running Oreo.

Steps to reproduce (required for bug report)

  • Modify sample app so that app theme's parent is "Theme.MaterialComponents.Light.DarkActionBar" make no other changes
  • Build app
  • Go to Coordinator Activity
  • Click Button
  • Wait for snackbar to dismiss
  • FAB does not move back to expected position

Expected behavior (required for bug report)

  • FAB should move back to expected position, but does not.

Known workaround

This can be worked around by not having the app theme extend from a MaterialComponents theme. However this can be annoying as some material components require this theming. This can be worked around by having only those individual components in a layout extend the theme, but again, seems like we should be able to use the MaterialComponents themes since the Androidx FloatingActionButton behaves as desired with these themes.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions