Readme.md
1# Jetpack Compose Demos
2
3This module contains the development demos for Jetpack Compose. We aim to provide demos for all
4components where possible.
5
6## Building
7
8When using `studiow -c` or `./gradlew studio`, you will see a `compose.integration-tests.demos` run
9configuration. You can use it to build the demo app.
10
11## Developing
12
13`DemoActivity`, the entry point for the demo app, accepts an intent string extra called "demoname".
14You can optionally supply it to deeplink into a specific demo to speed up your workflow. This name
15is the name you specify when creating a new `Demo` instance. You can supply a name for a category or
16a specific demo.
17
18Using ADB, you can pass it like this:
19
20```bash
21adb ... --es demoname "Simple Magnifier"
22```
23
24You can create your own run configuration for a specific demo:
251. Open the list of run configurations and click "Edit Configurations"
262. Duplicate the `compose.integration-tests.demos` configuration and give it a name
273. Under "Launch Options" -> "Launch", select "Specified Activity"
284. Select `DemoActivity`
295. Add `--es demoname "My Demo's Title"` to the launch flags
306. Don't forget to hit apply!