pekingme
8204856dd4
[Token][Color] Upgraded to v0.170 for tonal surface colors.
...
PiperOrigin-RevId: 555230534
2023-08-09 19:03:25 +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
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
8499b83ba1
[BadgeDrawable] Add padding in between top and bottom edges of badge and text
...
PiperOrigin-RevId: 518370027
2023-03-21 20:50:42 +00:00
pekingme
9f1caa2c64
[Tokens] Upgraded to v0.162.
...
PiperOrigin-RevId: 517446114
2023-03-20 21:23:07 +00:00
dsn5ft
5689ce2608
[i18n] Update string translations
...
PiperOrigin-RevId: 513006191
2023-02-28 22:08:20 +00:00
rightnao
68c844c91d
[Badge] Integrating tokens
...
PiperOrigin-RevId: 512186562
2023-02-27 20:47:02 +00:00
rightnao
2ddcfe46b7
[Badge] Add shape appearance for badges
...
PiperOrigin-RevId: 512137782
2023-02-27 20:46:06 +00: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
pekingme
23dc14ca3a
[Tokens] Updated to v0.157.
...
PiperOrigin-RevId: 505978081
2023-01-31 20:01:13 +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
pekingme
2019bf90be
[Tokens] Upgraded to version v0.147.
...
PiperOrigin-RevId: 492551875
2022-12-02 18:34:12 -05:00
pekingme
17e3581642
[Tokens] Upgraded to v0.145
...
PiperOrigin-RevId: 492291163
2022-12-02 15:11:37 +00:00
pekingme
8eb4aeb6f8
[Tokens] Internal update.
...
PiperOrigin-RevId: 492290020
2022-12-02 15:03:36 +00:00
pekingme
03bd77fae1
[Badge] Integrated component tokens.
...
PiperOrigin-RevId: 490569205
2022-11-28 17:15:29 -05:00
conradchen
431e291b01
[Translation] Update string translations
...
PiperOrigin-RevId: 443191056
2022-04-20 17:19:02 -04:00
jeremymuhia
786e6b5df7
[M3][Badge] create M3 styles for Badge
...
PiperOrigin-RevId: 393350044
2021-08-27 14:59:36 -04:00
hunterstich
b3b12f9051
Automated g4 rollback of changelist 372931550
...
PiperOrigin-RevId: 375483052
2021-05-24 17:11:44 -07:00
Material Design Team
915336b36c
Automated g4 rollback of changelist 372538097
...
PiperOrigin-RevId: 372931550
2021-05-11 12:55:35 -04:00
hunterstich
bd4914dd8b
[Badge] Support differing offsets for badges with/without text, support badge width and padding in styles.
...
PiperOrigin-RevId: 372538097
2021-05-07 12:25:52 -04:00
haodong
0d0c90b9ef
Updated string translations.
...
PiperOrigin-RevId: 354978993
2021-02-01 11:03:44 -08: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
dniz
23018e1fbf
[Badge] Added string translations for i18n / l10n
...
PiperOrigin-RevId: 334815412
2020-10-01 11:31:44 -04:00
connieshi
47f3bbcec6
Update content description for badge number that exceeds the max supported badge count to say "More than # new notifications" instead of "# and more notifications".
...
PiperOrigin-RevId: 310908097
2020-05-11 15:57:03 -04:00
connieshi
eb65ce5b94
Update badge content description to match badge text displayed (when badge number exceeds max badge number).
...
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
2020-05-01 14:40:16 -04:00
Chaoyang0201
632675e1a8
[BadgeDrawable] add horizontal and vertical offset to control position
...
Resolves https://github.com/material-components/material-components-android/pull/638
Resolves https://github.com/material-components/material-components-android/issues/630
Co-authored-by: wcshi <connieshi@google.com>
GIT_ORIGIN_REV_ID=511c955a11e05fdc0848c74938c4c194da22826e
PiperOrigin-RevId: 275522709
2019-11-01 13:28:23 -07:00
connieshi
d4d0e7f5e9
Update badge gravity enum values to use Gravity values. Add unit test.
...
PiperOrigin-RevId: 268485092
2019-09-12 14:09:30 -04:00
connieshi
31d0c08300
Update BadgeDrawble's center coordinate calculation to alleviate anchor content being overlapped by badge content.
...
Also limit on 1 character to be displayed in a round badge, 2+ characters will now be displayed in a pill shaped badge.
PiperOrigin-RevId: 264904269
2019-08-29 10:19:37 -04:00
connieshi
0558a36c9a
Add support for configuring badge gravity.
...
PiperOrigin-RevId: 259223232
2019-07-22 12:22:00 -04:00
connieshi
ebaccf5a85
Add support for badgeStyle, a theme level style attribute for customizing the appearance of badges.
...
PiperOrigin-RevId: 249338990
2019-05-24 14:16:22 -04:00
connieshi
3ad423e6b9
Update BottomNavigationItemView to include BadgeDrawable's content description.
...
Add setter for numberless and numbered badge content descriptions.
PiperOrigin-RevId: 244910418
2019-04-29 15:28:30 -07:00
connieshi
9d73854a97
Add SavedState for BadgeDrawable.
...
PiperOrigin-RevId: 244672502
2019-04-29 15:20:48 -07:00
connieshi
d195fadce0
Fix typo in formatted string that set the first argument as string instead of decimal.
...
Fix lint warnings.
PiperOrigin-RevId: 242114925
2019-04-05 16:04:19 -04:00
connieshi
9594f64985
Implement basic layout and drawing functionality for BadgeDrawable.
...
PiperOrigin-RevId: 237500680
2019-03-22 15:55:00 -04:00
connieshi
046089cf13
Fix values-21 name spelling error, should be values-v21 instead.
...
PiperOrigin-RevId: 237451216
2019-03-22 15:53:56 -04:00
connieshi
4455d1904c
Add TextAppearance.MaterialComponents.Badge (Roboto Medium 10sp). Intentionally not adding it to res-public/public.xml nor a corresponding theme attribute because it is meant to be used internally by the library only.
...
PiperOrigin-RevId: 237446384
2019-03-22 15:52:59 -04:00
connieshi
59bc6c3ebe
Add boilerplate code (getters, setters, override abstract methods) define custom attributes for new custom drawable, BadgeDrawable.
...
PiperOrigin-RevId: 235037646
2019-02-24 14:30:54 -05:00