184 Commits

Author SHA1 Message Date
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
8ee6c00f73 [Tokens] Upgraded to v0.142
Added lStar CSLs for new neutral palettes in v31 and above.

PiperOrigin-RevId: 491693724
2022-11-30 17:31:11 -05:00
pekingme
12ef329276 [Tokens] Upgraded to v0.141
PiperOrigin-RevId: 490324728
2022-11-23 15:13:20 -05:00
pekingme
b2b546b205 [Tokens] Internal updates.
PiperOrigin-RevId: 490295053
2022-11-23 15:11:19 -05:00
pubiqq
8cd2341a79 [Internal] Set the outline to a path whenever possible
Resolves https://github.com/material-components/material-components-android/pull/2934

GIT_ORIGIN_REV_ID=2ef0a3a6d9aa130e652fccbfc3d79f1345f2b32c
PiperOrigin-RevId: 478146360
2022-10-03 19:15:11 +00:00
pekingme
1ef53e2b37 [Tokens] Upgraded to v0.126 for 1p and 3p.
PiperOrigin-RevId: 475355503
2022-09-20 12:59:30 -04:00
pekingme
02327c3325 [Tokens] Updated to correctly convert shape tokens with asymmetric shape value.
PiperOrigin-RevId: 473036665
2022-09-08 14:25:16 -04:00
pubiqq
158d9f012a [ShapeAppearance] Change relative corner size behavior for "vertical" shapes
Resolves https://github.com/material-components/material-components-android/pull/2929

GIT_ORIGIN_REV_ID=38438252c1d43d1ccbeb333bdfc7a76b469033f4
PiperOrigin-RevId: 471564817
2022-09-01 10:25:55 -07:00
Material Design Team
44cc9b745c Add @CanIgnoreReturnValue to some APIs that return this.
PiperOrigin-RevId: 468721442
2022-08-22 15:22:27 -04:00
pubiqq
41eb6d0ff4 [ShapeAppearance] Fix rotation angle calculation
Resolves https://github.com/material-components/material-components-android/pull/2915

GIT_ORIGIN_REV_ID=4d738687c2023f2e9ec527c84ff0ec5ae9dba08e
PiperOrigin-RevId: 468608301
2022-08-19 11:01:53 -04:00
pekingme
ecb6284a8b [Shape] Fixed overlapping of compat shadow of inner corners.
Resolves https://github.com/material-components/material-components-android/issues/1388

PiperOrigin-RevId: 454893622
2022-06-14 10:21:03 -07:00
pekingme
d0c3ea0eb5 [Tokens] Upgraded token resources to v0.99.
PiperOrigin-RevId: 452574141
2022-06-02 15:41:39 -07:00
pekingme
c3406dc3ab [Tokens] Upgrade resources to v0.95.
PiperOrigin-RevId: 449840889
2022-05-20 15:19:31 -04:00
pekingme
a1e83052d9 [Tokens] Regenerated token resources with <macro> type.
PiperOrigin-RevId: 449829080
2022-05-20 15:18:57 -04:00
conradchen
3fa48d4cd5 [Shape] Workaround the issue that Context.obtainStyledAttributes() doesn't handle @macro properly
Somehow Context.obtainStyledAttributes() with a provided style resource crashes if some attributes in the style are resolved to be macros. Using ContextThemeWrapper to wrap the context with the style doesn't have this issue. Workarounds this by always wrapping the context to retrieve attributes.

PiperOrigin-RevId: 445451176
2022-04-29 14:50:17 -04:00
pekingme
6217aa8581 [Shape] Added theme attributes and styles for new shape appearances.
PiperOrigin-RevId: 442925211
2022-04-20 12:55:55 -04:00
pubiqq
3ca41be8f0 [General] Fix typos
Resolves https://github.com/material-components/material-components-android/pull/2654

GIT_ORIGIN_REV_ID=b8f6728979875629f2c813ef90d2f671cf56b4eb
PiperOrigin-RevId: 442852630
2022-04-19 14:48:55 -04:00
pekingme
c5284c6ce8 [Tokens] Upgraded to v0.87.
PiperOrigin-RevId: 439670161
2022-04-07 11:15:21 -04:00
pekingme
a878690a93 [Tokens] Upgraded to v0.86.
PiperOrigin-RevId: 435371390
2022-03-17 18:48:53 +00:00
pekingme
ccfc0eecdf [Tokens] Upgraded to v0.79.
PiperOrigin-RevId: 434669243
2022-03-15 19:18:27 +00:00
pekingme
a5b78e659c [Tokens] Added new shape appearance styles.
PiperOrigin-RevId: 433486068
2022-03-09 22:12:26 +00:00
pekingme
37fcd242bd [Tokens][Cleanup] Better ordering in the output.
PiperOrigin-RevId: 430479085
2022-02-23 11:23:09 -08:00
pekingme
64c6d047a9 [Tokens] Updated copyright year.
PiperOrigin-RevId: 427833895
2022-02-11 15:47:03 +00:00
pekingme
e721c468c2 [Tokens] Updated atomic shape resources to ShapeAppearance styles.
PiperOrigin-RevId: 426466909
2022-02-04 13:48:13 -08:00
pekingme
53863287d6 [Tokens] Re-upgraded to v0.73.
PiperOrigin-RevId: 424635556
2022-01-27 09:54:21 -08:00
pekingme
d0e0d9404d [Tokens] Downgraded token resources to v0.71.
PiperOrigin-RevId: 421954490
2022-01-18 12:04:57 -05:00
pekingme
4527272319 [Tokens] Upgraded token resources to v0.73.
PiperOrigin-RevId: 420329292
2022-01-12 11:18:41 -05:00
pekingme
4de8565634 [Tokens] Upgrade M3 token resources to v0.71
PiperOrigin-RevId: 420319663
2022-01-12 11:16:06 -05:00
Material Design Team
cfc00aa5a3 Update android core class definitions across material
PiperOrigin-RevId: 414839941
2021-12-08 14:56:25 +00:00
Andre\u0301 Wachter
5ff917dc5f [MaterialShapeDrawable] Implement getAlpha()
Resolves https://github.com/material-components/material-components-android/pull/2479

GIT_ORIGIN_REV_ID=20d18f9732871b06aa9f95af0bd02f23b3e7995a
PiperOrigin-RevId: 412092198
2021-11-29 17:31:06 +00:00
pekingme
c1f7dfc314 [Tokens] Updated resources to v0.54.
PiperOrigin-RevId: 402383462
2021-10-12 11:39:48 -04:00
conradchen
79ae9b1351 [TextInputLayout] Create label cutout only on borders
When a collapsed label is showing, we cutout part of the border of an outlined text input box according to the exact stroke width. However when using rounded corners, there can be slight offsets from where the border is really drawn. Also, if the corner size is large, the part of border we need to cutout might not just be a straight line but contains part of the corner.

However, with the existing cutout logic, we cannot just cutout the whole label area, which will cause the area inside the border also gets cutout, if it has color. This CL changes the cutout drawing logic to only apply the cutout on stroke drawing to fix the issue.

This CL also fixes the bug that when the label is too long, we didn't take the ellipsized text length into account. Creates a variable to store the calculated collapsed text width to fix the issue.

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

PiperOrigin-RevId: 402316057
2021-10-12 11:26:21 -04:00
pekingme
9c93dcd626 [M3][Tokens] Update resources to v0.47.
PiperOrigin-RevId: 397066722
2021-09-20 09:31:04 -07:00
dsn5ft
ec591e5420 [MaterialShapeDrawable] Open access to getResolvedTintColor() method
PiperOrigin-RevId: 396585644
2021-09-16 11:37:52 -07:00
dsn5ft
96f41cb9a5 [M3][Shape] Update Shape dev docs with M3 themes/styles
PiperOrigin-RevId: 395703463
2021-09-15 12:21:33 -07:00
pekingme
585fd8df89 [M3][Tokens] Integrated shape resources.
PiperOrigin-RevId: 392530797
2021-08-24 15:44:16 -04:00
conradchen
edbc4e1f64 [M3][Textfield] Create M3 styles
PiperOrigin-RevId: 391773145
2021-08-23 09:22:14 -07:00
dsn5ft
3008d782e7 [AppBarLayout] Added listener for when lift on scroll background elevation and color change
PiperOrigin-RevId: 386243658
2021-07-28 14:26:55 -04:00
conradchen
b8c9f4949d [MaterialShapeDrawable] Move static paint initialization to static block
PiperOrigin-RevId: 374650659
2021-05-19 10:59:31 -07:00
connieshi
6951bd5179 [Chip] Support elevation overlay.
Resolves https://github.com/material-components/material-components-android/issues/1749

PiperOrigin-RevId: 336930100
2020-10-15 13:21:17 -07:00
marianomartin
edbfd15c82 [MaterialShapeDrawables] Fixed compat shadows after ShapePathProvider change
PiperOrigin-RevId: 325797837
2020-08-10 13:20:07 -04:00
marianomartin
c59c04639c [MaterialShapeDrawable] Convert ShapeAppearancePathProvider to a singleton.
Also allocate less path objects.

PiperOrigin-RevId: 325287653
2020-08-06 21:10:36 -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
marianomartin
b5533eae6b Swallow exception setting convex path in MaterialShapeDrawable for pre releases of Q
PiperOrigin-RevId: 306874530
2020-04-17 15:17:21 -04:00
Material Design Team
e802ecaa36 Add documentation to clarify percent units.
Otherwise it's pretty ambiguous, a percent logically is out of 100 but this unit is actually a fraction of the height intended to be in range 0-1.

PiperOrigin-RevId: 306281351
2020-04-14 21:37:46 -04:00
marianomartin
841fae9258 Fix javadocs issues in Shape package
PiperOrigin-RevId: 300547341
2020-03-13 10:57:59 -04:00
marianomartin
8e8d20c94f Fix interpolation for MSD round rects
PiperOrigin-RevId: 296281750
2020-02-20 16:35:56 -05:00
cketcham
b5c3fecacc Add warning to ShapePath when an operation is being used in a situation where a compatibility shadow would normally be drawn
PiperOrigin-RevId: 295847026
2020-02-19 10:52:22 -05:00