10 Commits

Author SHA1 Message Date
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
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
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
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
938105a93b [Adaptive] [Side Sheet] Added detached variants of standard and coplanar sheets.
Added logic for an innerMargin to SideSheetBehavior and delegates and incorporated innerMargin into the sheet offset calculations to account for the extra spacing and avoid a jump when dragging the sheet to STATE_EXPANDED.

Also added a colored background to the catalog demo in order to see the corners of the sheet.

PiperOrigin-RevId: 495701453
2022-12-16 00:56:31 +00:00
afohrman
bc61d6db62 [Adaptive][Side Sheet] Added coplanar side sheet with APIs for setting a coplanar sibling view.
PiperOrigin-RevId: 493959543
2022-12-08 20:03:52 +00:00
dsn5ft
401527f9e7 [Side Sheet] Fix vertically scrolling sheet swipe issue by deleting most of the nested scrolling code
We shouldn't need nested scrolling in side sheet because the scroll and swipe directions are different, and horizontal nested scrolling doesn't seem supported

PiperOrigin-RevId: 493756832
2022-12-08 02:17:10 +00:00
afohrman
2468d6cae6 [Adaptive] [Side Sheets] Add SideSheetCallback listener to SideSheetBehavior to track @SheetState state change events.
Includes a fix for a really strange issue where setting the background color from the callback worked, but if setText was called, it would cause the sheet to flash off the screen when STATE_EXPANDED was reached.

PiperOrigin-RevId: 493409073
2022-12-07 14:48:36 -05:00
afohrman
10d72eebec [Adaptive][Side Sheets] Added initial modal side sheet.
PiperOrigin-RevId: 482846478
2022-10-21 18:52:52 +00:00