Skip to content

Conversation

@atorresveiga
Copy link
Contributor

@atorresveiga atorresveiga commented Mar 18, 2025

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, MediaPickerActivity consumes insets and applies the needed padding to the screen.

Testing

For testing this PR, it is better to use this Woo PR

@kidinov
Copy link

kidinov commented Mar 18, 2025

@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

@atorresveiga
Copy link
Contributor Author

Good point @kidinov 👍

which should be 0 and adding padding to the last item into the recycler view

Fixed here 8f6d418

insetsMask = WindowInsetsCompat.Type.navigationBars(),
consumeInsets = true
) { insets ->
binding.recycler.addItemDecoration(LastItemPaddingDecoration(insets.bottom), 0)
Copy link

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)

Copy link
Contributor Author

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 kidinov self-assigned this Mar 19, 2025
@kidinov kidinov self-requested a review March 19, 2025 07:42
Copy link

@kidinov kidinov left a 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

@atorresveiga atorresveiga merged commit 0e275be into trunk Mar 19, 2025
13 checks passed
@atorresveiga atorresveiga deleted the issue/13396-media-picker-edge-to-edge-support branch March 19, 2025 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants