60 Commits

Author SHA1 Message Date
marianomartin
215a839598 Internal cleanup
PiperOrigin-RevId: 267504117
2019-09-12 13:48:16 -04:00
marianomartin
0d4515cb46 Internal cleanup
PiperOrigin-RevId: 265971745
2019-08-29 14:59:20 -04:00
cketcham
08a26c929e Add @NonNull and @Nullable annotations
PiperOrigin-RevId: 264750215
2019-08-26 11:21:15 -04:00
connieshi
c14dee1440 Add null check before trying to find the item view associated with a badge id.
PiperOrigin-RevId: 261694373
2019-08-06 14:25:55 -04:00
connieshi
276bec8385 Update BottomNavigation to respect bottom system insets
PiperOrigin-RevId: 260031378
2019-07-29 16:35:59 -04:00
dniz
cc73c2a630 Update TODOs
PiperOrigin-RevId: 259535844
2019-07-23 11:21:39 -04:00
dniz
0512f776c5 Remove sub-package AndroidManifest.xml files from lib directory
PiperOrigin-RevId: 258390736
2019-07-16 13:18:32 -04:00
isabellekim
a628bf516b Revert the library to compile with Java 7: revert lambdas, add necessary casts, and make some variables final.
Continue compile shrine demo, catalog, and tests with Java 8.

PiperOrigin-RevId: 257874888
2019-07-15 19:19:23 -04:00
Material Design Team
c42b77fdad Do not unconditionally override icon tint in BottomNavigationItemView.
PiperOrigin-RevId: 257828981
2019-07-15 19:14:14 -04:00
dniz
68ddfee0ed Remove Material's legacy androidx core_ui and core_utils dependencies in favor of more granular dependencies (coordinatorlayout, graphics, interpolator, customview)
PiperOrigin-RevId: 257452569
2019-07-10 15:17:12 -04:00
dniz
37534561f2 Add component styles that swap between primary and surface styles depending on light vs dark theme
Makes it easier for devs to implement: https://material.io/design/color/dark-theme.html#custom-application

PiperOrigin-RevId: 256208965
2019-07-03 14:11:49 -04:00
marianomartin
152f05adbc Internal cleanup
PiperOrigin-RevId: 256180803
2019-07-03 14:09:17 -04:00
marianomartin
164bf0fabd Internal cleanup
PiperOrigin-RevId: 255609320
2019-07-03 14:02:53 -04:00
dniz
5df3bebd63 Update elevation overlays to be based absolute elevation, factoring in the elevation of all parent views
Will follow-up with TabLayout absolute elevation separately

Resolves https://github.com/material-components/material-components-android/issues/381

PiperOrigin-RevId: 255404830
2019-07-03 13:55:49 -04:00
ataulm
c045cca69d [BottomNavigation] Add tooltip fallback to Bottom Navigation item titles
Resolves https://github.com/material-components/material-components-android/pull/409

GIT_ORIGIN_REV_ID=c6cbfcc4ff9cf7c0fa48a929f7950848f5b9dd8e
PiperOrigin-RevId: 254824856
2019-06-24 17:33:01 -04:00
marianomartin
2de39fafe0 Internal cleanup
PiperOrigin-RevId: 253799644
2019-06-18 13:57:49 -04:00
connieshi
ee913784dc Rename BottomNavigationView#showBadge to BottomNavigationView#getOrCreateBadge(). No longer ensures that the badge is visible. User should call BadgeDrawable#setVisible(boolean).
PiperOrigin-RevId: 253231582
2019-06-18 13:28:31 -04:00
cketcham
bff75f2d3e Update to lamdas
PiperOrigin-RevId: 252846439
2019-06-18 13:21:02 -04:00
connieshi
6aab297f53 Remove context parameter from BadgeDrawable#getContentDescription(Context)
PiperOrigin-RevId: 251492075
2019-06-10 08:55:30 -07:00
connieshi
a9f135b882 Only set clipPadding and clipChildren to false when BottomNavigationItemView is going to display a badge.
PiperOrigin-RevId: 249981675
2019-05-29 15:49:15 -04:00
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
marianomartin
455ba2557b Internal cleanup
PiperOrigin-RevId: 249490219
2019-05-24 14:22:06 -04:00
Material Design Team
3c5f9f6cb0 Migrate CoordinatorLayout android support libraries to androidx
PiperOrigin-RevId: 248819271
2019-05-21 12:03:28 -04:00
connieshi
fc109fa13b Save badge states in BottomNavigationMenuView.
PiperOrigin-RevId: 245446090
2019-04-29 15:54:12 -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
afohrman
d77864bbbf Support ColorDrawables as the basis for MaterialShapeDrawable initialization in
BottomNavigationView.

