finds.dev← search

// the find

android/sunflower

★ 17,755 · Kotlin · Apache-2.0 · updated Aug 2024

A gardening app illustrating Android development best practices with migrating a View-based app to Jetpack Compose.

Sunflower is the Android team's sample gardening app, originally a View-based Material 2 app and shown here mid-migration to Jetpack Compose with Material 3. It is aimed at Android developers with an existing View codebase who want to see how screens, Room-backed state, and navigation move to Compose one at a time. The README says the project is no longer maintained and points to compose-samples instead.

The migration journey doc records the actual decisions made during the port, which is more useful than the code alone. The test layers are all present: Room DAO tests, a ViewModel test, and Compose UI tests for the garden, plant list, and plant detail screens. The gallery screen uses a custom Paging 3 PagingSource over the Unsplash API, a concrete example of paged network data feeding a Compose screen. It also ships a macrobenchmark module and a baseline-prof.txt, which is rare in sample apps and useful for seeing how startup and scroll performance get measured.

The project is unmaintained: the last push was August 2024, and the README says to treat compose-samples as the source of truth. Anyone who forks this inherits a Compose and Material 3 surface that has kept moving since. The scope is deliberately narrow, with no plans for features beyond the View-to-Compose migration, so it is a poor template for apps that need auth, multiple data sources, or complex navigation. A fresh clone also needs a personal Unsplash API key before the gallery works. The plant description is rendered through AndroidViewBinding around a TextView because Compose Text cannot render HTML, which is an honest workaround but shows the sample reaching into the View system at exactly the point where a Compose-only app would hit the same wall.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →