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 now TextAutoSize, and we can now create custom implementations

  • A bunch of focus-related bugs were fixed

  • ComposeContentTestRule now uses an activity that uses Theme.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.

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.

…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! 🎉