finds.dev← search

// the find

romainguy/sample-materials-shop

★ 509 · Kotlin · Apache-2.0 · updated Jun 2024

Sample app for Jetpack Compose Developer Preview 2

A single-activity Android demo from romainguy (Compose/Filament co-creator) showing a fake e-commerce shop UI built with Jetpack Compose, with a live 3D product viewer powered by Filament's PBR renderer embedded via View interop. It's a companion to a couple of 2020 conference talks, not a template or library — useful if you specifically need to see Compose driving a Filament SurfaceView.

The Filament-in-Compose integration is the real content here: it shows AndroidView interop wrapping a native SurfaceView and GL rendering loop, which is a pattern you won't find done correctly in most Compose samples. It ships with actual GLB models and baked HDR environment maps, so it runs and renders real materials out of the box rather than placeholder cubes. Coming from one of Compose's own engineers, the interop code is a credible reference for how to bridge Compose recomposition with a non-Compose rendering surface.

Built against Compose 1.6.4 era APIs described as 'Developer Preview 2' — several APIs shown have since been renamed or replaced in stable Compose, so treat this as historical reference, not current idiom. There are no tests, just a CI workflow that presumably does a build check. It's a 7-file demo, not a reusable module — Room and LiveData are included as checkbox integrations rather than demonstrated patterns worth copying. Last push in mid-2024 is likely a dependency bump, not active development; this project is effectively frozen.

View on GitHub →

// 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 →