683 Commits

Author SHA1 Message Date
isabellekim
7b79678f9b Use colorControlActivated instead of colorSecondary for the activated color of MaterialCheckbox, MaterialRadioButton, and SwitchMaterial.
By default, colorControlActivated is set to colorAccent. Non-bridge themes set colorAccent to colorSecondary.

PiperOrigin-RevId: 234987118
2019-02-24 14:27:59 -05:00
dniz
fdbd553fc4 Set ActionMode background in Primary and Surface theme overlays
PiperOrigin-RevId: 234791713
2019-02-24 14:25:47 -05:00
Material Design Team
76a9b23443 Add SCROLL_FLAG_NO_SCROLL flag for AppBarLayout.LayoutParams
PiperOrigin-RevId: 234683507
2019-02-24 14:25:13 -05:00
leticiars
56859415e8 Adding support for a custom end icon for the TextInputLayout.
A user-specified icon can now be set via app:endIconMode="custom" and attributes app:endIconDrawable and app:endIconContentDescription. It is also possible to set a custom OnClickListener via TextInputLayout's end icon API.

PiperOrigin-RevId: 234671237
2019-02-24 14:23:57 -05:00
connieshi
b641bf706f Avoid infinite loop in Chip#SetLayoutDirection.
PiperOrigin-RevId: 234604880
2019-02-24 14:22:05 -05:00
marianomartin
8449d0e7dc Change opacity of dragged state in cards
PiperOrigin-RevId: 234603183
2019-02-24 14:21:10 -05:00
cketcham
5287b8eb45 Add bridge themes for Dialog
PiperOrigin-RevId: 234216058
2019-02-24 14:20:27 -05:00
gauthams
441877f7cc Add checked state to MaterialButton
PiperOrigin-RevId: 234214200
2019-02-24 14:19:05 -05:00
marianomartin
8dcee7dc09 Resubmit make CircularRevealCardView extend MaterialCardView
PiperOrigin-RevId: 234198980
2019-02-24 14:17:29 -05:00
marianomartin
991927fd8f Add an attribute for materialButtonOutlinedStyle
It's a common use case to want to mix up buttons with outlined buttons and an attribute facilitates reusing layouts with different themes.

PiperOrigin-RevId: 234189427
2019-02-24 14:16:47 -05:00
cketcham
76727ecc84 Add documentation to addTransformationListener() and removeTransformationListener()
PiperOrigin-RevId: 234174194
2019-02-24 14:16:07 -05:00
leticiars
4882a4f131 Adding clear text button end icon to TextInputLayout.
PiperOrigin-RevId: 234141273
2019-02-24 14:15:28 -05:00
marianomartin
f59949a297 Fix card ripple bug
PiperOrigin-RevId: 233960735
2019-02-24 14:14:49 -05:00
gauthams
3ad575dad1 Enable drawing surface-color stroke under regular stroke in MaterialButton
PiperOrigin-RevId: 233860616
2019-02-24 14:14:07 -05:00
cketcham
7c72808f96 Fix FAB vertical offset bug when BAB is hidden
Because the FAB is anchored to the top of the BAB, the animation which hides the BAB also moves down the FAB. This removes the extra animation for the FAB. Because the two animations were running at the same time, the distance between the FAB and the BAB was being calculated incorrectly. This was causing the BAB to think the FAB was higher than it was which resulted in the cutout being drawn too high.

PiperOrigin-RevId: 233844627
2019-02-24 14:13:07 -05:00
gauthams
b7ff433981 Remove corner radius adjustment for MaterialButton
PiperOrigin-RevId: 233840694
2019-02-24 14:11:27 -05:00
marianomartin
87a9e5aba9 Shape sizes
Allow the ThemeSwitcher to change shape sizes also change it to a BottomSheetdialogFragment to see the content more clearly.

