37 Commits

Author SHA1 Message Date
Material Design Team
2f3d4f9efe [Docs] Updated the nomenclature of images and removed unused images.
PiperOrigin-RevId: 791194140
2025-08-08 17:46:44 +00:00
Material Design Team
7a189d5a2e [Badges] Restructure the documentation for clarity.
PiperOrigin-RevId: 784014681
2025-07-17 20:46:21 +00:00
Material Design Team
a1e2f9e31f [Docs] Updated Badges doc to make it more user friendly
PiperOrigin-RevId: 772821066
2025-06-18 14:20:21 +00:00
pubiqq
9a39e222d8 [Docs] Fix anchors.
Resolves https://github.com/material-components/material-components-android/pull/4015

GIT_ORIGIN_REV_ID=0b4097653df971659ed1526e450bc40030f502e3
PiperOrigin-RevId: 634017580
2024-05-16 14:03:41 +00:00
rightnao
9451acdb05 [Badge] Add badgeFixedEdge attribute to BadgeDrawable.
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
2024-05-13 15:48:21 +00:00
rightnao
0d265b7ca5 [Badge] Deprecate autoAdjustToGrandparentBounds attribute since now badges automatically move within first ancestor view that does not clip children
PiperOrigin-RevId: 630215388
2024-05-03 19:29:13 +00:00
rightnao
1785bbfabe [Docs] Cross-reference m.io and DAC in Github docs
PiperOrigin-RevId: 546035020
2023-07-07 17:50:11 +00:00
rightnao
27abfdba4f [Badge] Deprecate bottom badge gravities and update docs and usages in catalog
PiperOrigin-RevId: 543527285
2023-06-27 18:55:22 +00:00
rightnao
2362f4b64b [Badge][NavigationRail] Add new attribute for vertical offset when font is large
PiperOrigin-RevId: 542366571
2023-06-26 23:37:57 +00:00
pubiqq
44a97f4a83 [Badge] Fix table formatting and remove unnecessary badge invalidation
Resolves https://github.com/material-components/material-components-android/pull/3356

GIT_ORIGIN_REV_ID=9f6839aa225d567a26a7db948734c28a1bbae44a
PiperOrigin-RevId: 526735605
2023-04-25 17:06:16 -04:00
pubiqq
4d50aa41e7 [Badge] Badge cleanup/fixes:
- 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
2023-04-13 09:05:14 -07:00
rightnao
b706506c3d [Badge] Add attribute to automatically adjust badge so that it is within the anchor view's grandparent view's bounds
PiperOrigin-RevId: 523171594
2023-04-11 20:00:06 -07:00
rightnao
a0d0b53472 [Badge] Add getters/setters for vertical and horizontal badge padding
PiperOrigin-RevId: 520969935
2023-03-31 18:35:53 +00:00
pubiqq
c1ef52b8ea [Badge] Allow text strings in badges
Resolves https://github.com/material-components/material-components-android/pull/2978
GIT_ORIGIN_REV_ID=39c9f60cff607fba1e9ca57ae8bc155c5919e503
Co-authored-by: imhappi
PiperOrigin-RevId: 520368686
2023-03-29 19:18:22 +00:00
rightnao
e75654d4c2 [BadgeDrawable][Docs] Fix doc formatting for github
PiperOrigin-RevId: 513573599
2023-03-03 16:26:12 +00:00
rightnao
2ddcfe46b7 [Badge] Add shape appearance for badges
PiperOrigin-RevId: 512137782
2023-02-27 20:46:06 +00:00
rightnao
c1eba1b268 [Badge][Docs] Update badge images
PiperOrigin-RevId: 511808980
2023-02-23 10:31:34 -08:00
rightnao
3c1ac05fac [Badge] Update M3 style to match specs. Alignment tweaks, text appearance change
resolves https://github.com/material-components/material-components-android/issues/3175

PiperOrigin-RevId: 506426087
2023-02-02 16:50:22 +00:00
rightnao
d0d0f54018 [Badge] Add new 'offsetAlignmentMode' attribute that determines where the offset starts for the badge.
PiperOrigin-RevId: 505222416
2023-01-30 16:43:42 +00:00
Material Design Team
7cad365ebb [M3][Docs] Update BadgeDrawable developer documentation
PiperOrigin-RevId: 399518697
2021-09-29 09:59:34 -04:00
dsn5ft
6ae5c9cb62 [M3][Docs] Update format of remaining Notes in docs to be consistent
PiperOrigin-RevId: 398734303
2021-09-24 18:10:32 +00:00
dsn5ft
760effb893 [Docs][Badge] Move badge assets into directory to be consistent with other components, and delete unused image
PiperOrigin-RevId: 392964548
2021-08-26 14:41:51 -04:00
leticiars
13cd0febf8 [Documentation] Updated link name.
PiperOrigin-RevId: 351802572
2021-01-14 13:09:30 -05:00
nickrout
e95aa2ba05 [Documentation] Prepared component docs for material.io update.
PiperOrigin-RevId: 345682770
2020-12-04 13:16:31 -05:00
connieshi
9487c33b8a Automated g4 rollback of changelist 336347365
PiperOrigin-RevId: 336978123
2020-10-15 13:23:56 -07:00
Material Design Team
0f717f8cce Automated g4 rollback of changelist 336306885
PiperOrigin-RevId: 336347365
2020-10-15 13:01:02 -07:00
connieshi
5e35d14c18 [Badge] Update badge to support being anchored to any view in pre 18.
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
2020-10-15 12:31:14 -07:00
nickrout
9e032f8b2d [Documentation] Updating Tabs doc.
PiperOrigin-RevId: 319176877
2020-07-06 11:07:47 -04:00
leticiars
e4da6b4ec9 [Documentation] Cleanup.
PiperOrigin-RevId: 318856706
2020-06-29 16:19:40 -04:00
leticiars
4a8e005755 [Documentation] Updating bottom navigation documentation.
PiperOrigin-RevId: 308622502
2020-04-27 17:27:22 -04:00
leticiars
f494ed33b2 Updating documentation.
PiperOrigin-RevId: 277275402
2019-11-01 13:28:40 -07:00
leticiars
dbe9713d71 Cleanup
PiperOrigin-RevId: 277061944
2019-11-01 13:28:40 -07:00
connieshi
e1248f8771 Update BadgeDrawable's documentation to include information about badge's gravity mode.
PiperOrigin-RevId: 259775790
2019-07-24 15:11:50 -04:00
dniz
b8e36648d4 Add BadgeDrawable Javadoc link to component doc
PiperOrigin-RevId: 259539388
2019-07-23 11:24:27 -04:00
connieshi
721342f394 Fix path in documentation.
PiperOrigin-RevId: 246915530
2019-05-06 19:28:24 -04:00
connieshi
488f4873bb Add note about BadgeDrawable being under development and not supporting the full range of customization expected of a Material Android component. (e.g. themed attributes)
PiperOrigin-RevId: 246891342
2019-05-06 19:27:34 -04:00
connieshi
058dd0739d Add BadgeDrawable documentation. Update Bottom Navigation documentation to include information about badges.
PiperOrigin-RevId: 246309667
2019-05-03 10:57:40 -04:00