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
- 2022-05-17: Google I|O 2022 videos! Compose beta01! Layout()! State! drawBehind()! Credit cards! App intros! And... what's a horologist?!?
- 2022-05-10: StateFlow vs. State! Design systems! MotionLayout! Text editing problems and solutions! And... modal sheets that are actually modal?!?
- 2022-05-03: @aditlal and @JorgeCastilloPr on design systems! KMP + Compose + SwiftUI! Dropdowns! FABs! And, what does Google I|O 2022 have in store for Compose UI developers?