115 Commits

Author SHA1 Message Date
pekingme
8204856dd4 [Token][Color] Upgraded to v0.170 for tonal surface colors.
PiperOrigin-RevId: 555230534
2023-08-09 19:03:25 +00:00
rightnao
e3b255b3a0 [Docs] Crosslink github docs in javadocs
PiperOrigin-RevId: 546393704
2023-07-11 19:37:37 +00:00
pekingme
9f1caa2c64 [Tokens] Upgraded to v0.162.
PiperOrigin-RevId: 517446114
2023-03-20 21:23:07 +00:00
pekingme
23dc14ca3a [Tokens] Updated to v0.157.
PiperOrigin-RevId: 505978081
2023-01-31 20:01:13 +00:00
rightnao
dfb9e81eeb [Motion] Motion tweaks
PiperOrigin-RevId: 493105642
2022-12-06 15:22:34 -05:00
pekingme
2019bf90be [Tokens] Upgraded to version v0.147.
PiperOrigin-RevId: 492551875
2022-12-02 18:34:12 -05:00
pekingme
17e3581642 [Tokens] Upgraded to v0.145
PiperOrigin-RevId: 492291163
2022-12-02 15:11:37 +00:00
pekingme
8eb4aeb6f8 [Tokens] Internal update.
PiperOrigin-RevId: 492290020
2022-12-02 15:03:36 +00:00
pekingme
bf7b3c275f [Card] Integrated M3 tokens.
PiperOrigin-RevId: 490569453
2022-11-28 17:16:16 -05:00
rightnao
3975a2e908 [MaterialCardView] Update motion specs for Z-shadow
PiperOrigin-RevId: 472535721
2022-09-08 13:40:46 -04:00
rightnao
7d129eae21 [MaterialCardView] Add fade animation for checked icon drawable
PiperOrigin-RevId: 471663189
2022-09-01 17:23:43 -07:00
conradchen
bfce84a27c [Card] Migrated shape appearance to new shape system.
PiperOrigin-RevId: 445180046
2022-04-28 16:25:56 -04:00
conradchen
b4cab87015 [Card] Fix crash on Pre-Q devices when checked icon is null
LayerDrawable has this bug that if any of the provided drawables are null during creation, it crashes. The fix is only available on Q+. Fixes this by providing a dummy drawable when we find checked icon is null.

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

PiperOrigin-RevId: 426179927
2022-02-03 20:19:40 -08:00
Material Design Team
cfc00aa5a3 Update android core class definitions across material
PiperOrigin-RevId: 414839941
2021-12-08 14:56:25 +00:00
conradchen
bb23e2d6ad [M3][Card] Update M3 card elevation according to the spec
Spec: https://m3.material.io/components/cards/specs
PiperOrigin-RevId: 412921858
2021-11-29 19:17:33 +00:00
Material Design Team
a487c89185 Internal change
PiperOrigin-RevId: 412135443
2021-11-29 17:35:39 +00:00
conradchen
283715d348 [Card] Fix checked icon gravity issues
Re-measures the card when checked icon gravity changes in order to move the icon position. Also corrects the padding adjustment logic for pre-lolipop or when compat paddings are being used.

PiperOrigin-RevId: 408876717
2021-11-10 16:11:35 -05:00
conradchen
bc56d5b43b [M3][Card] Change checkedIconGravity values to enum
PiperOrigin-RevId: 408415041
2021-11-10 16:00:52 -05:00
Gabriele Mariotti
250d56de4b [MaterialCardView] Added option to set the checkedIcon gravity
Resolves https://github.com/material-components/material-components-android/pull/1679

GIT_ORIGIN_REV_ID=a35c862071d83ced72c4d7257f2b7bc93101bfbb
PiperOrigin-RevId: 407662373
2021-11-10 15:35:03 -05:00
dsn5ft
9ae56ceedd [Javadocs] Remove all broken attr links from Javadocs
PiperOrigin-RevId: 404246710
2021-10-20 19:06:18 +00:00
conradchen
b40b782525 [M3][Card] Add filled card style to M3 themes
PiperOrigin-RevId: 398780149
2021-09-28 14:52:04 +00:00
conradchen
063a17b9e9 [M3][Card] Update card dev docs with M3 themes/styles
PiperOrigin-RevId: 395726005
2021-09-15 12:23:49 -07:00
conradchen
e5fb9d1fbd [M3][Card] Create M3 styles
PiperOrigin-RevId: 392875925
2021-08-25 14:57:05 -04:00
zmunm
4acc56dceb [MaterialCardView] Add invalidate when stroke changed
Resolves https://github.com/material-components/material-components-android/pull/2173

GIT_ORIGIN_REV_ID=424c5862c22b41064ef473869bb0ca707bd53c13
PiperOrigin-RevId: 384921024
2021-07-15 12:35:51 -04:00
ymarian
b06446006c [Card] Fix checked icon tint for API < 21, BitmapDrawables
Resolves https://github.com/material-components/material-components-android/issues/1993

PiperOrigin-RevId: 383754894
2021-07-09 15:29:15 -04:00
Gabriele Mariotti
df0401bd29 [MaterialCardView] Added options to set custom checkedIcon size and margin
Resolves https://github.com/material-components/material-components-android/pull/1613

