add back in snap scrolling#425
Conversation
There was a problem hiding this comment.
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.
| val scrollMode = if (Build.VERSION.SDK_INT >= 37) { | ||
| VerticalScrollMode.SnapScrollMatchHeight(size.height) | ||
| } else { | ||
| VerticalScrollMode.Normal | ||
| } |
There was a problem hiding this comment.
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.
| 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 | |
| } |
No description provided.