jetc.dev Newsletter Issue #129
This week, we look at click durations and screen starts. We see why Accompanist exists, how Tinder “swiped right” on Compose UI, and multiple ways of creating custom containers. Plus we explore page curls, discrete sliders, and (in one of life’s little coincidences) Tinder-style swipeable composables.
One Off the Stack, One Off the Slack
You’ve got questions. That’s understandable!
Clicks and long clicks have framework-defined durations. Sometimes, though,
you want to control the duration, only registering an event after the widget
has been pressed for a certain duration.
InteractionSource is the key to solving
this, as we see in this week’s highlighted Stack Overflow question.
The question seems simple: how do we do something once we enter a composition
representing a screen? However, sometimes what you want is not
really what you need. And, in this case, the underlying issue suggests that
architecture is the real concern, as we see in this week’s highlighted
#compose Slack thread!
Posts, videos, and other new information related to Jetpack Compose!
Google’s Ben Trengrove provides some background on the Accompanist family of libraries: where it came from, why it exists, and where it’s going.
Tasha Ramesh describes how Tinder adopted Compose UI, from initial samples and demos using pre-release versions up to adding the stable version to Tinder’s published app and defining their project’s design system.
Jorge Castillo also published a lengthy Twitter thread about multi-version concurrency control (MVCC), a core construct behind Compose’s snapshot system. This allows multiple threads to have isolated data without the performance impacts of common multi-threading patterns (e.g., block readers while there are active writers).
Other Interesting Links
- Droidcon NYC iOS app with Compose
- Medium: ViewModel To View in Jetpack Compose
- Parallax Scrolling using LazyColumn
- Medium: Building DualProgressBar in Compose
- Medium: Jetpack Compose: No More XML Selector
- Medium: Jetpack Compose — Animation Notes: 2
- Medium: Implementing Video Playback on Android Jetpack Compose
- Medium: Custom UI Components using Jetpac Compose Canvas based on NeoPoP Design — Part 1 (Radio Button)
- Medium: Typewriter animation in Jetpack Compose
- Medium: Swipe Button using Jetpack Compose
- Medium: Page Indicator with Jetpack Compose using Canvas and animations
100% pure code!
Oleksandr Balan brings us a
PageCurl() composable. This serves a bit like a pager,
wrapping arbitrary composables and allowing you to swipe between them. However, this
one applies a page curling animated effect.
David Zhubrev offers us a
CollectionSlider() composable that implements a
horizontal slider. This one is designed for selecting specific values in a range or
collection, with tick marks denoting the various possible choices.
Other Interesting Links
- 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?!?