jetc.dev Newsletter Issue #87
1.1.0-alpha06 were released, so we take a peek at them!
Also, we look at the impact of composables on garbage collection, where Wear OS is going with its Compose integration, and adding ExoPlayer for video playback. Plus, we explore Clean Architecture, GraphQL, and yet another attempt to make Navigation for Compose easier.
Patch Preview and Alpha Analysis
Reviewing the release notes for the latest Jetpack Compose update!
1.0.4 was released. The headline is that it works with Kotlin 1.5.31.
In fact, that appears to be the only actual change.
We also got Compose
1.1.0-alpha06. Of note:
If you have tests that inject input events, note that the default time between those events was raised from 10ms to 16ms. This might affect the timing of your tests.
There is a new
dismissOnOutsideClickand changed the parameter list.
Recomposer.statewas deprecated. The alternative is a
ViewConfigurationis now supplied to
InjectionScopenow also implements
dpconversions) and has
One Off the Stack, One Off the Slack
You’ve got questions. That’s understandable!
How Do I Add Strikethrough to Text?
we want to strike out some text. In Compose UI,
Text() handles this via
TextDecoration.LineThrough, as we see
in this week’s highlighted Stack Overflow question.
When Do Composition Contents Get GC’d?
Migrating from object models to function-centric programming is confusing enough in Compose.
The fact that composables hold onto some objects past the function call adds to the confusion.
We see what is and what is not retained for recompositions in this week’s
#compose Slack thread.
Posts, videos, and other new information related to Jetpack Compose!
Compose for Wear OS now in Developer Preview!
The Wear Compose / Compose for Wear OS artifacts were bumped up to
According to this official blog post, that is a “developer preview”. 🤷 Regardless, Compose for Wear OS
is progressing fairly nicely.
Compose for Wear OS: Scaffold
Nikit Bhandari examines some of the core composables in Compose for Wear OS,
Learn with code: Jetpack Compose — Playing Media (Part 3)
Ruben Quadros is back, continuing a series of posts examining Compose UI-based app
development. This time, Ruben shows how to integrate ExoPlayer via an
SimpleExoPlayer, to play back videos within the app.
Medium: Jetpack Compose Side Effects — DisposableEffect: effects that require cleanup
Umair Khalid resumes a tour of Compose effects, looking at
cases where you need to do some work to “undo” a side effect when the composition
is disposed, such as unregistering a listener.
Medium: Clean Architecture in the flavour of Jetpack Compose
“Clean Architecture” is one of those things that lots of people agree with in principle
but not all that many implement fully. Here, Paul Allies explores what it takes to create
a fairly faithful implementation of Clean Architecture, complete with use cases, Jetpack’s
ViewModel, and more.
Video: Using GraphQL in a KMM project with Jetpack Compose and SwiftUI
John O’Reilly has been exploring Kotlin/Multiplatform, sharing common code while using customized UIs for Android (via Compose UI) and iOS (via SwiftUI). In this presentation to Brighton Kotlin, John talks about those experiences, specifically when using the Apollo client library for accessing GraphQL-based Web services.
Jetpack Compose Hourglass animation on canvas in Android
Rajasekhar walks through what it takes to render custom shapes to a Compose UI
in this case drawing a basic hourglass shape.
Jetpack Compose vs Tetris®
Graziano Rizzi did not write a post about Tetris®. Rather, Graziano wrote a post about rendering a game-style UI using Compose UI, where that UI consists of falling blocks that can be rotated. Any resemblance of this to Tetris® is purely coincidental. 😉
Other Interesting Links
- Learn with code: Jetpack Compose — Lists and Pagination (Part 1)
- Jetpack Compose: Drag-and-drop reorder for lists
- Medium: Jetpack Composable to Bitmap Image
- Rebuilding The Flutter Counter App In Jetpack Compose
- Bottom Navigation in Jetpack Compose
- Modern Design Practices: Jetpack Compose
- Jetpack Compose Basics
- Medium: Getting Started With Jetpack Compose
- Medium: JETPACK COMPOSE: Understanding Prerequisite, Use-case, and Code flow
100% pure code!
GitHub: STAR-ZERO / compose-navgen
Another week, another library to try to simplify the use of Navigation for Compose.
In this case, Kenji Abe is working on a KSP-based Gradle plugin to take
composables and create routes and helper functions for you, to make navigating
to those composables look more like just calling ordinary functions.
GitHub: warting / permissions-ui
Runtime permissions are annoying. Location runtime permissions are even more annoying,
particularly for background use and on Android 12+. Stefan Wärting created a
LocationInBackgroundTutorialView() composable that aims to hide all of that
complexity, while also providing an explanatory UI to help guide the user through
Other Interesting Links
Or, you can subscribe to the Atom feed or follow Mark Murphy in the Fediverse.
- 2023-05-30: Compose beta! Tracking continuous composable presses! Animated carousels! MVI! 2D scrolling layouts! Tables! And... a stable function?!?
- 2023-05-23: Focus and preview cards for Compose for TV! Interactions and visual states! ViewCompositionStrategy! Compose for iOS, for real! @firstname.lastname@example.org is zooming! Data tables! And... BasicTextField2, the sequel?!?
- 2023-05-16: Google I/O! New Compose BOM and alpha! Viewmodels! BottomScaffold()! SealedX! Lottie! Dynamic themes! Floating action menus!