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.
- 2023-09-12: Compose 1.5.1! Glance 1.0.0! Compose Multiplatform! Themes! Photos! Coachmarks! A bit of CommonsWare history! And @firstname.lastname@example.org tells us what not to do!
- 2023-09-05: Compose Compiler 1.5.3! Compose Multiplatform 1.5.0! @email@example.com on greyscaling composables! @firstname.lastname@example.org on Espresso testing with Compose interop! Scrollbars! AnnotatedString!
- 2023-08-29: Compose Compiler 1.5.2! Compose and Wear Compose alphas! Capture composables to bitmaps! Testing! Recomposition! Compose Multiplatform! And... Accompanist is downsizing?!?