PiperOrigin-RevId: 233839250
2019-02-24 14:10:20 -05:00
dniz
679abf1218 Delete colorBackgroundFloating attr definition (it's defined in AppCompat and we don't use it anymore)
PiperOrigin-RevId: 233761304
2019-02-24 14:09:38 -05:00
leticiars
ee66029e6c Adding back padding to the text field end icon.
PiperOrigin-RevId: 233668308
2019-02-24 14:08:11 -05:00
leticiars
4c2e9c4004 Changing the TextInputLayout's password toggle implementation into a generic API implementation, which will allow for easier support of future end icons. Also deprecating current password toggle end icon methods and attributes.
This change doesn't include support of a custom end icon yet.

PiperOrigin-RevId: 233645798
2019-02-24 14:07:11 -05:00
marianomartin
5d52b81e49 Automated g4 rollback of changelist 233595839
PiperOrigin-RevId: 233607169
2019-02-24 14:05:53 -05:00
marianomartin
f42e4327bf make CircularRevealCardView extend MaterialCardView
PiperOrigin-RevId: 233595839
2019-02-24 14:05:03 -05:00
connieshi
6f73e58e9d Update chipSpacingHorizontal to 8dp to match spec.
PiperOrigin-RevId: 233487590
2019-02-24 13:58:42 -05:00
afohrman
41d919ae55 Fix double underline that appears when using non-TextInputEditText styles on
TextInputLayout's EditText child.

Set the ?attr/editTextBackground attribute to null in TextInputLayout's materialThemeOverlay to make sure that ?attr/editTextBackground is @null no matter what EditText subclass or style is used for the TextInputLayout's input text child.

PiperOrigin-RevId: 233407060
2019-02-11 11:19:16 -08:00
Material Design Team
c5aea4d74f Automated g4 rollback of changelist 232310103
PiperOrigin-RevId: 232890148
2019-02-11 11:17:51 -08:00
gauthams
75db2150a8 Add shadow to MaterialButton below API 21
PiperOrigin-RevId: 232737347
2019-02-11 11:17:08 -08:00
dniz
a245d5725b Add @hide annotations to restricted classes in com.google.android.material.resources package
PiperOrigin-RevId: 232524359
2019-02-11 11:16:20 -08:00
marianomartin
7f45f74302 Combine default card style and checkable style.
PiperOrigin-RevId: 232472062
2019-02-11 11:14:50 -08:00
Material Design Team
3fe5a397ac Force recalculation of collapsed offset when setting peek height
PiperOrigin-RevId: 232388784
2019-02-11 11:14:07 -08:00
melaniegoetz
901ba79163 Add BottomSheetBehavior SavedState API
PiperOrigin-RevId: 232328750
2019-02-11 11:13:21 -08:00
marianomartin
85512ef943 Remove attr definition and setting fitSystemWindows from NavigationView since view already handles that.
PiperOrigin-RevId: 232310103
2019-02-11 11:12:35 -08:00
cketcham
9678f62c28 Update BottomAppBar to have basic support for use with ExtendedFloatingActionButton
PiperOrigin-RevId: 232301919
2019-02-11 11:11:27 -08:00
Material Design Team
ba2006d6f1 Automated g4 rollback of changelist 232038402
PiperOrigin-RevId: 232057512
2019-02-11 11:10:33 -08:00
Material Design Team
f11bafd91d Force recalculation of collapsed offset when setting peek height
PiperOrigin-RevId: 232038402
2019-02-11 11:09:50 -08:00
marianomartin
33e408d67e Card elevation changes
PiperOrigin-RevId: 231993329
2019-02-11 11:09:05 -08:00
afohrman
beee015feb Use EditText's background for the filled text field and fix underline flakiness.
PiperOrigin-RevId: 231857938
2019-02-11 11:08:22 -08:00
isabellekim
c149a75edb Stop adjusting content padding based on stroke width.
It is the responsibility of clients who want content to be inside the
stroke to set their content padding accordingly.

