jetc.dev Newsletter Issue #149
This week, we look at the latest Compose release to see what is in store for us. We spend a lot of time on Navigation for Compose, plus look at scaffolds and QR codes. And we explore server-defined UI and an alpha-grade BOM.
Ooooo… What Did We Get?
Reviewing the release notes for the latest Jetpack Compose update!
While we did not get an update to the Compose Compiler, some Compose artifacts got a
new stable patch release with minor bug fixes and a new alpha (
PinnableContainerto “pin” lazy list items, so they are not disposed when they scroll out of bounds (e.g., for use by the
Long-term, focus will get other improvements, via
Better accessibility support for
A lot of stable APIs (i.e., experimental annotations dropped), for fonts, rotary scroll input,
pluralStringResource(), and more
basicMarquee()modifier for a scrolling marquee effect
For the stable updates, use
androidx.compose:compose-bom:2023.01.00 as the BOM.
Wear Compose also got a patch release (
1.1.1) as well as a
release, both mostly for bug fixes.
One Off the Stack, One Off the Slack
You’ve got questions. That’s understandable!
Sometimes, we have a UI element where we want its size to vary by its content…
but only when its content meaningfully changes. Toggling between states —
in this case, between text and a loading indicator — should keep the same
size. There are several possible solutions, depending on your requirements, as we
see in this week’s highlighted Kotlinlang
#compose Slack thread.
Posts, videos, and other new information related to Jetpack Compose!
The Coding with the Italians team had Google’s Jose Alcérreca and Alex Vanyo
on the show to talk about Compose UI testing, to explore the new
for testing composables under different conditions (font scale, screen density, etc.)
Instagram has a 3D-spinning sort of carousel to page through images.
Tornike kachkachishvili decided to reimplement that in Compose UI, using
Accompanist Pager, the
graphicsLayer() modifier, and some math.
Alex Styl returns, exploring the omnipresent
Scaffold() composable. Many Compose UI
Scaffold(). Here, Alex explores why that is, what we get from
Scaffold(), and how to bypass it for cases where you feel that it is not needed.
Francesc Vilarino Guell is back, continuing this week’s exploration of navigation within Compose UI. In this case, Francesc looks at the limitations of Navigation for Compose and discusses ways to put more of the navigation logic in viewmodels rather than in your composables.
Tomáš Repčík continues the tour of Navigation for Compose, this time with a deeper
dive into nested navigation graphs. Having one massive navigation graph can
be unwieldy, even impractical in multi-module apps. Tomáš discusses one approach
for nested navigation: creating extension functions for
NavGraphBuilder to define
Kristen Halper is back, this time looking at Relay, Google’s toolset for exporting Figma designs and importing them as composable functions.
Last week, I pointed out
a gist by Addy Godwin Nii for rendering QR codes in Compose, using a combination
of the legendary zxing library with a
BitmapPainter. Addy wrote a post explaining
more about how that code works.
Other Interesting Links
- Use SavedStateHandle with ViewModel Compose Android
- Add blur effect to Image in Jetpack Compose
- Medium: Update Variable State from Another Variable
- Medium: Migrating to Android Jetpack Compose
- Medium: Gestures in Jetpack Compose: The Basics
- Medium: Jetpack Compose Swipe To Dismiss Made Easy
- Medium: Made in Compose — Dynamic Island
- Medium: Data flow in Composable through CompositionLocal
- Jetpack Compose Basics - How to use Exoplayer library to play videos
- Medium: Recomposition problem with mutations
- Medium: Displaying HTML text in Jetpack Compose
- Jetpack Compose Tutorial: Replicating Dribbble Audio App Part 1
- Medium: Building a Language Learning App with Compose — Part 1
- Jetpack Compose Grid without Lazy
- Medium: Custom View using Jetpack Compose
- A Basic Guide : What is Flow Layout in Jetpack Compose?
- Jetpack Compose Switch Button (with Examples)
- Jetpack Compose for days
- Slides: Introduction to Jetpack Compose
- Medium: Lessons learnt from implementing Jetpack Compose
100% pure code!
Other Interesting Links
- GitHub: GetStream / webrtc-in-jetpack-compose (WebRTC in Compose demo)
- GitHub: mobanisto / pinpit-gradle-plugin (installer toolkit for Compose for Desktop)
- GitHub: Wavesonics / compose-multiplatform-file-picker (Compose for Android/Desktop file picker bridge)
- 2023-11-21: Compose/Material3/Wear Compose updates! remember()! Adaptive layouts! Compose Multiplatform in 2024! @firstname.lastname@example.org on BasicTextField2()! Compose Multiplatform charts! And... is TV Compose in trouble?!?
- 2023-11-14: Compose Compiler! BasicTextField2()! @email@example.com and animations! Optimization! @firstname.lastname@example.org, JetBrains, and Fleet! JetBrains and plotting! And... we collapse?!?
- 2023-11-07: Compose Multiplatform! Chips in fields! Diffing! Custom fonts in Glance app widgets! Heatmaps! PIN input! And @email@example.com is in a bit of a haze?!?