24 Commits

Author SHA1 Message Date
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
afohrman
af16b051af [Adaptive][Side Sheet] Removed unused methods in SheetDialog and SideSheetDialog.
Also remove the redundant call to supportRequestWindowFeature in SideSheetDialog's constructor.

PiperOrigin-RevId: 495715894
2022-12-16 00:58:14 +00:00
afohrman
ad3cf5ad6b [Adaptive][Side Sheet] Add detached variant of modal side sheet.
PiperOrigin-RevId: 495709828
2022-12-16 00:57:15 +00: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
2fd2d66b43 [Adaptive][Side Sheet] Fixed issue where sheet would jump to the far edge of the screen in RTL without temporary fix.
PiperOrigin-RevId: 495687169
2022-12-16 00:55:39 +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
afohrman
48a3a758fa [Adaptive][Side Sheet] Set accessibility focus to the side sheet when expanded.
PiperOrigin-RevId: 493938007
2022-12-08 19:51:47 +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
d481dddefd [Adaptive] [Side Sheet] Cancel modal side sheet scrim on STATE_HIDDEN.
PiperOrigin-RevId: 493655992
2022-12-07 14:51:53 -05:00
afohrman
c64f57224b [Adaptive] [Side Sheet] Restrict SheetDialog methods from the public API surface and rename getDismissWithAnimation.
PiperOrigin-RevId: 493644328
2022-12-07 14:51:08 -05: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
2ab5430fed [Adaptive] [Side Sheet] Renamed SheetEdge#RIGHT to SheetEdge#EDGE_RIGHT.
PiperOrigin-RevId: 493093973
2022-12-06 15:21:53 -05:00
afohrman
0f9c6fcab8 [Adaptive] [Side Sheet] Made SheetDialog abstract base class and Sheet interface package-private.
PiperOrigin-RevId: 492534084
2022-12-02 18:33:21 -05:00
afohrman
6476acde65 [Adaptive] [Side Sheet] Add @RestrictTo annotations to restrict SheetEdge annotation interface.
PiperOrigin-RevId: 492269491
2022-12-01 16:30:32 -05:00
afohrman
b384b9b535 [Adaptive] [Side Sheet] Made SideSheetBehavior extendable.
PiperOrigin-RevId: 492256730
2022-12-01 16:17:30 -05:00
afohrman
7a706cc82c [Adaptive] [Side Sheet] Add STATE_HIDDEN to SideSheetBehavior#getState javadoc.
STATE_HIDDEN was missing from the list of possible state constants returned by getState().

PiperOrigin-RevId: 489292973
2022-11-18 16:56:39 -05:00
afohrman
1653055b2c [Adaptive] [Side Sheet] Changed modal side sheet shape to large.
PiperOrigin-RevId: 487001390
2022-11-10 18:21:26 +00:00
afohrman
10d72eebec [Adaptive][Side Sheets] Added initial modal side sheet.
PiperOrigin-RevId: 482846478
2022-10-21 18:52:52 +00:00
raajkumars
8a4af07979 [Icon Buttons] Added support for toggleable Icon buttons.
PiperOrigin-RevId: 462638190
2022-07-25 11:20:13 -04:00
afohrman
d43416e3e4 [Side Sheets] Added new sidesheet package, new SideSheetBehavior, and basic standard side sheet demo to Adaptive Sheets catalog demo.
Does not include functionality or the modal side sheet. At the moment, the catalog demo includes a placeholder standard side sheet with a show/hide button that toggles the visibility between GONE and VISIBLE.

PiperOrigin-RevId: 462192554
2022-07-20 21:48:31 +00:00