PiperOrigin-RevId: 231815048
2019-02-11 11:07:37 -08:00
ldjesper
e22d745ec0 materialAlertDialogTheme changes to spec (padding, text opacity, scrim color, divider color)
PiperOrigin-RevId: 231757787
2019-02-11 11:06:48 -08:00
Material Design Team
63d11da7e5 Extended FAB.
Implementation of an ExtendedFloatingActionButton which extends from a MaterialButton.

PiperOrigin-RevId: 231682739
2019-02-11 11:04:14 -08:00
Material Design Team
267bca1fd2 setHideable(false) on hidden bottom sheet animates to collapsed state
PiperOrigin-RevId: 231655251
2019-02-11 11:01:36 -08:00
leticiars
564bd28527 Fixing bug where font set via xml for text input's labels wouldn't be applied to the labels of an EditText with password transformation.
PiperOrigin-RevId: 231611177
2019-02-11 11:00:25 -08:00
gauthams
354349d833 Expose background shape drawable in MaterialButtonHelper
PiperOrigin-RevId: 231321351
2019-02-01 12:38:48 -05:00
afohrman
19039f7772 Automated g4 rollback of changelist 231246920
PiperOrigin-RevId: 231313735
2019-02-01 12:37:35 -05:00
afohrman
ef919e870a Use EditText's background for the filled text field and fix underline flakiness.
Use the EditText's background for the filled box text field and a MaterialShapeDrawable drawn to the canvas for the underline. This allows for many improvements to the filled text field.

This commit:
- Fixes the underline flakiness, where the underline used to not meet the edges until drawableStateChanged() was called after a layout pass (because TextInputLayout was attempting to use EditText's pre-existing underline, and the bounds of that Drawable weren't known in order to modify them until after drawableStateChanged())
- Removes the hard-coded box offset since it was only necessary when trying to use EditText's background drawable
- Brings the expanded label/hint a bit closer to the vertical center. Any more than this will require changing the bounds set on the expanded hint text and create misalignment between the expanded hint and any compound drawable that might be set

Specs: https://material.io/design/components/text-fields.html#spec

There is a possible alternative to drawing the underline manually: including the underline as part of the EditText's background. I investigated this option and rejected it, since it would require a re-architecture of the way TextInputLayout handles the box logic and many layers of box drawable nesting. It is much more straightforward and performant to draw the underline directly to the canvas than to convert the boxBackground to {LayerDrawable{MaterialShapeDrawable,{InsetDrawable{MaterialShapeDrawable}}}}.

This commit should only change the visuals of the filled text field; the outline text field should be visually untouched.

PiperOrigin-RevId: 231246920
2019-02-01 12:35:48 -05:00
ldjesper
9c4bed6503 Hide MaterialDatePickerDialog while the API is influx
PiperOrigin-RevId: 231218156
2019-02-01 12:34:14 -05:00
melaniegoetz
eefb5d4d77 Create ThemeOverlay's for BottomSheets, changes bottomSheetDialogTheme to use Overlay instead of full theme reference
PiperOrigin-RevId: 230944305
2019-01-25 15:23:16 -05:00
Material Design Team
a0ab1c29a3 Update Chip padding on RTL properties change
Prior to this change, when setLayoutDirection is called on a parent/ancestor View of a Chip, the updated layout direction could be propagated to the Chip without updating its text padding. This change forces a padding update whenever layout direction changes.

PiperOrigin-RevId: 230933347
2019-01-25 15:22:40 -05:00
melaniegoetz
c94b5209b9 Fix non-scrollable bottomsheet corners when set directly to STATE_EXPANDED
PiperOrigin-RevId: 230933282
2019-01-25 15:21:29 -05:00
ldjesper
704aff2f14 Removing constructor comments because of JDiff
PiperOrigin-RevId: 230751570
2019-01-25 14:02:21 -05:00
isabellekim
6362e720ec Use stroke width to determine whether a stroke should be drawn for
MaterialCardView.

PiperOrigin-RevId: 230713479
2019-01-25 14:01:46 -05:00