GIT_ORIGIN_REV_ID=ace8cb8b2e55806760e4d28214bd72afb46a6592
PiperOrigin-RevId: 330932167
2020-09-10 11:14:31 -04:00
connieshi
1b0cfaeace [MaterialCardView] Fixed NPE if android:onClick is defined in the layout
Resolves https://github.com/material-components/material-components-android/issues/1054
Resolves https://github.com/material-components/material-components-android/pull/1614

GIT_ORIGIN_REV_ID=b19044de3093f19313e362d378f5cc3b810c5727
PiperOrigin-RevId: 326486876
2020-08-13 16:51:44 -04:00
marianomartin
049ad022a6 Delete components build.gradle files
PiperOrigin-RevId: 320944144
2020-07-15 09:38:31 -07:00
marianomartin
555356b03f Internal cleanup
PiperOrigin-RevId: 318134343
2020-06-26 14:06:52 -04:00
connieshi
d09ac03481 Prevent content from being clipped by MaterialCardView when a non-round rect is set as the shape.
Caution: content may extend outside shape.

PiperOrigin-RevId: 311135841
2020-05-12 19:29:22 -04:00
marianomartin
4ad50666b2 [MaterialCardView] Checked icon is being squeezed with useCompatPadding
Resolves https://github.com/material-components/material-components-android/issues/795

PiperOrigin-RevId: 304272773
2020-04-03 09:22:16 -07:00
Material Design Team
5213b46edd [Chip] Support setting checked icon's tint via xml attribute
PiperOrigin-RevId: 299429881
2020-03-09 10:45:57 -07:00
isabellekim
1cdd0428ed Add public attributes to public.xml and add setter & getter for cardForegroundColor to Card.
PiperOrigin-RevId: 293675127
2020-02-07 10:34:25 -05:00
connieshi
12c0e435dc Add reference to Github bug in todo for more context.
PiperOrigin-RevId: 283390765
2019-12-03 17:02:41 -05:00
Andreas Rossbacher
db7fde2cd6 [CardView] Fix potential Proguard/Dexguard/R8(?) optimization problem
Resolves https://github.com/material-components/material-components-android/pull/790

GIT_ORIGIN_REV_ID=fddc631d7a7c010044ab66247bec85f0aba097aa
PiperOrigin-RevId: 282769919
2019-12-02 17:31:16 -05:00
connieshi
3a337c0110 Hardcode non-framework classname used to call AccessibilityNodeInfo#setClassName so it doesn't get obfuscated by Proguard.
PiperOrigin-RevId: 282618314
2019-12-02 17:28:30 -05:00
marianomartin
781e79f4b1 Disable MaterialCardView bitmap drawing
PiperOrigin-RevId: 281825046
2019-11-22 21:27:37 +00:00
marianomartin
115313c0c0 Expose a class for themeoverlay in style
This moves functionality from ThemeEnforcement into a stand alone class.

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

PiperOrigin-RevId: 275481343
2019-10-21 10:24:19 -04:00
ldjesper
294f12498d Rename setCornerRadius to setAllCornerSizes
PiperOrigin-RevId: 272959729
2019-10-04 20:08:43 -04:00
marianomartin
6f10bd0606 Remove minimun dimens from cards inset drawables
Resolves https://github.com/material-components/material-components-android/issues/537

PiperOrigin-RevId: 272951547
2019-10-04 20:08:06 -04:00
cketcham
0547d2a06b Uncouple CornerSize from CornerTreatment
This allows for more easily updating the CornerSize independently from the CornerTreatment and makes it possible to create different types of CornerSizes such as percentage based corners. However, this means corner sizes can be different depending on the bounds of the shape, so the bounds need to be provided. MaterialShapeDrawable has bounds and the ShapeAppearanceModel, so there are new convenience methods there which return the current corner size for the current bounds of the drawable.

PiperOrigin-RevId: 272908508
2019-10-04 15:23:16 -04:00
marianomartin
0f8fa7e6c9 Remove content layout from card view
Due to numerous issues with padding, measure, and crashes with layout bindings. We decided to remove the inner layout.

PiperOrigin-RevId: 271495029
2019-09-27 14:05:20 -04:00
connieshi
b6885518a0 Use CardView instead of MaterialCardView as the class name to so Talkback recognizes the item type.
PiperOrigin-RevId: 269333691
2019-09-18 14:15:19 -04:00
marianomartin
215a839598 Internal cleanup
PiperOrigin-RevId: 267504117
2019-09-12 13:48:16 -04:00
cketcham
7bb525ff59 Update usages of ShapeAppearanceModel to use Builder pattern
PiperOrigin-RevId: 266144471
2019-08-29 15:39:51 -04:00
marianomartin
0d4515cb46 Internal cleanup
PiperOrigin-RevId: 265971745
2019-08-29 14:59:20 -04:00
cketcham
9dc259119e Add @NonNull and @Nullable annotations
PiperOrigin-RevId: 264899197
2019-08-26 11:43:16 -04:00
dniz
0512f776c5 Remove sub-package AndroidManifest.xml files from lib directory
PiperOrigin-RevId: 258390736
2019-07-16 13:18:32 -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
marianomartin
31d0e9ac4d [MaterialCardView] Add (set|get)Progress
This allows to animate the shape of the card.
Using setProgress so that this works with MotionLayout as well.

PiperOrigin-RevId: 257241960
2019-07-10 13:43:58 -04:00