Useful as an exit transition and reenter transition in conjunction with MaterialContainerTransform
PiperOrigin-RevId: 316708216
(cherry picked from commit 3379c4598078d290a3927a26be1619456225beb5)
In some cases setShapeAppearanceModel will be called after onSizeChanged but before the first draw. This results in the mask being out of date.
Resolves https://github.com/material-components/material-components-android/pull/1328
GIT_ORIGIN_REV_ID=3d99c7857595ff0ba61c1aaa65963909c1950c10
Co-authored-by: ymarian <38727469+ymarian@users.noreply.github.com>
PiperOrigin-RevId: 313402813
(cherry picked from commit 2b676b46a9fa0296edb43eef32cd94b88006cfd5)
Fixes regression in elevation demo introduced when MaterialButton added support for the android:background attribute.
PiperOrigin-RevId: 313390366
(cherry picked from commit 68ccc33dad625fd143bd76449e6dae7889075d61)
This makes MaterialFade more consistent with the other transition patterns
PiperOrigin-RevId: 312718402
(cherry picked from commit 1a6ebc0c56e3ed553a64f9f06a9d2fb6b4ec7da3)
Slider throws an exception when calling getValue with more than one value. Supporting both single value and multiple values in the same class makes it confusing. While not supporting convenience methods getValue and setValue in the multi value class makes it, well, inconvenient.
In addition min, max are also a bit ambiguous since seekBar uses these for valueFrom and valueTo so those were removed.
PiperOrigin-RevId: 311774410
(cherry picked from commit 8f0aa7f8d638aa1368bcd07268433a80d26e4940)
Slider needs to find an ancestor in which it can add its tooltip overlay. When added in a PopupWindow, its possible to search up the view hierarchy and find a parent which is neither a View nor a ViewGroup. This change adds a check for this case
A note is that this change updates edge cases to return the current parent if it is any valid ancestor instead of just returning null. This allows Slider's tooltip to be added to Popup windows, but doesn't guarantee that the tooltip will be fully visible since a PopupWindow's height might be smaller than the slider + tooltip. If adding a Slider to a PopupWindow, you might need to manually add height to your popup's content view to account for the tooltip or turn of the slider's label.
PiperOrigin-RevId: 310913776
(cherry picked from commit b631ef697984c695e1a16b1017b30f035a7599ce)
By default, the elevation shadows are only enabled for API level 28 and above, because Paint shadows are not supported with hardware acceleration below API level 28. If enabled for below API level 28, then the shadows will be drawn using MaterialShapeDrawable, however this may cause performance issues.
Resolves https://github.com/material-components/material-components-android/issues/1126
PiperOrigin-RevId: 310602814
(cherry picked from commit 1094b480809fa4b8c31814b85cd70c0b23fe9dae)
Deleting Extended FAB doc as it's now together with regular FAB.
PiperOrigin-RevId: 310161124
(cherry picked from commit 2bc442e3fbcc9708506aa05cbcea1bef7561505d)
It was a raw string "Tab", which results in it being never translated. Thus, when Talkback announces the bottom navigation item in other languages, it still announces "Tab" in English.
PiperOrigin-RevId: 310158712
(cherry picked from commit bcaca401c22e11e5ab788f179ee4cb52e02e3b97)
Switch the container transform to use a transition listener instead of an animator listener. A transition listener calls onTransitionStart as soon as the transition begins where an animator listener calls onAnimatorStart after the transitions delay, if any, casuing an unwanted visual flash of the end view before the animator starts.
PiperOrigin-RevId: 309977033
(cherry picked from commit 6ab9e11a0eb8ffc93338ad72a15adca4152fb020)
Guarantees that the primary/secondary animator providers are initialized up front, which allows us to simplify the getters/setters to not have an initialization side-effect
PiperOrigin-RevId: 309435463
(cherry picked from commit ae7177d9de9032cb071126dd0d738387034385f3)
Currently, when badge number exceeds max badge number, badge will display max badge number++ e.g. badge number == 1000, badge displays 999+ but content descriptions say "1000 new notifications".
This cl changes the content description to be "999 and more new notifications"
PiperOrigin-RevId: 309219315
(cherry picked from commit eb65ce5b945feb749edc07945b9f66c90e7f69e2)