69 Commits

Author SHA1 Message Date
dsn5ft
d75459102f [SideSheetDialog] Add support for enabling edge to edge via setFitsSystemWindows()
PiperOrigin-RevId: 767168515
2025-06-05 18:40:28 +00:00
rightnao
37adad28af [Tokens] Update tokens to 16.0.2
PiperOrigin-RevId: 739249542
2025-03-24 15:27:25 +00:00
pekingme
67b6dcebe5 [Tokens] Upgraded to 15.0.26
PiperOrigin-RevId: 731761144
2025-03-03 19:50:32 +00:00
pekingme
c39dc388b3 [Tokens] Upgraded to version 15.0.12.
PiperOrigin-RevId: 730510849
2025-02-25 19:32:33 +00:00
pekingme
7c5dce0f82 [Tokens] Updated to 14.0.0.
PiperOrigin-RevId: 728471950
2025-02-20 15:36:11 +00:00
pekingme
9a2890c249 [Resources] Updated translated string resources.
Resolves https://github.com/material-components/material-components-android/issues/4553

PiperOrigin-RevId: 720282586
2025-01-28 19:47:24 +00:00
pubiqq
bc2fdeadaf [Internal] Prefer platform methods to compat ones
Resolves https://github.com/material-components/material-components-android/pull/4532

GIT_ORIGIN_REV_ID=180dec736f2521579e483317a4d537629d8f247b
PiperOrigin-RevId: 715494344
2025-01-15 18:06:07 +00:00
pekingme
4f7bf293ea [Tokens] Updated token outputs to v13.2.0 and integrated new AppBar tokens.
PiperOrigin-RevId: 703208208
2024-12-10 17:57:50 +00:00
pubiqq
c1c19c8b3a [Internal] Update targetApi suppressions in resources
Resolves https://github.com/material-components/material-components-android/pull/4308

GIT_ORIGIN_REV_ID=8016db9460e4e1013e56a50e541406ff356e2837
PiperOrigin-RevId: 702111281
2024-12-04 23:58:23 +00:00
pubiqq
b77824fcc7 [Internal] Remove pre-Lollipop resources
Resolves https://github.com/material-components/material-components-android/pull/4280

GIT_ORIGIN_REV_ID=88ee02b5c93b51a154503b7a1f1b85ddeea3cb57
PiperOrigin-RevId: 676472901
2024-09-20 19:49:20 +00:00
pekingme
47cbd7e81a [Tokens] Upgraded to 10.0.1
PiperOrigin-RevId: 676467444
2024-09-20 19:48:02 +00:00
pubiqq
23aca03255 [Internal] Remove pre-Lollipop checks
Resolves https://github.com/material-components/material-components-android/pull/4266

GIT_ORIGIN_REV_ID=1de7808e66dd6666c893217c76c7499afe2df6a3
PiperOrigin-RevId: 669688797
2024-09-03 13:31:29 +00:00
pekingme
87076dd20b [Tokens] Upgraded to 8.0.0.
PiperOrigin-RevId: 669673113
2024-09-03 13:28:26 +00:00
pekingme
9188b8f6ab [Tokens] Upgraded to 7.1.0.
PiperOrigin-RevId: 669087033
2024-08-30 18:49:53 +00:00
pekingme
b65df32b0f [Tokens] Upgraded to 7.0.0
PiperOrigin-RevId: 668133320
2024-08-28 22:34:40 +00:00
pekingme
8731cad96a [Tokens] Upgraded to v6.1.0.
PiperOrigin-RevId: 665569215
2024-08-21 17:24:43 +00:00
pekingme
da0b738679 [Tokens] Upgraded to v5.0.0.
PiperOrigin-RevId: 663358341
2024-08-16 17:33:16 +00:00
dsn5ft
9b6ceac72a [i18n] Update string translations
PiperOrigin-RevId: 633623911
2024-05-14 17:16:18 +00:00
pubiqq
510881a469 [Internal] Stop using deprecated androidx.core.view.* methods
Resolves https://github.com/material-components/material-components-android/pull/4117

