jetc.dev Newsletter Issue #250
Published: 2025-01-21
Wow, this newsletter is up to 250 issues already? Where has the time gone? đ âł
If you want to find material from all 250 issues, the magnifying glass icon in the top bar leads to a search page.
This week, we look at the latest Compose updates, try to share multiplatform fonts with views, and add a border when we donât know its shape. We explore performance, composition locals, and using CameraX. And we examine a composable code generator Gradle plugin and an independent Compose Multiplatform preview engine.
Ooooo⌠What Did We Get?
Reviewing the release notes for the latest Jetpack Compose update!
Our first Compose BOMs of 2025 dropped, 2025.01.00
, for the release, alpha,
and beta. AFAICT, the release BOM points to the same artifact versions as did
2024.12.01
. The BOM to library version mapping page
does not mention 2025.01.00
. đ§
1.8.0-alpha08
of the core Compose artifacts were released. Of note:
-
AutoSize
is nowTextAutoSize
, and we can now create custom implementations -
A bunch of focus-related bugs were fixed
-
ComposeContentTestRule
now uses an activity that usesTheme.Material.Light.NoActionBar
as a theme -
AnnotatedString.fromHtml()
supports HTML unordered lists (<ul>
and<li>
) -
Compose Material and Material 3 now take
displayCutout
into account
Compose Material3 has a 1.4.0-alpha06
release, adding a new floating toolbar.
We also got the following updates to Compose-adjacent libraries:
androidx.activity:activity-compose:1.10.0
androidx.camera:camera-core:1.5.0-alpha05
androidx.camera.viewfinder:viewfinder-compose:1.4.0-alpha12
One Off the Stack, One Off the Slack
Youâve got questions. Thatâs understandable!
Is There a Way to Use a Font from Compose Resources with a View?
Compose Multiplatform has its own multiplatform way of handling resources. While it
resembles Androidâs, it is not identical. I wanted to use a custom font both for
Compose work and for a legacy View
-based API â see the solution in this weekâs
highlighted Stack Overflow question.
How Can I Add a Border Around an Arbitrary Shape?
Shape
is a great way to define a border⌠but only when you know the shape to apply.
If the shape is unknowable, even at runtime, it would seem impossible to add a border.
Googleâs Romain Guy offers us an interesting option, as we see in this weekâs highlighted
Kotlinlang #compose-android
Slack thread.
Composable Commentary
Posts, videos, and other new information related to Jetpack Compose!
Compose Multiplatform and Jetpack Compose
This new documentation page from JetBrains may prove to be important over time. It outlines what portions of Jetpack Compose are supported by Compose Multiplatform, along with other Compose-adjacent libraries (e.g., Jetpack Lifecycle) have Compose Multiplatform-compatible equivalents.
Video: Compose Performance for Us Humans
Googleâs TomĂĄĹĄ MlynariÄ joined the Code with the Italians team to review the status of performance in Compose development, from Layout Inspector to Macrobenchmark and Perfetto. TomĂĄĹĄ dives into doing performance tests on individual UI automation test cases, to have focused Perfetto traces for analysis and comparison between performance tests.
Medium: Composition Locals in Jetpack Compose: A Beginner-to-Advanced Guide
Ioannis Anifantakis walks us through the role of composition locals, how to define
and publish them, how to consume them in your composables, and some of their limits
(e.g., @Preview
support).
Using SVGs on Canvas with Compose Multiplatform
Eevis Panula
(Mastodon, Bluesky)
examines how we can extract path data from SVG files, parse them
into Path
and PathNode
objects,
then render them in a Canvas()
composable.
Lens & Layouts: Camera Integration in Compose
The Wawandco team gives us an extensive explanation of integrating CameraX into Compose for Android, from showing the preview to taking photos.
Using new Camera extensions API
Victor Brandalise also is looking into camera use from Compose, in this case looking
at the CameraX extension system. Victor specifically explores ExtensionMode.NIGHT
(night mode) and ExtensionMode.BOKEH
(bokeh blur-the-background effect).
FilterChip Dropdown selector in Jetpack Compose
Manpreet Kunnath builds a series of composables that, linked together, offer a UI
for adding âtag cloudâ-style tokens, selected from a list or newly entered, into
a FlowRow()
of filter chips.
Other Interesting Links
- Embed a SearchBar into a TopAppBar in Jetpack Compose
- Hello World for Fire TV with Kotlin & Jetpack Compose
- Medium: Everything you need to know about side-effect in Jetpack compose â Part1
- Medium: Haptics in Jetpack Compose
- Medium: How to use inline content in Text in Compose
- Medium: Mastering Runtime Permissions in Jetpack Compose: A Real-World Guide
- Medium: Optimizing Performance in Jetpack Compose: Best Practices and Techniques
- Medium: Play with your topbar content jetpack compose
- Medium: The Elephant in the Room for Android Devs: Jetpack Compose and Edge-to-Edge on Android 15
- Medium: Top 3 Most Common Animations You Can Use in Your Jetpack Compose Project
- Medium: Understanding Side Effects in Jetpack Compose
- Medium: Understanding State Management in Jetpack Compose: A Deep Dive with Code Examples
Resource Roundup
100% pure code!
Lumo UI
In contrast to countless composable libraries, the Lumo UI team is taking a code-generation approach. Their Gradle plugin lets you generate implementations of various common UI patterns, where the resulting code is directly in your codebase that you are responsible for maintaining over time.
GitHub: timo-drick / Mutliplatform-Preview
Timo Drick is building an independent implementation of composable previews for Android Studio/IntelliJ IDEA, for Compose Multiplatform (desktop and common). This leverages an IDEA plugin plus a library containing marker annotations.
GitHub: meticha / Jetpack-Compose-Design-Patterns
The Meticha team has built a repository of how classic design patterns, like âfacadeâ and âvisitorâ, can be applied towards building composable UIs.
GitHub: windedge / viform-multiplatform
GitHub user windedge is working on a form validation library for Compose Multiplatform, where you define a schema for your form (including validation rules), and the library helps you apply that schema to user-entered values.
Other Interesting Links
- GitHub: easternkite / krogress (progress indicators)
- GitHub: ehsannarmani / compose-plus (utility functions, modifiers, and components)
- GitHub: Meglali20 / Content-Reveal (sliding reveal transition)
- GitHub: MohammedAlaaMorsi / Color-Picker-KMP (color picker)
- GitHub: rohanbuddy7 / statecraft (pre-built components)
âŚAnd One More Thing
Thanks to all who have contributed over the years to the worlds of Jetpack Compose and Compose Multiplatform! You are the ones who make this newsletter work! đ
Or, you can subscribe to the Atom feed or follow Mark Murphy in the Fediverse.
Recent Issues:
- 2025-01-14: CameraX in Compose! Centering! Circuit! Aspect-aware grids! Editors! And, why is my font rendering differently across platforms?!?
- 2025-01-07: Responsive grids! Styled strings! Design systems! Pickers! Render composables to PDFs! And... this then or this?!?
- 2024-12-31: Scaffold panes! Weights and FlowRow()! TV Compose! PDF rendering! Drop shadows! And... is it time to take action?!?