简体   繁体   中英

Show Snackbar outside of Popup View

I have a Popup window where pressing on a button opens a Snackbar . I want this Snackbar to show on the bottom of the screen, not on the bottom of the popup window, so I pass the root View to the Snackbar.make function instead of the popup view.

The Snackbar shows up on the bottom of the screen now, but since the screen behind the popup window is darkened, the snackbar object is also shown behind the gray filter.

I would like to keep this gray layer above the window behind the popup window while showing the snackbar as if it were on the top layer (without the gray filter on it). How do I do that?

Thanks!

Make a Snackbar opening function on the fragment or activity, then when you instantiate the PopupView you pass the method through a listener.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM