jetc.dev Newsletter Issue #191
Compose, Compose Material3, and Wear Compose all received updates, so we see what’s in store!
In addition, we learn what “Material3 Adaptive” is, where Compose Multiplatform will go in
2024, and more on why
BasicTextField2() is awesome. Plus, we explore some new non-Android
Compose options, such as improved previews for Compose for Desktop and a new charting library.
Ooooo… What Did We Get?
Reviewing the release notes for the latest Jetpack Compose update!
Compose got a bump to
1.6.0-beta01, suggesting that
1.6.0 will become stable
by late this year or early next. If you are implementing drag-and-drop, there were
a bunch of API changes
to be aware of. There were also changes to text input APIs, the
assertIsDeactivated() now lets you test
for nodes that are cached for later reuse but are not actively in the composition.
Compose Material3 is up to
1.2.0-alpha11. This adds
ScrollableTabRow(), and renamed a bunch of other APIs.
There are also new
androidx.compose.material3:material3-adaptive-navigation-suite artifacts for implementing
common UI patterns across a variety of screen sizes. Below, we have a Googly Medium
post explaining what this is about!
Wear Compose is up to
1.3.0-beta01 with a bunch of changes to
SwipeToReveal(), among other changes.
In Compose-adjacent libraries, we also got:
One Off the Stack, One Off the Slack
You’ve got questions. That’s understandable!
It is all too easy to forget to
remember(). But, that can lead to overuse of
for cases where it is not needed, such as constants. Learn more in this week’s
highlighted Stack Overflow question.
Sometimes, we need to know a composable’s position on the screen.
seems like the right modifier to use for this, given its name. However, if the composable
does not change position relative to its parent,
onPlaced() is more efficient, as we
see in this week’s highlighted Kotlinlang
#compose Slack thread.
Posts, videos, and other new information related to Jetpack Compose!
Google’s Ian Clifton discusses the new
androidx.compose.material3:material3-adaptive-navigation-suite libraries, which offer
out-of-the-box layouts that handle varying screen sizes. In particular, Ian covers
ListDetailPaneScaffold() for the list/detail UI pattern and
for switching between a bottom navigation bar and a side navigation rail.
JetBrains’ Egor Tolstoy outlines the plans for Kotlin Multiplatform and Compose Multiplatform for 2024. Of note, they aim to get Compose for iOS to a beta state and getting the core Compose APIs and components available to multiplatform projects. They also plan to have Fleet support live preview for common code in Compose Multiplatform projects.
Eeva-Jonna Panula is back with more material on accessibility, this time focusing
on content descriptions (
Icon(), or via modifiers like
semantics()). Eeva-Jonna explores who experiences those descriptions and how to write
Joe Birch continues his tour of TV Compose with a look at cards, such as
for an image-and-caption card,
WideCardLayout() for a more immersive card UI,
for image/title/subtitle/description structures, and more.
Other Interesting Links
- Bottom Navigation Bar in jetpack Compose using Material3 (UI/UX)
- How to Add Border to Row in Android Jetpack Compose
- How to Disable Jetpack Compose Switch
- Medium: Adapt with Ease: Mastering Orientation Changes in Jetpack Compose
- Medium: Disabling the focus indicator on IconButtons (or any other composable that uses a ripple indicator)
- Medium: Draw Line With Canvas In Jetpack Compose
- Medium: Jetpack Compose Meets Google Maps Magic
- Medium: Jetpack Compose Navigation for Beginners
- Medium: Living Composition: Recreating ‘The Game of Life’ with Jetpack Compose
- Medium: Snackbar without scaffold in jetpack compose
- Medium: The best way to manage the Runtime permissions using PermissionHandler in Jetpack Compose
- Ultimate Guide to Jetpack Compose Navigation
- Understanding @Immutable in Jetpack Compose
100% pure code!
Yuri Schimke demonstrates how to have a dialog composable in Wear OS handle
rotary events correctly using
this Kotlinlang thread
for more context.
Other Interesting Links
- Gist: Custom Date Picker using Jetpack Compose in Android
- Gist: Jetpack Compose LazyColumn with animated header (see this demo)
- GitHub: taewooyo / shaker (simple shake, rotate, etc. animations)
…And One More Thing
Over in the CommonsBlog, I wonder how we might move forward, now that the primary Android-based TV platform may be moving on to something else. Is TV Compose too late?
- 2023-11-21: Compose/Material3/Wear Compose updates! remember()! Adaptive layouts! Compose Multiplatform in 2024! @email@example.com on BasicTextField2()! Compose Multiplatform charts! And... is TV Compose in trouble?!?
- 2023-11-14: Compose Compiler! BasicTextField2()! @firstname.lastname@example.org and animations! Optimization! @email@example.com, 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 @firstname.lastname@example.org is in a bit of a haze?!?