connieshi
c7d21aec95
Convenience wrapper method for Drawable#setVisible(boolean, boolean) with the second parameter hardcoded to false.
...
PiperOrigin-RevId: 249981625
2019-05-29 15:43:19 -04:00
connieshi
ddc56c800d
Add convenience method to check if VERSION.SDK_INT < VERSION_CODES.JELLY_BEAN_MR2 in BadgeUtils.
...
PiperOrigin-RevId: 249855393
2019-05-24 14:28:16 -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
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
71f0a71cc9
s/StringRes/PluralsRes
...
Add null check before trying to use the PluralsRes containing savedState.contentDescriptionQuantityStrings
PiperOrigin-RevId: 246203433
2019-05-03 10:55:18 -04:00
connieshi
7a4ecb0392
Update TextDrawableHelper's constructor to take a delegate.
...
Update ChipDrawable and BadgeDrwable to pass a delegate when they instantiate TextDrawbleHelper.
PiperOrigin-RevId: 245469285
2019-04-29 15:56:31 -07: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
9d488d9208
Begin integrating BadgeDrawable into BottomNavigationView.
...
TODO:
- update javadocs to provide guidance on how to interact with BottomNavigation + Badging.
- Save badge states.
- Support displaying badges when bottom navigation item doesn't show an icon.
PiperOrigin-RevId: 244197244
2019-04-19 21:51:25 -04:00
connieshi
fd9d884acb
Update BadgeDrawable to have public scope.
...
Update #getNumber to return non-negative integers.
Replace internal references to getNumber() with 'number' field when comparing to ICON_BADGE_NUMBER.
PiperOrigin-RevId: 243633143
2019-04-19 16:28:30 -04:00
connieshi
29f132bcd3
Remove unused methods for getting a badge's default background and text color.
...
PiperOrigin-RevId: 243615474
2019-04-19 16:26:59 -04:00
connieshi
ac1b2a0a26
Add javadoc for BadgeDrawable.
...
PiperOrigin-RevId: 243312323
2019-04-19 15:58:20 -04:00
connieshi
94dbf74f08
Add a convenience method to create an instance of BadgeDrawable with default values.
...
PiperOrigin-RevId: 243272352
2019-04-19 15:56:48 -04:00
connieshi
44f26a8d30
Simplify BadgeDrawable's constructor to not require anchor view or custom parent view.
...
PiperOrigin-RevId: 243259902
2019-04-19 15:50:59 -04:00
connieshi
a2c5d8956d
Add static methods to return BadgeDrawable's default background and text color for the specified context.
...
PiperOrigin-RevId: 242111627
2019-04-05 16:01:05 -04:00
connieshi
37a62a805b
s/clearBadgeValue/clearBadgeNumber
...
PiperOrigin-RevId: 240199703
2019-03-26 17:35:00 -04:00
connieshi
e4e6052713
Refactor BadgeDrawable so its center coordinates can be updated.
...
PiperOrigin-RevId: 239433981
2019-03-22 17:02:02 -04:00
connieshi
c6ce174cb8
Call Resources#getDimensionPixelSize instead of Resources#getDimenion.
...
PiperOrigin-RevId: 238480749
2019-03-22 16:09:54 -04:00
connieshi
b9112b2811
Viewoverlay is only available on API 18+. To support pre API-18, change BadgeDrawable to inherit from Drawable instead of MaterialShapeDrawable. Instead, add an instance of MaterialShapeDrawable as a member variable to BadgeDrawable.
...
PiperOrigin-RevId: 238289676
2019-03-22 16:06:49 -04:00
connieshi
9594f64985
Implement basic layout and drawing functionality for BadgeDrawable.
...
PiperOrigin-RevId: 237500680
2019-03-22 15:55:00 -04:00
isabellekim
db94f66f86
Updating MDC library build files to add testing of each target.
...
PiperOrigin-RevId: 235203056
2019-02-24 14:35:32 -05: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