This commit removes backgroundTint from the BottomNavigationView styles and instead sets the respective default colors as ColorDrawable backgrounds of the BottomNavigationView. This allows BottomNavigationView to respect colors set in android:background without requiring the client to override backgroundTint.

PiperOrigin-RevId: 244669964
2019-04-29 15:16:23 -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
7d8b2117a0 Automated g4 rollback of changelist 242675939
PiperOrigin-RevId: 242751222
2019-04-19 13:26:30 -04:00
connieshi
00ffe5eea8 Begin integrating BadgeDrawable into BottomNavigationView.
TODO:
- update javadocs to provide guidance on how to call Badging API.
- Save badge states.
- Support displaying badges when bottom navigation item doesn't show an icon.
PiperOrigin-RevId: 242675939
2019-04-19 13:21:35 -04:00
Material Design Team
41274ddb1f Migrate transition android support libraries to androidx.
PiperOrigin-RevId: 239881112
2019-03-26 17:30:06 -04:00
dniz
833258417d Add @RequiresApi(VERSION_CODES.LOLLIPOP) to overriden setElevation() methods
that call super.setElevation()

PiperOrigin-RevId: 239171863
2019-03-22 16:50:21 -04:00
afohrman
a1f6a72f38 Update BottomNavigationView's Widget.MaterialComponents style variants to use
MaterialShapeDrawable.

PiperOrigin-RevId: 238732527
2019-03-22 16:18:56 -04:00
afohrman
d6cb34970a Support elevation overlays for BottomNavigationView.
PiperOrigin-RevId: 238729801
2019-03-22 16:17:46 -04:00
Material Design Team
aae325e6b4 Migrate interpolator android support libraries to androidx.
PiperOrigin-RevId: 237401244
2019-03-08 10:11:23 -05:00
isabellekim
6c3b51022e Adds itemRippleColor attribute to the BottomNavigationView as an alternative for itemBackground to support using ripples based on theme attributes pre-23. And update BottomNavigationView ripples to match TabLayout ripples.
PiperOrigin-RevId: 235237859
2019-02-24 14:37:45 -05:00
dniz
11df79f95c Clean up Gradle build shorthands for appcompat/androidx libraries
PiperOrigin-RevId: 229369959
2019-01-18 14:13:26 -05:00
marianomartin
51bee714f6 Preserve icon after updating menus in BottomNav
PiperOrigin-RevId: 228525610
2019-01-10 17:11:43 -05:00
isabellekim
0055c665af Remember the selected item when adding items to BottomNavigation's menu
PiperOrigin-RevId: 227140261
2019-01-10 15:53:25 -05:00
isabellekim
bd994a109a Update icon tint alpha for colored BottomNav to be 0.6 per spec.
PiperOrigin-RevId: 227056603
2019-01-10 15:50:41 -05:00
marianomartin
6a7b1b2ce2 Mutate background drawable before changing tint
PiperOrigin-RevId: 226181425
2018-12-21 11:25:39 -05:00
cketcham
dc72aaeed4 Migrate Gradle build and sources to androidx
PiperOrigin-RevId: 225551505
2018-12-21 11:07:45 -05:00
marianomartin
a083017520 Add backgroundTint support to BottomNav
PiperOrigin-RevId: 225384496
2018-12-21 10:41:14 -05:00
isabellekim
fa528c4403 Remove padding from large text for BottomNavigation to match small text. Guidance is to use short text in bottom navigation so this should not have a visual effect since the width of each item is equally divided with a max width (in other words, the padding doesn't affect the width). However, when system font size is increased, even short text can be cut off by the padding and this gives a little more room for the text.
PiperOrigin-RevId: 224345637
2018-12-06 12:07:07 -05:00
isabellekim
e8cb537a6e Update color state lists for bottom navigation items to match specs.
PiperOrigin-RevId: 217318149
2018-10-28 18:13:08 -04:00
isabellekim
fdbf02569b Ensures that bottom navigation item background Drawables don't share the same constant state.
PiperOrigin-RevId: 216355891
2018-10-11 18:13:32 -04:00
marianomartin
1536adecf2 Fix color subsystem for Bottom Navigation
PiperOrigin-RevId: 210544385
2018-08-28 16:42:21 -04:00
marianomartin
7e3ec00320 Fix broken gradle build because of duplicated attr
PiperOrigin-RevId: 209415765
2018-08-20 11:33:06 -04:00
marianomartin
ba696b6984 Verify typography subsystem is complete for Bottom Navigation
PiperOrigin-RevId: 204798141
2018-07-17 18:09:19 -04:00
afohrman
5b2d4d667a Allow bottom nav items to gain focus on keyboard traversal.
Set the bottom nav items to always be focusable. This addresses a bug in which bottom nav items didn't gain focus by keyboard pre-O.

PiperOrigin-RevId: 204518309
2018-07-17 18:08:53 -04:00