-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[Android] SpacingItemDecoration improvement #27093
base: main
Are you sure you want to change the base?
[Android] SpacingItemDecoration improvement #27093
Conversation
Hey there @kubaflo! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
@@ -477,8 +477,7 @@ protected virtual void UpdateItemSpacing() | |||
// We need to adjust the padding on the RecyclerView so this spacing isn't visible around the outer edge of our control. | |||
// Horizontal & vertical spacing should only exist between items. | |||
var horizontalPadding = -spacingDecoration.HorizontalOffset; | |||
var verticalPadding = -spacingDecoration.VerticalOffset; | |||
SetPadding(horizontalPadding, verticalPadding, horizontalPadding, verticalPadding); | |||
SetPadding(horizontalPadding, 0, horizontalPadding, 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.
Could you include a test?
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.
I'm not sure how. I don't think we can test it. Maybe you have an idea perhaps?
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.
It doesn't affect the UI, but the rendering time when creating cells, right?
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.
can we just compare screenshot ?
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.
Right, a UI test with consistent screenshots after scrolling the CV should be trustworthy
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.
@rmarinho @jsuarezruiz added :)
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
Description of Change
Vertical padding set on the recyclerView affected the rendering process. It is much more efficient to fully rely on ItemDecoration to manage spacing between items.
Issues Fixed
Fixes #24511
Fixes #8422
Screen.Recording.2025-01-13.at.11.51.36.mov
Screen.Recording.2025-01-13.at.11.49.06.mov
Screen.Recording.2025-01-14.at.10.49.40.mov
Screen.Recording.2025-01-14.at.10.46.01.mov