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
leticiars
f0c4e8bf0f
Updating Switch to support elevation overlays.
...
PiperOrigin-RevId: 238537080
2019-03-22 16:12:22 -04:00
ldjesper
19b696015a
Apply Elevation Overlay for Dark Theme Dialogs
...
PiperOrigin-RevId: 238535985
2019-03-22 16:11:50 -04:00
gauthams
5848f1fa2d
Add elevation overlay support for MaterialButton
...
PiperOrigin-RevId: 238535050
2019-03-22 16:11:04 -04:00
cketcham
d1b56c3d1e
Update BottomAppBar to use elevation overlay for dark theme
...
PiperOrigin-RevId: 238534227
2019-03-22 16:10:30 -04:00
connieshi
c6ce174cb8
Call Resources#getDimensionPixelSize instead of Resources#getDimenion.
...
PiperOrigin-RevId: 238480749
2019-03-22 16:09:54 -04:00
dniz
6adba8f93b
Fix MaterialShapeDrawable to work with ColorStateLists for fill and stroke tint
...
and paint
PiperOrigin-RevId: 238478987
2019-03-22 16:09:16 -04:00
Chris Banes
78054fe4ea
AppBarLayout + WindowInset handling fixes
...
When AppBarLayout is used with a CollapsingToolbarLayout
child, it currently does not handle WindowInsets
very well. This commit fixes that by properly handling
insets.
The primary issue is when an AppBarLayout is used
with a single Toolbar (very common use case), where
the Toolbar will currently be displayed behind the status bar.
Another issue is with HeaderScrollingViewBehavior.
To workaround CoordinatorLayout using its 'compatible measuring'
for insets, the behavior manually sets the scrolling view to fit
system windows. This has other issues though because
that view will get padded in. Fixed by manually adding the insets
back into the measured dimensions.
Also updated the catalog layouts to make use of
android:fitsSystemWindows=true
Resolves https://github.com/material-components/material-components-android/pull/299
PiperOrigin-RevId: 238396626
2019-03-22 16:08:28 -04:00
connieshi
931b97a360
Add res-public for BadgeDrawable.
...
PiperOrigin-RevId: 238295054
2019-03-22 16:07:55 -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
marianomartin
8b277edc7c
[MaterialCardView] Change strokeColor to be a ColorStateList
...
PiperOrigin-RevId: 238241769
2019-03-22 16:05:58 -04:00
Material Design Team
3bce1b6f46
Set MaterialButton's accessibility class name to match the platform Button widget so that a11y services can verbalize instances as Buttons. For instance, a button with content description "foo" should be verbalized as "foo Button"
...
PiperOrigin-RevId: 238032322
2019-03-22 16:05:13 -04:00
gauthams
c7d081a9e8
Use getEllipsizedWidth rather than getWidth when measuring text in MaterialButton
...
PiperOrigin-RevId: 237853613
2019-03-22 16:03:58 -04:00
dniz
7b594393c8
Dark Theme Elevation Overlay system
...
PiperOrigin-RevId: 237829773
2019-03-22 16:02:26 -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
Material Design Team
aae325e6b4
Migrate interpolator android support libraries to androidx.
...
PiperOrigin-RevId: 237401244
2019-03-08 10:11:23 -05:00
ldjesper
a6968befc1
Unique name for MaterialDatePickerView styles
...
PiperOrigin-RevId: 237271488
2019-03-08 10:09:55 -05:00
connieshi
5a9e0d378d
Update ChipDrawable to use TextDrawableHelper to handle logic related to text rendering. ChipDrawable is still responsible for drawing text.
...
PiperOrigin-RevId: 237257476
2019-03-08 10:08:59 -05:00
ldjesper
0aa32c1ce6
Adds a bare implementation of a date picker not yet ready for use
...
PiperOrigin-RevId: 237052095
2019-03-08 10:06:25 -05:00
Material Design Team
357ac6a800
Automated g4 rollback of changelist 236909539
...
PiperOrigin-RevId: 236951421
2019-03-08 10:05:39 -05:00
ldjesper
206ef37620
Adds a bare implementation of a date picker
...
PiperOrigin-RevId: 236909539
2019-03-08 10:03:53 -05:00
Material Design Team
1cc0a2b4e4
Automated g4 rollback of changelist 236879782
...
PiperOrigin-RevId: 236896313
2019-03-08 10:00:53 -05:00
ldjesper
8c9f9d5e01
Date Range Picker
...
PiperOrigin-RevId: 236879782
2019-03-08 09:59:54 -05:00
marianomartin
01874ad4e9
Change setElevation in MSD to use default offset
...
PiperOrigin-RevId: 236858323
2019-03-08 09:58:58 -05:00
marianomartin
77ac869283
Add single selection attr to resources package
...
PiperOrigin-RevId: 236851563
2019-03-08 09:58:19 -05:00
gauthams
cad9d7d5f5
Add MaterialButtonToggleGroup
...
PiperOrigin-RevId: 236745008
2019-03-08 09:56:58 -05:00