- Allow single digit badges to be non-circular if the label text is too big horizontally.
- Change maxCharacterCount to truncate both strings and numbers, and add new attribute maxNumber to truncate only numbers
- Updated maxCharacterCount so that if it doesn't exist, it does not truncate instead of defaulting to a value
Resolves https://github.com/material-components/material-components-android/pull/3321
GIT_ORIGIN_REV_ID=a8f5866eef5ffd4d949b8c6d7f1451b563536a6e
Co-authored-by: imhappi
PiperOrigin-RevId: 523453145
Resolves https://github.com/material-components/material-components-android/issues/2223
Add `TextInputLayout.setErrorAccessibilityLiveRegion` and `TextInputLayout.getErrorAccessibilityLiveRegion` to allow controlling the way the TextInputLayout error is announced.
Example:
```
textInputLayout.setErrorAccessibilityLiveRegion(ViewCompat.ACCESSIBILITY_LIVE_REGION_NONE);
```
PiperOrigin-RevId: 497323465
Saving/restoring themeable fields will cause problems when the view is recreated, because those fields will be restored to the value resolved from the context before the recreation, instead of the current context. For example, when the device locale changes, those fields will still be restored to the previous locale instead of the new one.
It's a general practice in Android framework and AndroidX not to save/restore themeable fields. If clients need this, they should implement their own logic.
Resolves https://github.com/material-components/material-components-android/issues/2075
PiperOrigin-RevId: 454708278
Ensure the CoL can scroll to the bottommost elements of the scrolling child, which may not be visible due to the app bar.
Also, set the node info properties to expose the CoL to auto-scrolling.
PiperOrigin-RevId: 447596411
Before, when swiping with TalkBack on, the placeholder text would be mistakenly announced. This change makes it so it's only announced when it appears, for API >= 16. It's still announced as part of the description announcement when the text field is selected, as before, so it's still accessible for APIs < 16.
PiperOrigin-RevId: 404871534
When BottomSheetBehavior is set to not draggable, it's still forwarding touch event to ViewDragHelper, which causes ViewDragHelper changes its state to dragging although it's not really dragging. This causes bugs like if we change draggable to true during "no-effect" dragging, ViewDragHelper won't report the dragging state change because it thinks the state is not changing.
Fixes this by avoiding forwarding touch events to ViewDragHelper when it's not draggable, so its state won't be changed.
Resolves https://github.com/material-components/material-components-android/issues/2258
PiperOrigin-RevId: 384942764
If startIconTint is a plain color, refreshStartIconDrawableState() won't update the tint to the new drawable. To solve the issue and make the logic be consistent, calls applyStartIconTint() when a new icon is set.
Resolves https://github.com/material-components/material-components-android/issues/2141
PiperOrigin-RevId: 383632467
GridView used to display days in months can be scrolled when there are more rows
than the space can contain. Usually this happens when a month spans over 6 rows. In this case, the position of the day in a month will not be the same as its corresponding view position in the grid view. This can cause:
1. Wrong day view being highlighted.
2. Crashes due to out-of-bound index. (The day position can be larger than view
counts due to invisible days.)
PiperOrigin-RevId: 379382943
The listeners were deprecated in favor of `NavigationBarView#OnItemSelectedListener` and `NavigationBarView#OnItemReselectedListener`, but deprecation documentation was never added, so it's unclear what developers should use instead.
Also removed internal usages of these deprecated usages in the catalog and in tests.
PiperOrigin-RevId: 378021534
Currently Snackbar.make() will use the context of the parent view (typically CoordinatorLayout or decor content view) to inflate the Snackbar view. This is not desirable for cases where there may be a ContextThemeWrapper below that parent view, e.g. for a Fragment that uses material theme.
The behavior of existing methods without Context argument remain unchanged.
PiperOrigin-RevId: 340286851
*** Reason for rollback ***
[TabLayout] Roll forward with dot indicator fix
*** Original change description ***
Automated g4 rollback of changelist 337092676
PiperOrigin-RevId: 337484043
*** Reason for rollback ***
Roll forward with fix
*** Original change description ***
Automated g4 rollback of changelist 336704515
PiperOrigin-RevId: 337092676