-
-
Notifications
You must be signed in to change notification settings - Fork 736
Support edge to edge in widget configure activities #5352
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I might be picky, but the design here isn't really what I expected from edge to edge. The navigation bar isn't transparent (note the button getting cut off) and in the XML activities, the Toolbar scrolls with the page content (not new, but this might be the time to fix it). (using landscape with larger font size as a quick test, but can also happen in portrait on smaller screens or if configuration appears after selecting an entity pushing items down) |
@Composable | ||
fun safeBottomWindowInsets(): WindowInsets { | ||
return WindowInsets.safeDrawing.only(WindowInsetsSides.Bottom + WindowInsetsSides.Horizontal) | ||
} | ||
|
||
@Composable | ||
fun safeBottomPaddingValues(): PaddingValues { | ||
return safeBottomWindowInsets().asPaddingValues() | ||
} | ||
|
||
@Composable | ||
fun safeTopWindowInsets(): WindowInsets { | ||
return WindowInsets.safeDrawing.only(WindowInsetsSides.Top + WindowInsetsSides.Horizontal) | ||
} | ||
|
||
@Composable | ||
fun safeTopPaddingValues(): PaddingValues { | ||
return safeTopWindowInsets().asPaddingValues() | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jpelgrom I think I should double check in settings screen the insets because I didn't handle the case of cutout corner like you've said in barcode PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After a quick look it's seems to be ok for SettingsActivity since I apply the safeDrawing except at the bottom and that's enough.
Merged if any issue arise I will tackle it in another PR. |
Summary
In order to tackle part of #5328, this PR enable support for edge to edge in all the configure widget screens.
Checklist