jetc.dev Newsletter Issue #137
This week, we learn about swipe-to-refresh and pagination, as well as testing and IME action buttons. Plus, we see an iOS-style search-button-field combo widget, as well as an interesting riff on a horizontal pager.
And, we watch a video about text, not to be confused with reading some text about video.
One Off the Stack, One Off the Slack
You’ve got questions. That’s understandable!
We can use
keyboardActions on a
TextField() to configure
the look and behavior of the IME action button. See how we can combine that with
MutableState to allow the action button to dismiss a
Dialog() in this week’s
highlighted Stack Overflow question.
It is easy with Compose UI to get into an “XY problem”.
A question about making a
TextField() that cannot accept the focus might
not represent the problem, which is trying to have a button-like UI that visually resembles a
text field. Learn why focus is important (especially in Compose UI!) and how to try
to solve this problem in this week’s highlighted Kotlinlang
Posts, videos, and other new information related to Jetpack Compose!
Google’s Chris Arriola, TJ Dahunsi, Alejandra Stamato, and Jolanda Verhoef all joined a live chat with developer-submitted questions on all sorts of Compose topics, such as immutability, performance, migrating to Compose, and more!
The Code with the Italians team had Google’s Halil Ozercan and Zach Klippenstein in for their most recent livestream, focusing on text rendering in Compose UI. They cover the general rendering process, how to support multiple fonts, auto-sizing your text, and more!
Igor Stevanovic examines Accompanist’s support for
SwipeRefresh(), for implementing
the popular swipe-to-refresh UI pattern. Igor also discusses using Accompanist’s
placeholder libraries for showing placeholders while data is being loaded (e.g., from
a Web service call).
Other Interesting Links
- Video: Compose Basics Community Tip
- Medium: State hoisting vs Defer reads
- Medium: Advanced work with the Snackbar in the Jetpack Compose
- Medium: Unit Testing Compose State Change
- Medium: Creating Reusable TopBar in Jetpack Compose and Slot Pattern
- Medium: Creating Fullscreen Loading dialog using Jetpack Compose
- Android Jetpack Compose API Tutorial
- Medium: Android Jetpack Compose: Modern UI toolkit with Kotlin (Basic)
- Medium: Navigating Android’s UI Landscape
100% pure code!
Emir Demirli created an
ExpandableHorizontalPager() composable. It is basd on
a standard Accompanist pager, but with different composables for the centered
and other pages. Plus, when you tap the centered item, it expands to fill the available
space, such as zooming to fill the entire screen.
- 2022-11-15: Compose 1.3.1 and 1.4.0-alpha02! Android Developer Summit! Android Worldwide! Relay! Permissions! Showcase views! And... a not-quite-complete autocomplete?!?
- 2022-11-08: Tables! Relay! Shaders! Intrinsics! Integration tests! Mocking composables! And... this newsletter is becoming buttoned down?!?
- 2022-11-01: Compose 1.3.0 stable! Android Dev Summit videos! State machines! Relay! And... someone set us up the BOM?!?