====== Pathway 2: Add a button to an app ====== https://developer.android.com/courses/pathways/android-basics-compose-unit-2-pathway-2 This is a part of [[Android Basics with Compose]] course. ===== 1. Intro to Dice Roller app ===== Video (optional) ===== 2. Create an interactive Dice Roller app ===== ... ==== 2.7. Build the dice-roll logic ==== ... * Composables are stateless by default, which means that they don't hold a value and can be recomposed any time by the system, which results in the value being reset. However, Compose provides a convenient way to avoid this. Composable functions can store an object in memory using the ''remember'' composable. ... ==== 2.9. Conclusion ==== Summary: * Define composable functions. * Create layouts with Compositions. * Create a button with the Button composable. * Import drawable resources. * Display an image with the Image composable. * Make an interactive UI with composables. * Use the remember composable to store objects in a Composition to memory. * Refresh the UI with the mutableStateOf()function to make an observable. ===== 3. Use the debugger in Android Studio ===== ... ===== 4. Practice: Click behavior ===== ...