By default, badges are fixed at their start edge (meaning they grow towards the end). If using a badgeGravity corresponding to the start, you will need to update to badgeFixedEdge=end to maintain the same grow towards the start behavior as before
PiperOrigin-RevId: 632236586
Fixes failures in `material3` and `tiles` by opting in.
Fixes failures in `media3` and `protolayout` by disabling the check. This is not ideal, since it does not enable cross-language checks, but it is no worse than it was before.
Adds explicit `kotlin-stdlib` dependency where it was previously implicitly included by a poorly-configured `annotation-experimental` target.
Removes explicit `proguard.txt` reference from Car build, since it is already included in the AAR.
PUBLIC: Handle calls to @RequiresOptIn-annotated APIs
PiperOrigin-RevId: 584657528
- 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
This CL fixes a couple of badge state related issues. First, it prevents the badges created before restoring instance states from being overwritten by the old instance states. Second, it makes badges reload their default style settings everytime when its being recreated so if the environment has been changed, the default values will reflect the environment change.
This CL also fixes that several attributes were not correctly saved/restored or their default values were not correctly loaded.
Resolves https://github.com/material-components/material-components-android/issues/2032
PiperOrigin-RevId: 420096508
Added switch to toggle show/hide edit menu item and added button to increment badge number.
Moved logic to add badgedrawable to onCreateOptionsMenu so that a new badgedrawable is NOT added every time onPrepareOptionsMenu is called (e.g. opening the overflow menu)
Resolves https://github.com/material-components/material-components-android/issues/2129
PiperOrigin-RevId: 365033209
In <API18, BadgeDrawable will dynamically 1) wrap the anchor in a FrameLayout and 2) replace the anchor with the FrameLayout in the anchor' view hierarchy. BadgeDrawable will set itself as foreground on the FrameLayout.
If the user does not want BadgeDrawable to manipulate its view hierarchy, the user can pass in an instance of FrameLayout `customBadgeParent` in #attachBadgeDrawable instead.
Labeled BadgeUtils as experimental and removed the RestrictedTo(Scope.Library) annotation.
Updated TopAppBar main demo to show a badge on a toolbar menu item.
PiperOrigin-RevId: 336306885
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