697 Commits

Author SHA1 Message Date
ldjesper
eb6aec99b1 Add a button bar to control the current month to MaterialCalendar.
PiperOrigin-RevId: 245057453
2019-04-29 15:34:06 -07:00
dniz
d5ab5910dc Update Bottom Navigation to default to surface style in Dark Theme
PiperOrigin-RevId: 245041248
2019-04-29 15:31:01 -07:00
dniz
5249f54ab1 Update AppBarLayout and ActionBar to default to surface style in Dark Theme
Also update Dark Theme colorPrimaryDark to be #000000 to match

PiperOrigin-RevId: 245028116
2019-04-29 15:30:11 -07:00
melaniegoetz
e53eff870f Api to allow for corner transition animations in BottomSheet to be disabled for testing
PiperOrigin-RevId: 244924319
2019-04-29 15:29:15 -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
isabellekim
ff90193b32 Update baseline surface, background, error, primary variant, and secondary variant colors for dark themes.
PiperOrigin-RevId: 244882440
2019-04-29 15:25:59 -07:00
ldjesper
afad587e69 Replace custom listener in MonthFragment with standard OnClickListener. Use MonthPagerAdapter only as a pass-through for the Calendar listener instead of creator.
PiperOrigin-RevId: 244719218
2019-04-29 15:25:11 -07:00
connieshi
9d73854a97 Add SavedState for BadgeDrawable.
PiperOrigin-RevId: 244672502
2019-04-29 15:20:48 -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
ldjesper
946dfad19d Limit scopes to package from public when possible
PiperOrigin-RevId: 244663611
2019-04-29 15:14:13 -07:00
dniz
3ffa3d2ccd Update BottomSheetBehavior to check API level before reading elevation attribute
PiperOrigin-RevId: 244660854
2019-04-29 15:13:13 -07:00
gauthams
c42eb1e239 Add support for end-aligned iconGravity in MaterialButton
PiperOrigin-RevId: 244431572
2019-04-19 22:07:04 -04:00
ldjesper
b92e18b9eb Page Months with a ViewPager
PiperOrigin-RevId: 244395413
2019-04-19 22:02:35 -04:00
dniz
18f30248c1 Add ElevationOverlayProvider util method for getting surface color with overlay
Also rename getColorSurface method to getSurfaceColor

PiperOrigin-RevId: 244392744
2019-04-19 22:00:45 -04:00
ldjesper
39895914a6 Remove InYear naming
PiperOrigin-RevId: 244357311
2019-04-19 21:58:53 -04:00
marianomartin
e525d5226e BEGIN_PUBLIC
Remove bottomsheet behavior from widget package

END_PUBLIC

PiperOrigin-RevId: 244226096
2019-04-19 21:53:07 -04: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
melaniegoetz
dbb96b109e Add DayNight Themes for BottomSheetDialog
PiperOrigin-RevId: 244102278
2019-04-19 21:48:31 -04:00
melaniegoetz
3db852c67a Update BottomSheetBehavior elevation
PiperOrigin-RevId: 244101048
2019-04-19 21:41:24 -04:00
ldjesper
f2bc99b468 Switch from a pass through click listener to a listener pattern on MaterialCalendar.
This pattern keeps change notification near the change and is more resilient to code based selection changes.

PiperOrigin-RevId: 244081299
2019-04-19 21:37:09 -04:00
leticiars
aa84ca93be Creating EndIconDelegate abstract class and subclasses to refactor how TextInputLayout initialize its end icons.
PiperOrigin-RevId: 244058404
2019-04-19 21:35:40 -04:00
ldjesper
24a2502e15 Split windowBackground into pre-21
PiperOrigin-RevId: 244055856
2019-04-19 21:30:42 -04:00
afohrman
6b055ffbeb Automated g4 rollback of changelist 243898425
PiperOrigin-RevId: 244049761
2019-04-19 21:29:34 -04:00
ldjesper
59070cc111 Simplified the redundant naming of MaterialAttributes static methods.
Added default values for non-throw cases.
Avoid returning TypedValue to simplify code using the helper methods.

PiperOrigin-RevId: 244007695
2019-04-19 21:27:28 -04:00
leticiars
ce59247330 Adding padding support for MaterialShapeDrawable.
PiperOrigin-RevId: 243997071
2019-04-19 21:24:40 -04:00
afohrman
9dfecb6e36 Support elevation overlays for Navigation Drawers.
This sets the default elevation for Widget.MaterialComponents.NavigationView to 16dp instead of 0dp.

