jetc.dev Newsletter Issue #247

Published: 2024-12-31

As 2024 wraps up, we look at scaffold pane sizes and weighty FlowRow() uses. We see how Meta is composing, how Compose can be decomposed, but not whether Meta is decomposing. And we examine implementations of lighter-weight PDF rendering, customizable drop shadows, and more.

One Off the Stack, One Off the Slack

You’ve got questions. That’s understandable!

Is Making Equal-Sized Panes a Pain?

ListDetailPaneScaffold() offers a dual-pane experience on larger screens, but it defaults to an 80/20 ratio between the panes. See how to have them be equally-sized, on current and future versions of the adaptive library, in this week’s highlighted Stack Overflow question.

Can I Use Weight in a FlowRow()?

The answer is “yes, but it does not necessarily mean what you think it does”. Learn more in this week’s highlighted Kotlinlang #compose Slack thread.

Composable Commentary

Posts, videos, and other new information related to Jetpack Compose!

Compose Tips for Delightful UI — ’24 wrap up

Google’s Simona Milanović (Mastodon, Bluesky) and Rebecca Franks (Mastodon, Bluesky) published a summary of all the tips and tricks they discussed in their YouTube video series.

Podcast: Jetpack Compose at Meta

Meta built up quite the system of UI frameworks over the years… only to have Compose come along. In this podcast, the Instagram team responsible for large-scale migrations discuss the impact Compose had and how they coped.

Medium: Decomposing Jetpack Compose

Baiqin Wang wanted to understand more of what was going on inside of Compose when debugging composables. The result was Decomposer, a desktop tool to view the slot tables of your composables, among other things to see more “under the hood”.

Support Time to Take Action with Compose

Eevis Panula (Mastodon, Bluesky) is back, this time discussing the “time to take action” system setting. This indicates how long temporary input affordances should appear, such as the system volume slider. Eevis explains how we can use LocalAccessibilityManager and its calculateRecommendedTimeoutMillis() function to find out this duration, as well as how to apply it.

Medium: Designing Android TV UIs with Jetpack Compose: Content Cards, Hero Elements, and Carousels

Sahar Asadian walks us through various TV Compose UI patterns and corresponding composables.

Capture composables in Jetpack Compose

Manpreet Kunnath looks at the graphicsLayer.record() technique for capturing a composable to a bitmap, in particular seeing how well it works in Compose Multiplatform.

Resource Roundup

100% pure code!

GitHub: Bhuvaneshw / PdfViewer

GitHub user Bhuvaneshw has created a PdfViewer() composable based on WebView and Mozilla’s PDF.js. This should be less heavyweight than native code renderers yet handle many more PDFs than the platform PdfRenderer does.

GitHub: LennartEgb / compose-shadow

Lennart Egbers brings us a boxShadow() modifier for fully-configurable drop shadows and inner shadows, aiming for Figma compatibility.

GitHub: kavi707 / kv-android-color-pallet

Kavimal Wijewardana offers another implementation of theme generation based on a supplied input color.

GitHub: AdamDawi / ScratchCardCompose

GitHub user AdamDawi released a ScratchCard() composable that uses masking to simulate a scratch-off card, backed by an image that you supply.

GitHub: terrakok / AdaptiveStack

GitHub user terrakok created HorizontalAdaptiveStack() and VerticalAdaptiveStack() composables that change their orientation based on available screen space.

…And One More Thing

If you follow the Gregorian calendar (or compatible ones), Happy New Year’s Eve!