jetc.dev Newsletter Issue #259
Published: 2025-04-01
We got another small RC of Compose 1.8.0
and some other updates, so let’s take a look!
We also explore Media3’s nascent Compose support, animateBounds()
, and implementing custom
modifiers using Modifier.Node
. Plus, we see another attempt at implementing rich text editing,
along with some UI that its developer says is useless.
Ooooo… What Did We Get?
Reviewing the release notes for the latest Jetpack Compose update!
The Compose BOMs are up to 2025.03.01
. The BOM mapping page
does not know about it. 🤷🏻
The main Compose artifacts are up to 1.8.0-rc02
, as we inch closer to a stable release.
A bug related to focused composables being removed from lazy lists was fixed. And that appears
to be about it.
Compose Material3 is up to 1.4.0-alpha11
, with some changes and removals tied to FloatingToolbar()
,
among other minor changes.
Wear Compose is up to 1.5.0-alpha02
, mostly
focused on SwipeToReveal()
fixes.
And, we got a series of updates to Compose-adjacent libraries, including:
androidx.activity:activity-compose:1.11.0-alpha02
androidx.lifecycle:lifecycle-runtime-compose:2.9.0-alpha13
androidx.lifecycle:lifecycle-runtime-compose-android:2.9.0-alpha13
androidx.lifecycle:lifecycle-runtime-compose-jvmstubs:2.9.0-alpha13
androidx.lifecycle:lifecycle-runtime-compose-linuxx64stubs:2.9.0-alpha13
androidx.lifecycle:lifecycle-viewmodel-compose:2.9.0-alpha13
androidx.lifecycle:lifecycle-viewmodel-compose-android:2.9.0-alpha13
androidx.lifecycle:lifecycle-viewmodel-compose-desktop:2.9.0-alpha13
androidx.media3:media3-ui-compose:1.6.0
androidx.navigation:navigation-compose:2.9.0-alpha09
androidx.navigation:navigation-compose-android:2.9.0-alpha09
androidx.navigation:navigation-compose-jvmstubs:2.9.0-alpha09
androidx.navigation:navigation-compose-linuxx64stubs:2.9.0-alpha09
androidx.navigation:navigation-fragment-compose:2.9.0-alpha09
androidx.savedstate:savedstate-compose:1.3.0-alpha11
androidx.savedstate:savedstate-compose-android:1.3.0-alpha11
androidx.savedstate:savedstate-compose-jvmstubs:1.3.0-alpha11
androidx.savedstate:savedstate-compose-linuxx64stubs:1.3.0-alpha11
More on that media3-ui-compose
artifact later in the issue!
One Off the Stack, One Off the Slack
You’ve got questions. That’s understandable!
How Can I Love Previews Just a Bit Less?
Android Studio sometimes really wants you to view Compose previews… even when the file you are editing does not contain any composables. See where in Settings to adjust this behavior in this week’s highlighted Stack Overflow question.
Does My Switch()
Have to be Purple?
Working with Compose Material3 themes can be tricky, especially for composables with a
variety of states. Between colors and tints, getting what you want may not be as straightforward
as you might think. See why Switch()
might appear purple instead of gray, and how to
address that, in this week’s highlighted Kotlinlang #compose
Slack thread.
Composable Commentary
Posts, videos, and other new information related to Jetpack Compose!
Media3 1.6.0 — what’s new?
Google’s Andrew Lewis gives us a quick rundown of what is in Media3’s 1.6.0
release.
Of note to Compose for Android developers is media3-ui-compose
, which is beginning the
process of offering composable UI elements for media playback.
3 neat animations you can create with Modifier.animateBounds
TJ Dahunsi provides us with a deep dive on animateBounds()
, with examples of
transitioning between layouts within a screen, such as a notification-style panel expanding
into a list and a SplitLayout()
-based column pair with swappable content.
Medium: Improving the Modal Bottom Sheet API in Jetpack Compose
Joost Klitsie, like others, really dislikes the ModalBottomSheet()
API, such as its imbalanced
animations for in and out transitions. In this post, Joost creates a couple of AnimatedBottomSheet()
wrappers for ModalBottomSheet()
, including one that uses a nullable sealed interface
parameter to transition the sheet between different contents or eventually close the sheet.
Medium: Level Up Your Compose Modifiers: Mastering the Node API
The Modifier.Node
API is the recommended approach for most custom modifiers, yet its API
is rather confusing. Siddharth Gupta walks us through the development of a trackVisibility()
modifier, showing the use of Modifier.Node
, GlobalPositionAwareModifierNode
, ModifierNodeElement
,
and more.
Compose for Desktop: App size comparison
Colton Idle held a “bake-off” of different ways to compile and package a Compose for Desktop app and shows the results for the resulting app and its ZIP packaged form. The goal: minimize the app size!
Open the default browser across platforms
Thomas Künneth
(Bluesky)
shows how to create a Kotlin Multiplatform openInBrowser()
function, with iOS, Android,
and desktop implementations. Thomas then shows how to use that function from a Compose
Multiplatform UI to open a Web browser on an arbitrary URL.
Video: Redefine Possible: Unleashing the Power of Jetpack Compose
Selen Demir provides an overview of Compose UI, from first principles through practical implementations.
Other Interesting Links
- Advanced Jetpack Compose Previews
- Medium: Building a Material You ADB File Manager with Compose Desktop
- Medium: How to Automatically Test Jetpack Compose Navigation
- Medium: Jetpack Compose Modifier Extensions: The Secret to Clean & Reusable UI Code
- Medium: Managing States in Jetpack Compose: A Beginner’s Guide
- Medium: Recomposition vs Invalidation: How Jetpack Compose Changes the Game
- Medium: Stale Closure — The State Capture Issue
- Migration of an iOS/Android Application to Kotlin Multiplatform: Methodology and Key Steps
- State Management Patterns in Jetpack Compose
Resource Roundup
100% pure code!
GitHub: Wavesonics / ComposeTextEditorLibrary
Adam Brown is trying again to create a rich text editor for Compose Multiplatform. Previous
attempts were made using BasicTextField()
as a foundation — this time, Adam is trying
to build one from scratch.
GitHub: zahid4kh / compose-alert-kit
GitHub user zahid4kh brings us a library to display toasts, snackbars, and simple types of modal dialogs, with the library managing the state for those components and giving you stock implementations of their UI.
GitHub: seanKenkeremath / useless-ui
Sean Kenkeremath is building a set of libraries for implementing “fun, but probably useless UI components”.
The initial offerings are ShatterableLayout()
and ShatterPager()
, which blow up your
composable, scattering shards everywhere.
Other Interesting Links
- GitHub: DongChyeon / TimePicker (English/Korean time picker)
- GitHub: CookieDinner / SimplePager (data paging implementation)
- GitHub: t895 / MaterialSwitch (Compose Multiplatform implementation of Material3
Switch()
) - GitHub: tmfrl1590 / JetpackComposeLoadingBar (loading animations)
Or, you can subscribe to the Atom feed or follow Mark Murphy in the Fediverse.
Recent Issues:
- 2025-03-25: Compose Multiplatform beta! Accessibility! Hot reload! BringIntoViewSpec! And... does this hash seem blurry?!?
- 2025-03-18: Compose RC! States and flows! Accessibility! Dialogs! Dropdowns! Callouts! Lazy tabs! And... did you bump my composable?!?
- 2025-03-11: Compose beta! Compose Multiplatform alpha! Hot reload! Mesh gradients! Strong skipping! Permissions! And... what happens if our desktop goes dark?!?