625 Commits

Author SHA1 Message Date
ldjesper
1e2bde215d Prevent several calendar views being layed on top of each other on rotation changes
PiperOrigin-RevId: 241933297
2019-04-05 15:50:53 -04:00
ldjesper
35a1401a52 Switch from multiple related extends to an interface
PiperOrigin-RevId: 241870753
2019-04-05 15:50:05 -04:00
Material Design Team
a13ff980a5 Automated g4 rollback of changelist 241720142
PiperOrigin-RevId: 241804673
2019-04-05 15:48:38 -04:00
dniz
6d4ffa29e3 AppBarLayout Dark Theme Elevation Overlays support, including animated overlay for Lift On Scroll
PiperOrigin-RevId: 241791205
2019-04-05 15:47:39 -04:00
afohrman
4476564820 Vertically center the filled text field's expanded label.
PiperOrigin-RevId: 241791031
2019-04-05 15:46:27 -04:00
afohrman
a17e4373ad Delete unused padding resource from text field's dimens.xml file.
This resource is not in the public.xml file. This means that they are not intended to be shipped as part of our library and are fine to delete.

PiperOrigin-RevId: 241732718
2019-04-05 15:45:31 -04:00
Material Design Team
264e816f56 * Add selected (Active) item default background to NavigationView - introducing seven itemShape* attributes for this purpose
PiperOrigin-RevId: 241720142
2019-04-05 15:43:56 -04:00
marianomartin
e275160a1a Internal change.
PiperOrigin-RevId: 241656157
2019-04-05 15:43:05 -04:00
raajkumars
c3e9cb45a0 Updated extended floating action button to turn off word wrapping only if animating expand/shrink action.
PiperOrigin-RevId: 241594089
2019-04-05 15:30:56 -04:00
ldjesper
63cd0d8428 Change CalendarView to a Fragment as it will contain more fragments
PiperOrigin-RevId: 241414776
2019-04-05 15:29:59 -04:00
ldjesper
12a4f2cff5 Switch from Dialog to DialogFragment for Pickers since future view paging changes will require nested Fragments
PiperOrigin-RevId: 241387847
2019-04-05 15:22:59 -04:00
afohrman
abb21b753f Respect shapeAppearance and shapeAppearanceOverlay attributes in Chip.
Chip was setting chipCornerRadius in the style.

The chipCornerRadius attribute takes precedence over shapeAppearance cornerSize attributes in order to respect values previously set by the user. However, including it in the chip style prevents a cornerSize set in a shapeAppearance or shapeAppearanceOverlay from taking effect. This commit removes chipCornerSize from the chip style to respect cornerSize values.

PiperOrigin-RevId: 241014276
2019-04-05 15:19:48 -04:00
afohrman
2fda77a6ab Remove unnecessary shapeAppearanceOverlay from BottomSheet style.
The shapeAppearanceOverlay attribute was not necessary to achieve the rounded 0 shape appearance for the BottomSheet styles. This commit removes the shapeAppearanceOverlay.

PiperOrigin-RevId: 241006967
2019-04-05 15:18:52 -04:00
connieshi
e6f429fe75 Fix bug that ignored Chip#setEnsureMinTouchTargetAttribute(false) once Chip#setEnsureMinTouchTargetAttribute(true) has been called.
Ensure chip width also meets the min touch target size.

PiperOrigin-RevId: 240679599
2019-04-05 15:17:59 -04:00
afohrman
ad017d9c09 Adjust card widget style.
PiperOrigin-RevId: 240638576
2019-04-05 15:14:55 -04:00
ldjesper
30c15174a1 Add a helper method to resolve min touch target size (defaults 48dp)
PiperOrigin-RevId: 240622378
2019-04-05 15:13:25 -04:00
dniz
760a99f883 Enable Elevation Overlays for Dark Themes and update surface colors to match spec
PiperOrigin-RevId: 240425682
2019-03-26 17:35:50 -04:00
connieshi
37a62a805b s/clearBadgeValue/clearBadgeNumber
PiperOrigin-RevId: 240199703
2019-03-26 17:35:00 -04:00
connieshi
b544530ac0 Update Chip's background / surface color state lists to support state_checked as well.
PiperOrigin-RevId: 240128475
2019-03-26 17:33:09 -04:00
afohrman
17195e41d1 Add documentation to public methods in ShapeAppearanceModel.
Some public methods were missing documentation.

Also remove unnecessary hyphenation from methods that used hyphenation to describe the corner treatment positioning (ex: top-left -> top left).

PiperOrigin-RevId: 239882358
2019-03-26 17:31:59 -04:00
Material Design Team
41274ddb1f Migrate transition android support libraries to androidx.
PiperOrigin-RevId: 239881112
2019-03-26 17:30:06 -04:00
gauthams
3f2d205344 Log a warning rather than an info when setting background on a MaterialButton.
PiperOrigin-RevId: 239880506
2019-03-26 17:29:07 -04:00
melaniegoetz
5aebe1a111 API to set height of a half expanded sheet, in proportion to parent height
PiperOrigin-RevId: 239689682
2019-03-22 17:04:58 -04:00
gauthams
abbec48ce6 Add MotionSpec support to ExtendedFloatingActionButton
PiperOrigin-RevId: 239682035
2019-03-22 17:04:12 -04:00
raajkumars
3f43a2aa3e Updated FloatingActionButton to support dark theme elevation overlays.
PiperOrigin-RevId: 239611087
2019-03-22 17:03:35 -04:00
Chris Banes
0425d3b475 Fix CollapsingToolbarLayout title bounds
Caused by AppBarLayout + WindowInset commit, which breaks some incorrect
assumptions in CTL. Fixed by breaking apart ViewOffsetHelper
so that its tracking of layout coordinates, and applying
offsets, are done at different times.

Also fixed catalog's AppBar sample layouts to set IDs,
enabling state restoration to work.

PiperOrigin-RevId: 239592953
2019-03-22 17:02:58 -04:00
connieshi
e4e6052713 Refactor BadgeDrawable so its center coordinates can be updated.
PiperOrigin-RevId: 239433981
2019-03-22 17:02:02 -04:00
marianomartin
05bc55723a Add a way to disable min touch target size in fab
PiperOrigin-RevId: 239395098
2019-03-22 17:00:43 -04:00
gauthams
b3793edd2c Add initial support for reading values in MotionSpec
PiperOrigin-RevId: 239298785
2019-03-22 17:00:03 -04:00
cketcham
0ce688ddf2 Automated g4 rollback of changelist 239207045
PiperOrigin-RevId: 239229246
2019-03-22 16:55:47 -04:00
leticiars
efc7f37699 Fixing bug of single hex color values set in the XML not being read for icons tint lists.
PiperOrigin-RevId: 239217545
2019-03-22 16:55:11 -04:00
afohrman
36fc2c66c6 Make sure that the ShapeAppearanceModel is always read from the TextInputLayout styles.
The boxCornerRadius attributes were still in the MDC styles, which means that the shapeAppearance and shapeAppearanceOverlay attributes were not respected. This commit removes the boxCornerRadius attributes to ensure that changes to shapeAppearance or shapeAppearanceOverlay are respected where shape theming is enabled.

PiperOrigin-RevId: 239214930
2019-03-22 16:53:04 -04:00
marianomartin
912045f642 [Menu] Add overlay color for APIs 23 and up
PiperOrigin-RevId: 239214849
2019-03-22 16:52:26 -04:00
Material Design Team
af15a5f943 Adding TabLayoutMediator to MDC tabs library
The TabLayoutMediator makes it possible for a ViewPager2 to be linked to
a TabLayout similarly to how a ViewPager was linked to TabLayout.

PiperOrigin-RevId: 239207045
2019-03-22 16:51:43 -04:00
leticiars
29b0670cee Updating end icon setter parameters to match the method names.
PiperOrigin-RevId: 239197723
2019-03-22 16:51:08 -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
connieshi
efdf289139 Add helper method to remove a BadgeDrawable from its associated anchor.
PiperOrigin-RevId: 239109585
2019-03-22 16:49:03 -04:00
afohrman
e2c8d0fbd2 Fix TextInputLayouts used with a Widget.MaterialComponents style and a non-Widget.MaterialComponents EditText child.
NOTE: This case is not supported. Limited support is provided when feasible in order to avoid breaking existing usages, but all TextInputLayouts used with a Widget.MaterialComponents style and a non-Widget.MaterialComponents input child should update the input child to use a Widget.MaterialComponents.TextInputEditText style to avoid future breakages.
PiperOrigin-RevId: 239047527
2019-03-22 16:30:47 -04:00
connieshi
6ebcd6416a Elevation overlay support for chip.
PiperOrigin-RevId: 239029411
2019-03-22 16:30:10 -04:00
melaniegoetz
a192f47036 Add dark-theme/elevation overlay support for BottomSheet
PiperOrigin-RevId: 239016572
2019-03-22 16:24:17 -04:00
marianomartin
fd01672af5 Fix nullness in FAB
PiperOrigin-RevId: 238990635
2019-03-22 16:21:40 -04:00
leticiars
2642ff2697 Adding support for TextInputLayout start icon. It can be set to be just a drawable or, if a OnClickListener is set to it, a button.
For that reason, users should opt to use the start icon API instead of setting a start/left compound drawable on the text field's edit text.

PiperOrigin-RevId: 238984066
2019-03-22 16:19:36 -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
melaniegoetz
d6f7b7c997 Update BottomSheetBehavior to use Nested Scrolling 3
PiperOrigin-RevId: 238730843
2019-03-22 16:18:24 -04:00
afohrman
d6cb34970a Support elevation overlays for BottomNavigationView.
PiperOrigin-RevId: 238729801
2019-03-22 16:17:46 -04:00
afohrman
ca07e5f616 Create OnChangedListener to respond to ShapeAppearanceModel changes and Shapeable interface, and implement it in Chip.
The OnChangedListener provides a callback that MaterialShapeDrawables can use to invalidate themselves when the associated ShapeAppearanceModel changes. This allows for modifying the ShapeAppearanceModel through the get/setShapeAppearance methods that the Shapeable interface exposes without having to update the client to redraw itself.

PiperOrigin-RevId: 238703600
2019-03-22 16:16:23 -04:00
connieshi
238b658417 Add helper method for attaching a BadgeDrawable to its associated anchor.
For API 18+, the BadgeDrawable will be added as a view overlay.
For pre-API 18, the BadgeDrawable will be set as the foreground of a FrameLayout that is an ancestor of the anchor.

PiperOrigin-RevId: 238661951
2019-03-22 16:15:41 -04:00
dniz
be564e558b Update ElevationOverlayProvider to not throw an exception if related attributes
are missing from theme

PiperOrigin-RevId: 238584902
2019-03-22 16:14:51 -04:00
ldjesper
d75c00043d Use ViewCompat for getElevation for MaterialAlertDialogBuilder
PiperOrigin-RevId: 238543065
2019-03-22 16:14:19 -04:00
isabellekim
1a1788a0cf Enable elevation overlays in MaterialCardView.
PiperOrigin-RevId: 238537749
2019-03-22 16:13:08 -04:00