David Seroussi
David Seroussi

Reputation: 1710

ToolBar above BottomSheetDialog

How to show a ToolBar above a BottomSheetDialog ? When the dialog is shown, the screen gets a dark tint so the ToolBar seems to be below the dialog and not clickable. How can I my ToolBar (or any other view) "above the dialog" ? Or maybe there is a way to put the dialog below the ToolBar ?

Here is hat I have :
enter image description here

And this is what I want (ToolBar above / dialog below) :

enter image description here

Upvotes: 2

Views: 775

Answers (1)

ianhanniballake
ianhanniballake

Reputation: 199880

BottomSheetDialog specifically dismisses if the user clicks outside of it, hence the overlay of the rest of your Activity. If you'd prefer to keep it open and allow other parts of your UI to be active (rather than move your Toolbar shaped view into the BottomSheetDialog), you should just attach a BottomSheetBehavior to a View in your hierarchy.

Upvotes: 1

Related Questions