User Tools

Site Tools


pathway_2_add_a_button_to_an_app

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
pathway_2_add_a_button_to_an_app [2024/10/15 15:57] – created kalaschnikowpathway_2_add_a_button_to_an_app [2024/10/17 15:00] (current) – kalaschnikow
Line 1: Line 1:
 +====== 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 =====
 +
 +...
 +