androidstudio2-5 Exercise 3: Interactive Mode and Run Preview ============================================================== A counter composable to preview: @Composable fun ClickCounter() { var count by remember { mutableIntStateOf(0) } Button(onClick = { count++ }) { Text("Clicked $count times") } } @Preview(showBackground = true) @Composable fun ClickCounterPreview() { { ClickCounter() } } (Imports needed: androidx.compose.material3.Button, Text; androidx.compose.runtime.*; use Alt+Enter.) 1. Normal preview: a still picture of the button reading "Clicked 0 times". 2. Interactive mode (docs): click the button in the preview; the number should rise, in an isolated sandbox that does not touch other previews. 3. Run Preview (docs): click the Run Preview icon next to the @Preview or at the top of the preview; the preview installs on the connected device or emulator as a new activity in the same app, so it shares the app's manifest and permissions. The button works on the real device. When to choose which Interactive mode: quick, no device needed; good for buttons, text fields, state changes. Run Preview: when the behaviour depends on the real device or on permissions in the manifest. Write down the exact icon names you used: this chapter could not check them.