Bernardo Lourenço
Bernardo Lourenço
Home
Posts
Activities
Contact
Education
Experience
Light
Dark
Automatic
Android Basics
Android notes for beginners
This post has the notes that I took while taking the course ‘Android Basics with Compose’ from Google. The course is available
here
.
Bernardo Lourenço
Jun 29, 2024
1 min read
Android Basics
,
Main
Unit 2 notes
Kotlin fundamentals Write conditionals in Kotlin when statement when (parameter) { condition1 -> body1 condition2 -> body2 condition3 -> body3 ... } # Example: when (x) { 2, 3, 5, 7 -> println("x is a prime number between 1 and 10.
Bernardo Lourenço
Jun 29, 2024
6 min read
Android Basics
Unit 4 notes
Architecture Components 2 - Stages of the Activity lifecycle Activity lifecycle Activity -> entry point for interacting with the user (like the main function is the entry point of a programm in cpp) 1 activity -> multiple screens Activity lifecycle: onCreate(): One-time initializations (like setContent, which specifies activity’s UI layout).
Bernardo Lourenço
Jun 29, 2024
11 min read
Android Basics
Unit 5 notes
Get Data from the Internet Introduction to Coroutines in Kotlin playground Concurrency: performing multiple tasks in your app at the same time. Example: get data from a server or save user data on the device, while responding to user input events and updating the UI accordingly.
Bernardo Lourenço
Jun 29, 2024
17 min read
Android Basics
Unit 6 notes
Use Room for data persistance Video - Kotlin Flows in Practice Why should we use Flows? Requesting data every time we need it is not so good because we are not sure whether we have new data that we did not fetch or not.
Bernardo Lourenço
Jun 29, 2024
18 min read
Android Basics