-
Notifications
You must be signed in to change notification settings - Fork 95
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
Fix bottom padding for responsive() SLC #1826
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
@@ -198,11 +203,12 @@ public object ScalingLazyColumnDefaults { | |||
index = 0, | |||
offsetPx = topScreenOffsetPx, | |||
), | |||
autoCentering = null, |
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.
Is that fix replaces some issue with AutoCentering behavior?
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.
AutoCentering API is this
public class AutoCenteringParams(
// @IntRange(from = 0)
internal val itemIndex: Int = 1,
internal val itemOffset: Int = 0,
)
You can ensure that the top is correctly working. However it doesn't ensure that the bottom can be completely scrolled into view.
So better to disable it, and do it manually with enough content padding at the bottom to allow the last item to be unobscured.
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.
@Kpeved without this change, the responsive
screens hit this issue.
With the change, they can scroll so the last item is mostly not cutoff.
...rologist.screensizes_ScalingLazyColumnDefaultsTest_responsive_end[6]_smalldevicebigfonts.png
Outdated
Show resolved
Hide resolved
...oid.horologist.screensizes_MediaPlayerLibraryTest_screenshot[2]_samsunggalaxywatch6large.png
Outdated
Show resolved
Hide resolved
# Conflicts: # sample/src/test/snapshots/images/com.google.android.horologist.screensizes_MediaPlayerLibraryTest_screenshot[2]_samsunggalaxywatch6large.png # sample/src/test/snapshots/images/com.google.android.horologist.screensizes_ScalingLazyColumnDefaultsTest_responsive[2]_samsunggalaxywatch6large.png
cc @garanj |
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
WHAT
Fix bottom padding for SLC.
WHY
Bottom item if larger than a Chip, such as a Card will be obscured.
AutoCenteringParams doesn't allow adjusting the bottom item, and with Anchor = Start will only ensure the start of the final item can get to the center, which is not enough.
HOW
Checklist 📋