GIT_ORIGIN_REV_ID=dd157e8360c2511810496693cec1616fce578655
PiperOrigin-RevId: 632284856
2024-05-13 17:37:38 +00:00
pfthomas
9b09b693d9 [Tokens] Update tokens to v4.0.0
PiperOrigin-RevId: 626141198
2024-04-19 21:18:49 +00:00
pekingme
28cc2441d0 [Tokens] Updated to version 2.3.4.
PiperOrigin-RevId: 610835532
2024-02-29 08:36:02 -08:00
pekingme
ee7b4bddb4 [Tokens] Added formatting to break long lines and differentiate different comments.
PiperOrigin-RevId: 605684816
2024-02-12 18:03:59 +00:00
pekingme
89212044a9 [Tokens] Updated to v0.213.
PiperOrigin-RevId: 603749766
2024-02-06 14:30:16 +00:00
pekingme
08d7ded67b [Tokens] Upgraded to v0.207.
PiperOrigin-RevId: 600947836
2024-01-24 21:05:53 +00:00
dsn5ft
3b278d7097 [Side Sheet] Move modal side sheet default width/height into style so they can be customized
Resolves https://github.com/material-components/material-components-android/issues/3492

PiperOrigin-RevId: 590915421
2023-12-14 15:45:53 +00:00
dsn5ft
198e08cf5e [i18n] Update string translations for checkbox, search, and sidesheet
PiperOrigin-RevId: 582397137
2023-11-14 20:04:14 +00:00
pekingme
4ccaaaa31d [Tokens] Upgraded to v0.203
PiperOrigin-RevId: 579928128
2023-11-08 15:12:21 +00:00
pekingme
637362d597 [Tokens] Upgraded to v0.195
PiperOrigin-RevId: 579905417
2023-11-06 20:27:15 +00:00
pekingme
0463c507d7 [Tokens] Upgraded to v0.185
PiperOrigin-RevId: 579904837
2023-11-06 20:26:18 +00:00
pekingme
bfee8a74d7 [Tokens] Upgraded to v0.175.
PiperOrigin-RevId: 572648883
2023-10-12 11:04:28 -07:00
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
afohrman
f2e70d2d66 [Android U] Replaced BuildCompat#isAtLeastU() method calls with explicit SDK checks for UPSIDE_DOWN_CAKE.
Before 1.12.0-alpha01 which was released on 6/7, BuildCompat#isAtLeastU() only returns true if API level is greater than 33 and the version running is a pre-release. Two things happened on 6/7 -- the version became a "platform stable" version, and core library version 1.12.0-alpha01 was released, which changes BuildCompat#isAtLeastU() to return true if the version is 34 and stable.

PiperOrigin-RevId: 540304068
2023-06-14 12:45:51 -07:00
hunterstich
a67a885668 [Predictive Back] Update components to use BackEventCompat
Clients should prefer listening to back events using androidx.activity.OnBackPressedCallback which has been updated to forward BackEventCompat objects in androidx.activity:activity:1.8.0-alpha05. This updates component predictive back APIs to take in BackEventCompat objects instead of android.window.BackEvent objects to simplify usage - getting rid of the need for version checks and object conversions.

PiperOrigin-RevId: 540290323
2023-06-14 12:44:53 -07:00
afohrman
ad9ad204f8 [Side Sheet] Renamed private references of "origin" to "inner" in SheetDelegate and related delegate classes.
PiperOrigin-RevId: 529193878
2023-05-04 07:40:36 -07:00
afohrman
5ba704a273 [Predictive Back] [Side Sheet] Added updateBackProgress() predictive back support for coplanar side sheets.
Before this change, coplanar sheets responded to the sheet during finishBackProgress(), in handleBackInvoked(). After this change, coplanar sheets respond to the back progress while the predictive back event is in progress, in updateBackProgress().

