jetc.dev Newsletter Issue #248
Published: 2025-01-07
It is a short newsletter this week, owing to the holidays in a lot of the world. But, we look at responsive grids, display styled strings, pick at a couple of pickers, and render composables to PDFs. Plus, I grumble (again) about the state of custom design systems.
One Off the Stack, One Off the Slack
You’ve got questions. That’s understandable!
How Can I Have Navigation Within a Sheet?
If you are using Navigation for Compose, and you want to have navigation (e.g., multiple
“screens”) within a bottom sheet, the right answer is to have a separate NavHost
for
that from your main screen NavHost
. See (a little) more in this week’s highlighted
Stack Overflow question.
If Not this then
, Then What?
Many custom Modifier
examples show this then
as part of adding the new modifier to the
chain. Depending on how you are creating that custom Modifier
, though, the then
is
either essential or superfluous, as we see in this week’s highlighted Kotlinlang #compose
Slack thread.
Composable Commentary
Posts, videos, and other new information related to Jetpack Compose!
Medium: Responsive Grid Layout in Jetpack Compose: Adapting to Screen Sizes and Orientations
Farman Ullah Marwat walks us through how to modify our use of LazyVerticalGrid()
based on the form factor of the device it is displayed upon, in particular using
BoxWithConstraints()
.
Medium: How to Display Styled Strings in Jetpack Compose
Joseph James shows how to convert a Spanned
into an AnnotatedString
. Given that, Android
string resources with markup can be used in Compose apps.
Compose Design Systems: Have a Plan
Over in my CommonsWare blog, I wrote about a certain class of Compose support question that we get a lot, and what that says about design systems and choices surrounding them.
Other Interesting Links
- Build Android App Widgets With Jetpack Glance
- Medium: Android Devs: We Might Be Writing Compose Code Wrong
- Medium: Bottom Navigation bar in the jetpack compose using material3
- Medium: How To Use Animations In Android Compose
- Medium: Implementing Koin Dependency Injection in Jetpack Compose
- Medium: Jetpack Compose Essentials: Lazy Loading, Navigation, MVVM, Coil and Profile Screens
- Medium: Jetpack Compose: Snake Game Coding Tutorial
- Medium: Mastering Navigation Launch Modes in Jetpack Compose: Real-World Use Cases and Examples
- Medium: Mastering the Box Layout in Jetpack Compose: Aligning and Overlaying Composables
- Medium: Migrate your Android Project to Compose Multiplatform Project
- Medium: Navigation Drawer in Compose Multiplatform
- Medium: Pull to Refresh using Material 3
- Medium: Step-by-Step Guide to Creating a Searchable Modal Bottom Sheet in Jetpack Compose
- Medium: Writing Stable Classes in Jetpack Compose for Optimal Performance
- Side Effects in Jetpack Compose
Resource Roundup
100% pure code!
GitHub: Kudl1k / datetimepicker-kmp
Stepan Kudlacek created a DatePicker()
composable for Compose Multiplatform,
supporting date and date range selection with a month-based picker.
GitHub: Seo-4d696b75 / compose-m3-picker
GitHub use Seo-4d696b75 contributed Picker()
and NumberPicker()
composables,
for Compose for Android using the vertical-scrolling pattern seen on iOS.
Gist: logickoder / ComposePdfExporter.kt
Jeffery Orazulike demonstrates how to export a composable first to a bitmap, then to a PDF, by means of Android’s PDF support.
Notable Releases
Maps for Compose released 6.4.1
,
fixing a Polygon
bug.
Or, you can subscribe to the Atom feed or follow Mark Murphy in the Fediverse.
Recent Issues:
- 2024-12-31: Scaffold panes! Weights and FlowRow()! TV Compose! PDF rendering! Drop shadows! And... is it time to take action?!?
- 2024-12-24: Compose Multiplatform update! Type-safe navigation! Camera! Hot reload! @Preview generator! And... a library of libraries?!?
- 2024-12-17: Compose and Wear Compose alphas! Tom Colvin on camera apps! Kevin Schildhorn on multiplatform adaptive layouts! And... do we really want to know what the "X" is in "Android XR"?!?