Stylianos Gakis
04/07/2023, 8:31 AMI think there might be flaw in existing logic here.....if we're showing grid layout like this we should at least also be showing nav rail instead of bottom bar....
Yeah I was wondering the same about this tbh. I think the guidelines are that for a phone in landscape mode, usually you don't show a nav-rail at all in the first place. So provided that this is true, wouldn't this kinda automatically mean that maybe the phones shouldn't be seeing this style of view in landscape mode? I do really love the way it looks, but looking at the screenshots here, and they even come from a pixel 7 Pro which has a rather big screen, it's already not that easy to actually use that grid as opposed to the normal list.
John O'Reilly
04/07/2023, 8:50 AMStylianos Gakis
04/07/2023, 8:58 AMJohn O'Reilly
04/07/2023, 8:59 AMvar shouldShowSettingsDialog by mutableStateOf(false)
private set
val shouldShowBottomBar: Boolean
get() = windowSizeClass.widthSizeClass == WindowWidthSizeClass.Compact
val shouldShowBottomBar: Boolean
get() = windowSizeClass.widthSizeClass == WindowWidthSizeClass.Compact ||
windowSizeClass.heightSizeClass == WindowHeightSizeClass.Compact
val shouldShowNavRail: Boolean
get() = !shouldShowBottomBar
mbonnin
04/07/2023, 9:22 AMJohn O'Reilly
04/07/2023, 9:25 AMStylianos Gakis
04/07/2023, 9:30 AMdo you think this effects how we need to handle insets now
No I think we're good. The reason I specifically had passed the consume insets modifier only when the bottom bar is shown is for exactly this case where the bar isn't shown. It should all work correctly even after this change. I don't think actually not allowing the phone user to use landscape mode is the right call regardless of what's happening. Adapting the UI to it sure, but not allowing it is a very bad experience from an app imo. One last thing I can try doing is have this grid go under the nav system bar actually, instead of having the padding at the bottom since it doesn't actually need to have that extra space, as long as it has the internal padding when scrolled all the way down. The other big decision that could be made is to simply not use the grid view in phone form factors. But those are the options pretty much 😅
mbonnin
04/07/2023, 9:36 AMJohn O'Reilly
04/07/2023, 9:47 AMmbonnin
04/07/2023, 9:48 AMStylianos Gakis
04/07/2023, 9:49 AMJohn O'Reilly
04/07/2023, 9:49 AMStylianos Gakis
04/07/2023, 11:13 AMJohn O'Reilly
04/07/2023, 11:30 AMval titleFontSize =
if (appState.isExpandedScreen) 40.sp else MaterialTheme.typography.titleLarge.fontSize
Stylianos Gakis
04/07/2023, 2:20 PMBox(
Modifier
.windowInsetsPadding(WindowInsets.safeDrawing.only(<http://WindowInsetsSides.Top|WindowInsetsSides.Top>))
.size(64.dp)
.border(2.dp, Color.Red)
)
There isn’t much to be done in that case for landscape mode for it then.
Options would be:
• Changing the scroll behavior and have it disappear while scrolling.
• Do the same but for the Pager indicators
• Consider collapsing the room titles instead
• Any combination of the three above
• Do nothing and accept the current state
Because right now ~45% of the screen real estate is taken by
TopAppBar
PagerIndicators
RoomTitles
I guess this was worked around this way before, but there were some issues with it since it’s commented out.John O'Reilly
04/07/2023, 2:25 PM