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-01-24: Locales! Relay! Effects! Paging! Foldables! Permissions! Date pickers! Bi-directional scrolling! And what your MaterialTheme means... for your SwiftUI code?!?
- 2023-01-17: New Compose patches and alphas! Dealing with Navigation for Compose! Scaffolds! QR codes! Server-defined UI! And @firstname.lastname@example.org has joined the BOM squad! 😁 💥
- 2023-01-10: onNewIntent() and composables! ContactsContract and composables! Balloons! QR codes! Pencils! And a focus on focus!