conradchen 2bfc7bae07 [SnackBar] Fix margins are added multiple times when show() is called
When a snack bar is hidden and its show() method is called, it will be added to the target parent, and at this moment the parent view will set the layout params to the snack bar, with the same existing margins if any. Therefore if the margins are already updated with extra margins, the original margins will be incorrectly updated. This CL introduces a flag to tells this situation from other "real" scenarios in which clients want to update their custom margins.

Resolves https://github.com/material-components/material-components-android/issues/2666

PiperOrigin-RevId: 445159923
(cherry picked from commit 46fa8cc45b8bb6d1423f7349986c7f3f4cdc5d4e)
2022-05-04 11:32:07 -04:00
2021-11-29 17:35:39 +00:00
2016-12-12 16:01:31 -08:00
2017-05-08 16:48:53 -07:00
2020-09-18 14:05:08 -07:00
2022-05-04 11:29:50 -04:00
2020-07-10 11:50:37 -07:00
2020-06-26 14:00:54 -04:00

Build Status Chat

Material Components for Android

Material Components for Android (MDC-Android) help developers execute Material Design. Developed by a core team of engineers and UX designers at Google, these components enable a reliable development workflow to build beautiful and functional Android apps.

Material Components for Android is a drop-in replacement for Android's Design Support Library.

Getting Started

For information on how to get started with Material Components for Android, take a look at our Getting Started guide.

Submitting Bugs or Feature Requests

For usage questions: ask on Stack Overflow.

Bugs or feature requests should be submitted at our GitHub Issues section.

Documentation

Description
Modular and customizable Material Design UI components for Android
Readme Apache-2.0 191 MiB
Languages
Java 99.9%
Kotlin 0.1%