jetc.dev Newsletter Issue #3
Published: 2020-03-03
This week, we look at how LiveData
and Glide might work with Jetpack Compose and
how we align our text in a row.
The biggest news is that Compose support was removed from Android Studio 4.0 Beta 1 and added to Android Studio 4.1 Canary 1. If you are relying on an Android Studio 4.0 canary release for your Compose work, be careful about what you upgrade to!
One Off the Stack, One Off the Slack
You’ve got questions. That’s understandable!
How to Align Row Elements
To baseline-align adjacent bits of text in a row, we need to use a LayoutGravity.RelativeToSiblings
modifier.
Where Does the State Go?
In this Slack thread, we explore where state should live: inside a composable or outside?
Note: to view this, you need to be a member of the Kotlin Slack workspace — sign up at https://slack.kotlinlang.org/!
Composable Commentary
Posts, videos, and other new information related to Jetpack Compose!
Android Studio 4.1 Canary 1 available
Also, Jetpack Compose leaves 4.0 and moves to 4.1, inexplicably.
droidcon Italy 2020
This conference has two sessions on Compose, “Get started with Jetpack Compose” and “How the community is shaping Jetpack Compose”.
Another way of using LiveData
with Jetpack Compose
Ian Warwick writes about one possible pattern for LiveData
usage within Compose.
Resource Roundup
100% pure code!
GitHub - Glide Adapter for Jetpack Compose
Use Glide for getting the images that go into your composable!
…And One More Thing
The Android Studio moves with respect to Jetpack Compose (added to 4.1, removed from 4.0) just add more confusion to the mix. It is understandable that the Studio team might not want to support features tied to early-stage technologies like Compose in a stable Studio release. However, it would be nice if the Compose team had their own communications on the topic, rather than us having to interpret what this means solely from what the Studio team has said (which isn’t much).
Or, you can subscribe to the Atom feed or follow Mark Murphy in the Fediverse.
Recent Issues:
- 2024-12-10: A Compose Multiplatform alpha! Hot reload! Presentation! Sprites! Calendars!
- 2024-12-03: Rebecca Franks on clipping and masking! Stefano Natali on graphicsLayer()! FunkyMuse on type-safe nav results! And... if we have enough maps, do we need to store our maps in a Map?!?
- 2024-11-26: Math! Shared element transitions! Custom modifiers! Macrobenchmark! Adapting to platform-specific design systems! And... why does wrapContentSize() not wrap my content size?!?