-
Notifications
You must be signed in to change notification settings - Fork 1
Media picker edge to edge support #87
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
Media picker edge to edge support #87
Conversation
|
@atorresveiga Considering that this is a library, maybe adding proper edge-to-edge support right away here makes sense? I am talking about the bottom inset, which should be 0 and adding padding to the last item into the recycler view |
| insetsMask = WindowInsetsCompat.Type.navigationBars(), | ||
| consumeInsets = true | ||
| ) { insets -> | ||
| binding.recycler.addItemDecoration(LastItemPaddingDecoration(insets.bottom), 0) |
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.
@atorresveiga 👋
Would it do the same, just slightly simpler?
binding.recycler.clipToPadding = false
binding.recycler.updatePadding(bottom = insets.bottom)
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.
Nice suggestion. Fixed here 732de84
kidinov
left a comment
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.
LGTM!
I just left a suggestion how we maybe can do the same in a simpler way
Description
This PR fixes some UI issues after updating to SDK 35 and the default edge-to-edge support. With the changes in this PR,
MediaPickerActivityconsumes insets and applies the needed padding to the screen.Testing
For testing this PR, it is better to use this Woo PR