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!
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!
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.
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.
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.
“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.
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.
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!
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.
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
- 2022-05-17: Google I|O 2022 videos! Compose beta01! Layout()! State! drawBehind()! Credit cards! App intros! And... what's a horologist?!?
- 2022-05-10: StateFlow vs. State! Design systems! MotionLayout! Text editing problems and solutions! And... modal sheets that are actually modal?!?
- 2022-05-03: @aditlal and @JorgeCastilloPr on design systems! KMP + Compose + SwiftUI! Dropdowns! FABs! And, what does Google I|O 2022 have in store for Compose UI developers?