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
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
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
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
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
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
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
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
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
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
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
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
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