jetc.dev Newsletter Issue #150
This week, we look at borders and locales. We examine previews and paging, and we play with foldables and Relay. And we see some libraries for horizontal date pickers and bi-directional scrollable composables.
Note that the newsletter emails are switching the styling of
Buttondown’s default to simple monospace. Some subscribers were running into
problems with dark theme compatibility with the original approach that used
a background and border.
Also, the newsletter site also has some long-awaited improvements:
A customized search tool, searching by individual entry rather than by entire issues
Rendering improvements on mobile browsers
A per-issue badge, for those of you who get featured here and want to add some newsletter bling to your article or repo! (many thanks to Alex Styl for the suggestion!)
Ooooo… What Did We Get?
Reviewing the release notes for the latest Jetpack Compose update!
androidx.compose.compiler:compiler:1.4.0 was released, mostly bringing
us Kotlin 1.8.0 support.
One Off the Stack, One Off the Slack
You’ve got questions. That’s understandable!
border() modifier support changing the width of a border, but only on all sides.
What happens if you need borders with varying widths? See a couple of solutions,
including the use of
drawBehind(), in this week’s highlighted Stack Overflow
Sometimes, we will need to have our composables react to the current locale (or locales)
selected by the user. What’s the best way to do that, given Android 13’s per-app
locale support, as well as the changes to support multiple locales in API Level 24?
See some suggestions in this week’s highlighted Kotlinlang
#compose Slack thread.
Posts, videos, and other new information related to Jetpack Compose!
Kristen Halper returns, continuing an exploration of Relay for converting Figma designs to composables. Here, Kristen explores the scope of what Relay can convert (smaller = better), how it does the conversion (technically correct but sometimes not what you want), and more!
Vincent Tsen is back to talk about effects, an ever-popular and ever-confusing
topic in Compose development. Vincent looks at a few types of effects, along
with related functions like
produceState(), and helps explain when you use
them and why.
Tomáš Repčík takes a look at the ever-popular
@Preview animation and points
out some lesser-known capabilities, such as creating custom annotations to
apply the same previews across multiple composables without redundancy.
Teja Narayan Chirala explores how we can use Compose’s support for Paging 3 in different ways, including using it in grids, how to leverage Paging 3’s placeholder support with composables, implementing refresh and retry logic, and more!
Thomas Künneth is back, once again to talk about his (seemingly) favorite
topic: foldables. Thomas demonstrates how to use
from the Jetpack Window library to help us deal with folding displays (both
ones with continuous folding screens and ones divided by hinges), as well
as tablets and landscape mode.
Sometimes, you just have to do some work for iOS. It happens. In this post, Kashif Mehmood looks at Compose Material themes, what they are made of (colors, typography, etc.), and how those can map to equivalent concepts in SwiftUI.
Nikhil Mandlik continues looking at animations, specifically how to animate
composables along a path. Nikhil’s approach uses
PathMeasure to apply a cubic bezier curve to move one (or more!)
composables from a start to an end position.
Alex Styl returns, to help us deal with runtime permissions. Alex covers some basics of runtime permissions in general before diving into Accompanist’s runtime permissions library and showing us how to use it for both required and optional permissions.
Other Interesting Links
- Medium: Jetpack Compose Create My Own TextField
- Medium: Bouncing and Pulsating Icon Animation In Jetpack compose
- Jetpack Compose Slider (with Examples)
- Medium: Navigation in Jetpack Compose
- Medium: Jetpack Compose — Heterogenous list
- Medium: Reusability of Jetpack Compose Components
- Medium: Create Custom Pie Chart with Animations in Jetpack Compose
- Medium: How to force an image to draw outside of its boundaries in Jetpack Compose
- How to Display Base64 Data as Image in Android Jetpack Compose
- Medium: How to implement the shimmer effect using jetpack compose?
100% pure code!
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!