Forum Discussion
UI question on foldable: How to display a small amount of content on top of an extended canvas?
- Apr 14, 2022
Hi Tobias,
Thanks for your question!
To be honest, I also am not an expert in Android components/Material Design, but from what you have described, it sounds like a Sheet would fit your needs. We do use a custom component similar to a BottomSheet/Drawer in the NavigationRail Compose sample, but like you mentioned, some content is still shown when the component is collapsed, so that wouldn't fit your exact use case.
Yuranranran / khalper Tank you so much for your feedback!
To be honest, I just learned that a bottom sheet exists from using your navigation rail sample khalper - you are my entry in "how to 'design' for Android" :).
But it seems I should give it another try.
*Upcoming question*
Is it "allowed" that a Navigation Rail Item tap opens "just" a bottom sheet instead of a "full" page navigation?
Haha well I'm glad the sample was helpful to you in that way!
Now that you mention it, it is recommended to use a navigation rail for primary app destinations, but if the content doesn't take up the whole screen, I'm not sure if it would count as a destination.
Yuran and I discussed this some more and we think that some alternative solutions could be Floating Action Buttons or buttons in the TopAppBar. It seems like the map is your main screen and that the About/Settings views have minimal content that can temporarily overlay the map, so maybe something like that would work better for you. A Sheet could still work to show that content, or maybe even a Dialog.
In the end, though, it's totally up to you! We couldn't find any specific official guidance for this use case, and navigation rails are recommended for large screens, so whichever approach you like best will work just fine 🙂