Skip to content

Add Full Bleed Snap Scrolling Glance Canonical Layout#418

Merged
ashnohe merged 13 commits into
mainfrom
feature/full-bleed-snap-widget
Jun 4, 2026
Merged

Add Full Bleed Snap Scrolling Glance Canonical Layout#418
ashnohe merged 13 commits into
mainfrom
feature/full-bleed-snap-widget

Conversation

@ashnohe
Copy link
Copy Markdown
Contributor

@ashnohe ashnohe commented Jun 4, 2026

Add full bleed snap scrolling Glance Canonical Layout

snapscrolling

ashnohe added 12 commits May 26, 2026 20:24
- Implemented FullBleedImageLayout featuring edge-to-edge layout with VerticalScrollMode.SnapScroll
- Created FullBleedImageAppWidget receiver with FakeImageGridDataRepository
- Configured adaptive text sizing via FontUtils, scaling titles and captions dynamically
- Set limits to exactly 5 items and made widget collapsible down to 2x1 cell size
- Configured edge-to-edge properties, drawable resources, and registered in CanonicalLayoutActivity
- Bumped Glance dependency to 1.3.0-alpha01 and set compileSdk to 37
…geLayout

- Decouple the linear gradient background scrim from the text column into flat independent sibling layers inside GalleryItemCard.
- Establish a reliable size-class dependent height (100.dp / 140.dp) for the bottom scrim drawable.
- Promote LongTextLayoutDimensions to WidgetTextDimensions to allow shared metrics.
- Add sample_scrim_gradient drawable.
- Add truncateTextToFit helper in FontUtils.
…optimize text-scaling thresholds, and refresh the widget fallback preview image
- Flatten composition tree by removing redundant key(LocalSize.current) wrappers.\n- Hoist LocalSize and LocalContext lookups to FullBleedImageLayout to optimize recompositions.\n- Enable stable list item keying with Glance LazyColumn itemId optimization.\n- Refactor FakeImageGridDataRepository to use non-blocking coroutineScope instead of runBlocking.\n- Sanitize drawables and preview layout bindings, deleting duplicative png assets.
Copy link
Copy Markdown
Contributor

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

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 introduces a new 'Full Bleed Snap Scrolling' widget sample using Glance, which includes updating the Glance library version, adding the widget receiver to the manifest, and implementing the full-bleed layout with snap scrolling. Feedback focuses on preventing runtime crashes on older devices (down to minSdk 21) by replacing @RequiresApi annotations with runtime SDK checks in CanonicalLayoutActivity and FullBleedImageAppWidget. Additionally, it is recommended to directly implement the gradient scrim workaround in FullBleedImageLayout rather than just describing it in a comment.

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.

@alabiaga
Copy link
Copy Markdown
Member

alabiaga commented Jun 4, 2026

LGTM though perhaps look at 'High Priority' asks from gemini code assist.

@ashnohe ashnohe merged commit 5b56e2a into main Jun 4, 2026
7 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