jetc.dev Newsletter Issue #97
It’s the holiday season (in some parts of the world), so this newsletter is a bit
short. But, we glance at a problem with Glance, learn how JetBrains applied Compose
Multiplatform to their own Toolbox, and take a pair of deep dives into formatting
the content of a
TextField(). We also look at libraries for date selection and
rendering chat/messaging UIs. And, I offer the obligatory end-of-year “review and
preview” for 2021 and 2022.
One Off the Stack, One Off the Slack
You’ve got questions. That’s understandable!
Repeat after me: Glance is not Compose UI. Glance offers an API that resembles a
tiny subset of Compose UI’s composables. And, if you mix Glance with Compose UI
in a module, you may get very confused with your results. See how
plays into this in this week’s highlighted Stack Overflow question!
Posts, videos, and other new information related to Jetpack Compose!
Sebastian Aigner interviewed Victor Kropp for the Kotlin Blog, reviewing the use of Compose Multiplatform by JetBrains Toolbox. If you have not used Toolbox, it is a central control point for all of the JetBrains family of IDEs, including Android Studio. This involved a rewrite from an Electron-ish implementation (mixing HTML/CSS/JS with C++) to Compose for Desktop.
Julien Salvi continues the theme, showing the use of
in this case for formatting phone numbers in a
TextField(), wrapping them (and Google’s
phone number formatting library) up in a
Elye returns, this time reviewing various options for where to place your
MutableState values, covering the pros and cons of each. In particular,
Elye focuses on which solutions support configuration changes and which solutions
support state restoration (for short-term process termination).
Other Interesting Links
- Canvas API in Android Jetpack Compose
- Use of ViewModel, Flow, Hilt and Coil in Jetpack Compose
- Medium: Android Compose: Add top bar title to activity screen
100% pure code!
Other Interesting Links
…And One More Thing
2021 is nearly over — at the very least, this is the last newsletter issue of the year.
2021 was pretty huge for Compose, in that we got the first stable release. That
is a bit of a double-edged sword: we will get many more developers using Compose,
but Compose UI itself is not a complete
View system replacement. It may be close
enough that some teams can implement their desired UI using Compose UI, but there
will be teams that walk away disappointed.
2021 also helped to cement Compose as a useful framework beyond Android UIs. JetBrains plowed a lot of resources into Compose Multiplatform and how has stable versions of Compose for Desktop and Compose for Web. That, coupled with projects like Jake Wharton’s mosaic, CashApp’s molecule, and Google’s own Glance, illustrate the power of tree construction using composables.
What will 2022 bring? Some things seem fairly likely:
We should get one or two stable minor releases of Compose, starting with 1.1.0 early in the year
We should see a continued uptick in adoption, with follow-on effects like a significant rise in third-party libraries targeting Compose
Somebody will do something with Compose that we never expected
Compose complaints will continue, and many of the problems underlying those complaints will not get addressed in 2022
This newsletter will have 1+ issues 😁
2021 was a hard year for many. All I can hope is that your 2022 brings you
good fortune, along with a fair number of functions annotated with
- 2023-01-24: Locales! Relay! Effects! Paging! Foldables! Permissions! Date pickers! Bi-directional scrolling! And what your MaterialTheme means... for your SwiftUI code?!?
- 2023-01-17: New Compose patches and alphas! Dealing with Navigation for Compose! Scaffolds! QR codes! Server-defined UI! And @firstname.lastname@example.org has joined the BOM squad! 😁 💥
- 2023-01-10: onNewIntent() and composables! ContactsContract and composables! Balloons! QR codes! Pencils! And a focus on focus!