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
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
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
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
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
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
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
- Add initialization check for secondary animator provider in MaterialVisibility so subclasses no longer need to explicitly call MaterialVisibility#initialize.
PiperOrigin-RevId: 308687877
Otherwise it's pretty ambiguous, a percent logically is out of 100 but this unit is actually a fraction of the height intended to be in range 0-1.
PiperOrigin-RevId: 306281351
Resolves https://github.com/material-components/material-components-android/issues/1195
A Visibility transition will add Slider to an overlay and then call onAttachToWindow/onDetachFromWindow which looks for an android.R.id.content view, which doen't exist, getting stuck in a loop. This adds an exit strategy for android.R.id.content not being found and fixes Slider in Visibility transitions.
PiperOrigin-RevId: 305886706