Dewey Bottom Sheet
A popup window that shows the the dewey bottom sheet.
It supports overriding the ui mode to force light or dark mode. In those cases, A DayNight theme must be provided via mThemeResId to make it work. Since custom view layout requires certain attributes to be set in the theme, it is recommended to use the default app theme. For UiMode.AUTOMATIC, it's not necessary.
Constructors
Properties
Whether the popup is cancelable. If set to true, the popup can be dismissed by pressing the back button.
Whether the popup is canceled when the user touches outside of the popup.
Whether the dismiss icon button is visible.
Whether the drag-to-dismiss gesture is enabled. If set to true, the user can drag the popup to dismiss it.
Whether the handle is visible. The handle is the small bar at the top of the popup that indicates that the popup is draggable.
Whether the title bar is visible.
Whether the border below the title bar is visible. It is only visible when the title bar is visible.
Functions
Override this method if the content view contains vertically scrollable views that could conflict with the drag-to-dismiss gesture. For example, if the content view contains a vertically scrollable RecyclerView:
Get the content view that was inflated by the setContentView method. This method will return null if the content view has not been inflated yet.
Executed when the content view passed via setContentView is inflated.
Executed when the popup is dismissed. This has the same trigger as the setOnDismissListener.
Set the visibility of the background overlay. The overlay is a semi-transparent background that covers the screen behind the popup.
Customize the enter animation parameters for the popup. The default values are:
Set the maximum height restriction of this popup content. Only for portrait mode.
Optional. Set the listener for the dismiss image button, if not set, the default behavior is to dismiss the popup.
Set the primary button text and the listener for the click event. Setting the text to null will hide the button.
Override the primary button size. Optional. Default is ButtonSize.LARGE.
Override the primary button style. Optional. Default is ButtonStyle.ACCENT.
Set the secondary button text and the listener for the click event. Setting the text to null will hide the button.
Override the secondary button size. Optional. Default is ButtonSize.LARGE.
Override the secondary button style. Optional. Default is ButtonStyle.SUBTLE.
Set whether the sheet should be dismissed when the configuration changes, like orientation change. Default is false.
Set the message that will be read by the screen reader when the popup container gets focus. This could be used to provide additional context to the user about the popup when it is firstly showing on the screen.