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