Hello, trying to use Accompanist Horizontal Pager with Bottom Sheet but the tab part of the screen is not dimming as I use bottom sheet inside pages. I don’t want to use the BottomSheet in holder Compose view because it’d be too much hassle for handling click events, passing correct list of items etc. How do I dim the rest of the screen properly or what would be the more efficient way to integrate BottomSheet while using Pager if each tab required bottom sheet?
f
FunkyMuse
08/07/2022, 12:12 AM
You'd add a scrim yourself that you add a z index of 2 and make sure your bottom sheet has a z index of 3 that'll be bigger than the scrim, when/if user taps the scrim then you dismiss the bottom sheet
Or even better, if you're using navigation component just make that bottom sheet a destination, it'll handle everything for you
n
nuhkoca
08/07/2022, 9:20 AM
Unfortunately, we are not using navigation yet. Could you be so kind if you give me a code example of what you are trying to say bc I couldn’t image. Thank you 🙂
o
Oleksandr Balan
08/08/2022, 3:17 PM
We had a similar issue with a BottomBar, so we have implemented it by adding the bottom sheet to the separate window, such as