15 Commits

Author SHA1 Message Date
hunterstich
71f014fa41 [Snackbar] Added optional close icon
PiperOrigin-RevId: 845256053
2025-12-17 14:23:55 +00:00
pubiqq
510881a469 [Internal] Stop using deprecated androidx.core.view.* methods
Resolves https://github.com/material-components/material-components-android/pull/4117

GIT_ORIGIN_REV_ID=dd157e8360c2511810496693cec1616fce578655
PiperOrigin-RevId: 632284856
2024-05-13 17:37:38 +00:00
rightnao
3d3edce956 [Snackbar] Update motion specs
PiperOrigin-RevId: 470790457
2022-08-30 11:21:45 -04:00
dsn5ft
e981f2f96c [Snackbar] Add defensive null check for messageView.getLayout() in SnackbarContentLayout onMeasure
PiperOrigin-RevId: 452776106
2022-06-03 11:59:14 -07:00
conradchen
ff97a6805c [SnackBar] Enforce vertical layout when action text is too long
The snack bar content layout is by default horizontal, and we only change it to vertical when the action view is too wide and ellipsizes the message text. Therefore if the layout orientation is already vertical, we should just keep the layout and no need to check if the message text is multi-line again.

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

PiperOrigin-RevId: 419885582
2022-01-05 23:26:51 -05:00
conradchen
6a3ea94ae0 [Snackbar] Fix maxWidth is not applied on Snackbar
During a previous refactoring, the maxWidth enforcement logic was incorrectly moved to the inner layout of snackbar. Moves the logic back to the outer layout so it can be properly applied.

PiperOrigin-RevId: 413938993
2021-12-06 19:43:13 +00:00
Material Design Team
a487c89185 Internal change
PiperOrigin-RevId: 412135443
2021-11-29 17:35:39 +00:00
conradchen
8729d8ab57 [SnackBar] Fix maxWidth and maxInlineActionWidth are not applied
We load maxWidth and maxInlineActionWidth style attributes in SnackbarContentLayout, but the snackbar styles are only applied to SnackbarLayout. We need to pass the values to SnackbarContentLayout, as we did for actionTextColorAlpha.

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

PiperOrigin-RevId: 404320339
2021-10-20 19:18:47 +00:00
marianomartin
555356b03f Internal cleanup
PiperOrigin-RevId: 318134343
2020-06-26 14:06:52 -04:00
marianomartin
934c407d7d Add a setter for maxInlineActionWidth
PiperOrigin-RevId: 295033109
2020-02-14 11:30:12 -05:00
cketcham
4211a8a794 Add @NonNull and @Nullable annotations
PiperOrigin-RevId: 265057036
2019-08-29 10:25:19 -04:00
marianomartin
90837ec485 Internal cleanup
PiperOrigin-RevId: 249243403
2019-05-21 12:15:07 -04:00
cketcham
dc72aaeed4 Migrate Gradle build and sources to androidx
PiperOrigin-RevId: 225551505
2018-12-21 11:07:45 -05:00
dniz
d03f490740 Snackbar update label text color to new color system
PiperOrigin-RevId: 218861625
2018-10-28 21:42:33 -04:00
dniz
9ca33544ac Update package name to com.google.android.material
PiperOrigin-RevId: 193236235
2018-04-30 11:24:23 -04:00