Newsletter Issue #30

Published: 2020-09-08

alpha02 is out! While it is small overall, we look at some breaking changes. We also look at early attempts at paginating Compose UI lists, working with multi-screen devices, and dumping your composable hierarchy to text for debugging. Plus: codelabs!

One Off the Stack, One Off the Slack

You’ve got questions. That’s understandable!

Opening and Closing a Scaffold Drawer

Part of the challenge of working with Compose UI is knowing what is possible and where to get it. All too frequently, the things that you need are in top-level functions that defeat auto-complete. In this week’s highlighted Stack Overflow question, we see that the trick to having a Scaffold drawer that you can toggle is a rememberScaffoldState() function, so you can more easily reference that state and use it to open and close the drawer.

My Kingdom For a Stable IDE!

Tired of needing to use Canary builds for Compose work? Get in line! This week’s highlighted Slack thread explores some requests for working with stable IDEs.

Composable Commentary

Posts, videos, and other new information related to Jetpack Compose!

Jetpack Compose Codelabs

In the “Alpha Announcements” section of last week’s newsletter, I failed to mention the codelabs that Google has produced, to help lead you through the creation of Compose projects for hands-on experiences with Compose. Google’s Jose Alcérreca pointed out the omission. I sincerely apologize for failing to mention the codelabs and I encourage you to visit those codelabs.

Compose Runtime alpha02 Release Notes

If you are building (or are consuming) libraries containing composable functions, those libraries need to be recompiled to work with alpha02. They changed the way that the Compose compiler plugin handles calls to composable functions, and while this does not affect your source code, it does affect your compiled code. Also, note that onPreCommit() is deprecated (use onCommit()).

Compose UI alpha02 Release Notes

If you were using vectormath, that is now mostly gone, as is Matrix4 (use Matrix).

List Pagination with Jetpack Compose

While LazyColumnFor supports long lists, that implies that you already have the data for the long list. That may or may not be the case, based both on the data source (e.g., paged Web service API) and simple memory limitations. For the former, Damian Petla demonstrates how LazyColumnForIndexed and isActive() can be used to trigger the loading of additional data into the list.

Jetpack Compose on Microsoft Surface Duo

Microsoft’s Surface Duo is an upcoming dual-screen hinged device. Apps can work with both screens at once, and this blog post from Joy Liu outlines how to do that in the context of a Compose UI project!

Learn Jetpack Compose Android

The Android Dev Notes team is starting to maintain an “awesome list”-style repository on GitHub, with links to lots of resources related to Jetpack Compose development.

Video: Get Started with Jetpack Compose

This screencast walks you through the basics of setting up a Compose UI-based screen, focusing on the Scaffold.

Exploring Jetpack Compose: The Basics

Vivek Singh brings us a Medium post outlining the steps to set up a Compose UI-based project and the fundamentals of Compose, such as composable functions.

Resource Roundup

100% pure code!

GitHub: square / radiography

Square adds to the ever-growing fleet of Android libraries! This one, Radiography, emits the structure of a View hierarchy or composable tree in text. This is designed for use in crash reports, failed instrumented tests, or other diagnostic situations.

GitHub: iambaljeet / GmailCompose

Baljeet Singh brings us a demonstration of assembling a Gmail-style inbox screen using Compose UI. This goes along with a similar project demonstrating a Twitter-style UI.

GitHub: Gurupreet / ComposeCookBook

Gurupreet Singh offers a project demonstrating a wide range of Compose UI elements.

…And One More Thing

Did I mention that there are codelabs?

(sorry, Jose!)

If you encounter problems in subscribing, let us know!
Spread the Word!
If you have ideas for items for future newsletter editions, reach out via email or contact Mark Murphy on kotlinlang Slack!