Skip to content

add back in snap scrolling#425

Merged
ashnohe merged 1 commit into
mainfrom
snapscroll
Jul 10, 2026
Merged

add back in snap scrolling#425
ashnohe merged 1 commit into
mainfrom
snapscroll

Conversation

@ashnohe

@ashnohe ashnohe commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the Glance library dependency to version 1.3.0-alpha02 and refactors the FullBleedImageLayout to consolidate the gallery rendering logic, using a dynamic VerticalScrollMode based on the API level. However, the API level check should be updated to use Build.VERSION.SDK_INT_FULL >= Build.VERSION_CODES_FULL.BAKLAVA_1 instead of Build.VERSION.SDK_INT >= 37 to ensure proper compatibility with Baklava (Android 16 / API 36) devices.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment on lines +68 to +72
val scrollMode = if (Build.VERSION.SDK_INT >= 37) {
VerticalScrollMode.SnapScrollMatchHeight(size.height)
} else {
VerticalScrollMode.Normal
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Using Build.VERSION.SDK_INT >= 37 might prevent snap scrolling from working on Baklava (Android 16 / API 36) devices. It is safer and more consistent with the previous implementation to use Build.VERSION.SDK_INT_FULL >= Build.VERSION_CODES_FULL.BAKLAVA_1.

Suggested change
val scrollMode = if (Build.VERSION.SDK_INT >= 37) {
VerticalScrollMode.SnapScrollMatchHeight(size.height)
} else {
VerticalScrollMode.Normal
}
val scrollMode = if (Build.VERSION.SDK_INT_FULL >= Build.VERSION_CODES_FULL.BAKLAVA_1) {
VerticalScrollMode.SnapScrollMatchHeight(size.height)
} else {
VerticalScrollMode.Normal
}

@ashnohe ashnohe merged commit 36ec106 into main Jul 10, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants