jetc.dev Newsletter Issue #27
This week, we have a fairly light issue. I am guessing that too many developers
spent too much time replacing all their Compose
import statements after switching
dev16 to write. 😁
But, we still take a look at text size animations, the state of the Material Design spec with respect to composables, and a new home for a style adapter. Plus, we add to the speculation about the timing of the first alpha release.
One Off the Stack, One Off the Slack
You’ve got questions. That’s understandable!
In the classic
View system, if you set the text of a
TextView, the text
changes instantly. You get the same effect if you recompose a
and supply different text than before. However, through the
modifier, you can have the transition animate the size change.
The Material Design site has lots of components that are not yet embodied in the form of composables. In this week’s highlighted Slack thread, we look at why that is the case and how those needs might be met.
100% pure code!
Google’s official Material Components set of repositories now has an adapter to convert a Material Components for Android-based theme into a Compose theme. If this sounds familiar, is it because Chris Banes initially developed it as part of his Accompanist library. Since Chris is the contributor to this new repo, this suggests that his adapter is being upgraded from “something cool written by a Googler” to “something cool that now is semi-official”.
This repo eventually may contain a collection of Lint rules related to Compose.
Right now, it has just one: enforcing an initial capital letter in the function
names of functions annotated with
…And One More Thing
Twitter and Reddit were abuzz about a Gerrit entry
showing a jump in the Compose version from
1.0.0-alpha02. This is from a file used in Gradle builds that appears to denote
the current version of many of the Jetpack artifacts.
Right now, Compose is at
dev17. Assuming that the normal every-two-week cycle
dev17 should be released tomorrow (August 19), and perhaps
the first alpha would be two weeks after that (September 2). This is in line with
the “summer 2020” timeframe for the first alpha. In fact, they do not have much
room for slippage, as there would only be one more two-week update cycle before
Google officially runs out of summer.
The fact that the file jumps from
alpha02 is a bit unusual. If that
is the first alpha version that we see, I imagine that we will get some explanation.
And, based on Kotlinlang #compose discussion, it does not feel like the tenor of Compose development will change very much. Perhaps they will make fewer major changes, but I still expect the Compose API to be fairly fluid. With luck, the pace of changes will slow somewhat as the alpha versions pile up, so that by the time they switch to beta versions, the API surface will be more solid.
After all, right now, only the most enthusiastic developers are playing with Compose, in part because of the constant rewrites to adapt to developer preview changes. I hope that community involvement will ramp up as we get APIs that are increasingly stable.
Still… be prepared to “pour one out” for the developer previews after
dev17, as it appears that the alpha train is about to leave
- 2022-09-13: Compose updates! Tracking down and fixing recompositions! Maestro! Redwood! Molecule! And Twitter's rules for composables!
- 2022-09-06: Snapshots! A Glance support library! Measuring and drawing! Swipe-to-dismiss! Speed dials! And... a redwood sighting?!?
- 2022-08-30: Android 13 per-app language support! Performance optimizations! Expandable lists! MVI! Zooming! Steppers! And... another Compose beta? Already?!?