Android Bootcamp [Day 4]

Today we have another class session later, but I’m reviewing some of the sample code.

If you wanna create a date for sample code easy way to do that is Instant.parse("yyyy-MM-dd'T'HH:mm:ssZ") That would be ISO 8601.

Chapter 6 of the book: goes into interaction for the app

MVI: Model View Intent, structure where the interactions get dispatched and consumed to update the UI

Async programming is done using suspend.

The source for dispatched data is a flow.

A great way to separate the data, and logic from the view is to use view models.

Rotating device could cause issues if the data isn’t stored in a view model.

This val currentMoment: Instant = comes from package import kotlinx.datetime.Clock and import kotlinx.datetime.Instant.

ViewModels also help scope Coroutines to keep them from stopping when the device rotates.

From the live session.

When viewing the project, if the file is yellow those files are auto generated.

They go thru a bunch of stuff about git and git in Android studio.

From the homework

Order of modifiers matter.

If you wanna make a circle you would use .clip(CircleShape).

You can add .dp to even calculated numbers.