jetc.dev Newsletter Issue #264

Published: 2025-05-06

This week’s short issue looks at GIFs and window containers, explores LinkAnnotation and composable visibility, and peeks at a drag-and-drop framework.

One Off the Stack, One Off the Slack

You’ve got questions. That’s understandable!

How Can I Show Animated GIFs?

GIF is the image format that will never die. And while Compose lacks built-in support for GIF animations, Coil is there to help, as we see in this week’s Stack Overflow question.

How Big Is My Window Container?

While Compose Multiplatform has LocalWindowInfo.current.containerSize, prior to 1.8.0 that did not work on Android. Alex Styl (Bluesky) released a small library to fill the gap. Learn more about this, its rationale, and the current Android status in this week’s highlighted Kotlinlang #compose #feed Slack thread.

Composable Commentary

Posts, videos, and other new information related to Jetpack Compose!

Medium: Dependency Injection in Compose Previews

Maik Peschutter notes that providing parameters to composables via dependency injection results in composables that cannot be previewed. Maik’s solution is a KSP-based mock generator to make it easier to bypass dependency inversion requirements for previews.

Nav Singh (Mastodon) walks us through the use of LinkAnnotation for embedding links inside an AnnotatedString for display inside BasicText() and its design system wrappers. This is the modern replacement for ClickableText().

How to Track Composable Visibility in Jetpack Compose — with a custom .trackVisibility Modifier

In scrollable content, we sometimes need to know when specific composables come into view, such as for analytics tracking. Paul Franco shows us how to build a trackVisibility() modifier to find out when a composable is visible and by what percentage.

From RecyclerView to LazyColumn: A Performance Optimization Playbook for Jetpack Compose

Sergey Drymchenko explains how to boost the performance of LazyColumn(), from the use of key and immutable models to TextMeasurer and contentType and more.

Resource Roundup

100% pure code!

GitHub: ItNarekDallakyan / ComposeDragAndDrop

Narek Dallakyan is working on a framework for customizable drag-and-drop support in Compose for Android, focusing on LazyColumn() and LazyGrid(), to allow users to reorder items in those collections.

GitHub: aleixo-dev / compose-price-formatter

Nicolas Aleixo brings us PriceField(), a Compose Material3 for Android composable for collecting a monetary amount, complete with auto-formatting of the typed-in text as a currency value.

GitHub: anhaki / PickTime-Compose

Muhammad Anugrah Hakiki has created a set of scrolling wheel-style pickers for dates and times, with full control over text styling and focus indicators.

Notable Releases

Accompanist is up to 0.37.3, with a bug fix.

Appyx released 1.7.1, to upgrade to the latest production Compose version.

Compose Destinations reached 2.2.0. Mostly, this contains bug fixes, but it also adds support for labeled destinations and controlling the timing of result delivery.

Compose Unstyled now is at 1.29.0, adding TextField() and Disclosure(). The latter is an expandable panel containing a heading and content.