PiperOrigin-RevId: 243898425
2019-04-19 21:23:04 -04:00
Material Design Team
2f3e1c4cf4 Add new MODE_AUTO setting for TabLayout. MODE_AUTO behaves like MODE_FIXED with GRAVITY_CENTER while the tabs fit in the content view. Once the tabs expand beyond the TabLayout width, the TabLayout behaves as MODE_SCROLLABLE.
PiperOrigin-RevId: 243852684
2019-04-19 21:21:27 -04:00
ldjesper
b2aa764e38 Default Dialog windowBackground color to colorSurface for darkmode pickers.
PiperOrigin-RevId: 243849451
2019-04-19 21:14:52 -04:00
ldjesper
a94152a475 Change GM Dialog elevation to 6dp (which improves text contrast) and correct theme loading order such that materialAlertDialogTheme correctly overrides attributes in alertDialogTheme.
PiperOrigin-RevId: 243708330
2019-04-19 21:09:36 -04:00
gauthams
163c0ed3f5 Update ExtendedFAB to support setting corner radius via shape appearance
PiperOrigin-RevId: 243677036
2019-04-19 21:07:37 -04:00
afohrman
ed4260f5fb Use the framework's setFitsSystemWindows method rather than the deprecated ViewUtils version.
PiperOrigin-RevId: 243667717
2019-04-19 21:06:28 -04:00
afohrman
6e98554a8c Remove unnecessary return tag in NavigationView#getCheckedItem().
The @return tag is redundant; return tags are not required in cases where the tag does not add value.

PiperOrigin-RevId: 243663808
2019-04-19 21:05:32 -04:00
cketcham
6b1459d557 Add generic type for FloatingActionButton TransformationListener
PiperOrigin-RevId: 243652927
2019-04-19 21:02:55 -04:00
dniz
1f244318d8 Add @hide to all @RestrictTo annotations that are missing it
PiperOrigin-RevId: 243646339
2019-04-19 16:29:30 -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
gauthams
64ad735c12 Add MaterialButtonToggleGroup docs
PiperOrigin-RevId: 243345601
2019-04-19 16:22:36 -04:00
connieshi
248e71adb7 Refactor logic to set BadgeDrawable's bounds into its own method.
PiperOrigin-RevId: 243326170
2019-04-19 15:59:16 -04:00
connieshi
ac1b2a0a26 Add javadoc for BadgeDrawable.
PiperOrigin-RevId: 243312323
2019-04-19 15:58:20 -04:00
Material Design Team
18b8ddaf23 Automated g4 rollback of changelist 243269991
PiperOrigin-RevId: 243279282
2019-04-19 15:57:35 -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
marianomartin
100d66cc25 Exclude BottomSheetBehavior from widget package
PiperOrigin-RevId: 243269991
2019-04-19 15:55:49 -04:00
dniz
1889b9fed6 Add support for translationZ to MaterialShapeDrawable
Useful for animating elevation shadows in Light themes and elevation overlays in Dark Themes

PiperOrigin-RevId: 243260129
2019-04-19 15:54:27 -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
Material Design Team
6096d60959 Roll Forward of CL 242858439
PiperOrigin-RevId: 243197143
2019-04-19 15:48:51 -04:00
gauthams
c384ec5423 Add elevation overlay support to TabLayout
PiperOrigin-RevId: 243131594
2019-04-19 15:48:05 -04:00
connieshi
b7e252cea4 Update javadoc for MaterialColors#layer(CSL, CSL) to warn about states being dropped.
PiperOrigin-RevId: 243120366
2019-04-19 15:43:20 -04:00
ldjesper
9809b797bf Shrink inset margins for landscape mode of dialogs
PiperOrigin-RevId: 243103737
2019-04-19 15:42:29 -04:00
dniz
249e6f5281 Implement new MaterialToolbar class that provides support for Dark Theme elevation overlays, if not using AppBarLayout
PiperOrigin-RevId: 243054730
2019-04-19 15:37:34 -04:00
connieshi
574157e153 Fix chip background color state bug:
PiperOrigin-RevId: 243047644
2019-04-19 15:35:58 -04:00