PiperOrigin-RevId: 528470353
2023-05-01 10:53:53 -04:00
afohrman
b984e64445 [Predictive Back] [Side Sheet] Added handleBackInvoked() predictive back support for coplanar side sheets.
Added an AnimatorUpdateListener that runs in finishBackProgress() to make the coplanar sibling's margins update as the sheet slides back to its origin edge.

PiperOrigin-RevId: 527749916
2023-04-28 14:46:43 -04:00
afohrman
8ae8a3791a [Side Sheet] Fixed side sheet swipe calculations in RightSheetDelegate.
These changes fix a bug for coplanar predictive back, where a sheet hide was triggered every time a predictive back swipe was started on a right coplanar sheet, rather than allowing the predictive back swipe.

PiperOrigin-RevId: 527681485
2023-04-28 14:45:04 -04:00
afohrman
f335a50907 [Predictive Back][Side Sheet] Added predictive back support for modal side sheets.
PiperOrigin-RevId: 527334991
2023-04-26 16:21:39 -04:00
afohrman
562285e051 [Predictive Back][Side Sheet] Added predictive back support for standard side sheets.
PiperOrigin-RevId: 527326750
2023-04-26 16:20:46 -04:00
afohrman
d0ad45e1a1 [Side Sheet] Added left/start modal sheet.
Sheet gravity is intended to be set once at setup before the sheet is shown; sheet gravity changes are not supported at runtime and will cause an IllegalStateException.

Also refactored modal sheet demo to recreate the sheet every time it's shown, which allows the sheet gravity changes to take effect for modal sheets.

PiperOrigin-RevId: 526957847
2023-04-25 17:07:13 -04:00
pekingme
a4c65d86d3 [SideSheet] Fixed container color assigned to incorrect attribute.
Should be `app:backgroundTint` not `android:background`.

PiperOrigin-RevId: 523147016
2023-04-11 19:59:04 -07:00
pekingme
5e427da912 [SideSheet] Removed the hasValue check for shapeAppearance to guarantee it always has a user value or default value to avoid NPE.
Resolves https://github.com/material-components/material-components-android/issues/3322

PiperOrigin-RevId: 522114031
2023-04-10 14:52:51 +00:00
afohrman
78fa15748f [Side Sheet] Added LeftSheetDelegate and left sheet support for standard and coplanar side sheets.
Standard and coplanar side sheets now support sliding and dragging from the left side, as well as automatic RTL mirroring when `layout_gravity` is set to `start` or `end`. Change the sheet edge by setting `layout_gravity` on the side sheet view in XML or programmatically.

PiperOrigin-RevId: 518048965
2023-03-20 21:25:55 +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
afohrman
8e12e31c9a [Adaptive][Side Sheet] Renamed references to "outwards" to "outer".
"Outer" is clearer than "outwards".

PiperOrigin-RevId: 499904971
2023-01-05 12:59:26 -05:00
afohrman
e88e341699 [Adaptive][Side Sheet] Renamed private calculateSlideOffsetBasedOnOutwardEdge method to calculateSlideOffset in SheetDelegate and RightSheetDelegate.
The slide offset isn't actually based on the outer edge; changing the outer edge wouldn't change the slide offset calculation.

PiperOrigin-RevId: 499877224
2023-01-05 12:58:03 -05:00
afohrman
3b61327513 [Adaptive][Side Sheet] Added accessibilityPaneTitle to side sheet.
This adds an accessibilityPaneTitle that is spoken by TalkBack on API levels 19 and later.

In order to trigger the accessibilityPaneTitle event, it was necessary to add a visibility change when the sheet is expanded and hidden. The sheet now is INVISIBLE at STATE_HIDDEN and VISIBLE at all other states.

Also removed the code to switch focus to the sheet on expansion in favor of this approach to align with TalkBack's APIs.

PiperOrigin-RevId: 499604691
2023-01-05 12:57:15 -05:00
pekingme
e7d757a5da [SideSheet] Integrated tokens.
PiperOrigin-RevId: 497126105
2022-12-22 23:47:09 +00:00