The API allows setting horizontal insets for the accessory view that are different from the message. This is most often used for dialogs that have both a message and an accessory view, as demonstrated in the attached example.
Additionally, this example demonstrates how to add an horizontal hairline as shown on the material.io spec for Confirmation Dialogs.
Note:
This new API is needed because clients do not always have control over the view that is being used as an accessory view, or that the view is used in multiple areas in the app, and cannot be customized.
Additionally, there's no way currently to set 0 insets for the accessory view, while still keeping the 24 value insets for the message, which is a relatively common scenario.
PiperOrigin-RevId: 334142026
We do not update needsScrollToSelectedItem to YES in every setBounds or just remove the flag and have it scroll to the selected item in every layoutSubviews because this is a UIScrollView so every scroll updates the contentOffset which then triggers these methods. We want to only trigger this code path in orientation/size changes.
PiperOrigin-RevId: 333731208
This example demonstrates adding a collection view as an accessory view of a Material alert. It also demonstrates adding a horizontal line above the actions, as shown on material.io's spec for Confirmation Dialogs. The line will be fixed to reach the edges of the dialogs in a followup PR (cl/331128888).
PiperOrigin-RevId: 333376220
*** Reason for rollback ***
This is causing regression b/168438879, when receiving .screenchanged notification, we switch focus to other element on the page, and this cause the snackbar to auto dismiss.
*** Original change description ***
Enable shouldDismissOnOverlayTap for VO enabled scenario
BEGIN_PUBLIC
Enable shouldDismissOnOverlayTap for VO enabled scenario
END_PUBLIC
Per discussion in b/167609843, based on GAR requirement, snackbar with action button shouldn't self-dismiss when VO is enabled, but If a user does an action then we should/could dismiss the snackbar. This CL uses shouldDismissOnOverlayTap property added in cl/310921840 to enable the dismiss when user takes action on overlay.
***
PiperOrigin-RevId: 331654884
This adds a dismissOnAccessibilityPerformEscape bit that allows clients to control whether the bottom drawer should dismiss or not on Z swipe. This is useful for when clients have an extra step before dismissal (e.g. confirmation on dismiss).
PiperOrigin-RevId: 331594189