jetc.dev Newsletter Issue #156
This week — after a one-week hiatus for this newsletter — we look briefly at the latest Compose and Wear Compose releases. We examine updating our Compose dependencies, MVVM, and bottom sheets. And we look at a competitor to Google’s Relay plugin for Figma.
Ooooo… What Did We Get?
Reviewing the release notes for the latest Jetpack Compose update!
Compose is up to a
1.4.0-rc01, suggesting that 1.4.0 might come out with
Google I|O in May, or perhaps a bit before. Of note:
There were several changes to
BottomSheetScaffold(), from parameter name changes to outright removals of some parameters
AndroidView()has a variant with an
onResetparameter, which allows the underlying
Viewinstances to be reused
LazyStaggeredGrid()now supports reverse layout
Wear Compose got bumped up to
1.2.0-alpha06, adding a new
expandable items for a
ScalingLazyColumn(), and custom preview annotations
for different sizes and shapes of Wear OS screens.
One Off the Stack, One Off the Slack
You’ve got questions. That’s understandable!
A common approach for disabled states is to have everything grayed out.
See how you can use a
onDrawWithContent() on a
to accomplish this in this week’s highlighted Stack Overflow question.
Locale.getDefault() is not your friend — use
for one that reacts to configuration changes. As a side benefit, it also works
better in previews. Learn more in this week’s highlighted Kotlinlang
Posts, videos, and other new information related to Jetpack Compose!
Google’s Murat Yener announced the availability of the Android Basics with Compose course. This appears to be aimed at newcomers to Android app development who are looking to “get in on the ground floor” with Compose UI.
Jorge Castillo explores the MVVM architecture pattern and how it blends with Compose UI.
Jorge specifically examines
WhileSubscribed(5_000) hack, and how this ties into unidirectional data flow
The Android Developer looks at why your
derivedStateOf() variables might not
get updated when you expect. You need to reference the
State inside the
derivedStateOf() lambda expression; if you do not, your derived value might
not update when that
Kurt Lemond Capatan wants a lazy grid where all of the items in the grid are
the same size, despite them having varying contents. Kurt wound up using
SubcomposeLayout() to be able to get the sizes of the contents of each grid
item, then use those results to set the size of the grid items themselves to
Other Interesting Links
- Medium: Android Jetpack Compose ConstraintLayout Grid Helper
- Medium: Streamlining User Actions with the Command Pattern: A Practical Guide
- Medium: Collapsing Toolbar in Jetpack Compose LazyColumn — Three Approaches
- Custom Theming in Jetpack Compose
- Ticker Board in Jetpack Compose
- Adding animations to Google Maps in Jetpack Compose
- Cooking Window Inset with Jetpack Compose sauce and a pinch of View — part 2
- Medium: React to Lifecycle state changes in Compose
- Medium: Making grid items’ size identical using SubcomposeLayout in Jetpack Compose
- Medium: TabRow in Jetpack Compose: Implementation & Customization
- Medium: Coroutine in Compose
- Medium: Building a GPT Client for Android with Jetpack Compose in Kotlin
- Medium: Style certain parts of Compose Text
- Modify items in paginated list in Jetpack Compose
- Jetpack Compose Tutorial: Replicating Dribbble Audio App - Screen Transitions
- Building a Language Learning App with Compose – Part 3
- Medium: A Guide to State Management Functions in Jetpack Compose
- Medium: Understanding and Implementing Navigation Components Jetpack Compose in Application | Part 1
- How to create Shimmer Effect in Jetpack Compose
- How to Implement IconButton in Jetpack Compose?
- Medium: An introduction about Preview in Jetpack Compose
- Medium: Jetpack Compose: Using Preview
- Ultimate Guide to Jetpack Compose List
- Lists and grids in JetPack Compose
100% pure code!
Upspeed.io published their analogue to Relay: a Figma plugin that generates composables from designs. In their case, it seems as though they accomplish this with just a plugin, making it possible to use this with IDEs other than Android Studio.
- 2023-11-21: Compose/Material3/Wear Compose updates! remember()! Adaptive layouts! Compose Multiplatform in 2024! @firstname.lastname@example.org on BasicTextField2()! Compose Multiplatform charts! And... is TV Compose in trouble?!?
- 2023-11-14: Compose Compiler! BasicTextField2()! @email@example.com and animations! Optimization! @firstname.lastname@example.org, JetBrains, and Fleet! JetBrains and plotting! And... we collapse?!?
- 2023-11-07: Compose Multiplatform! Chips in fields! Diffing! Custom fonts in Glance app widgets! Heatmaps! PIN input! And @email@example.com is in a bit of a haze?!?