Guests reservations application example with Android Architecture MVVM components and Clean Architecture
Guests reservations app that shows how to architect an android app in a Clean Architecture with Android Architecture MVVM components and Kotlin Coroutines. It shows a list of guests (have reservations and need reservations) that is stored and fetched from local storage.
The data of guests can be changed in GuestSelectionViewModel.kt class: change the constant in saveGuests() method into SAMPLE_DATA_LONG or SAMPLE_DATA_SHORT (defined in Constants.kt class)
-
ViewBinding A feature that allows you to more easily write code that interacts with views.
-
LiveData Build data objects that notify views when the underlying database changes.
-
ViewModel Store UI-related data that isn't destroyed on app rotations. Easily schedule asynchronous tasks for optimal execution.
-
ConstraintLayout ConstraintLayout allows you to create large and complex layouts with a flat view hierarchy (no nested view groups).
- Moshi Moshi is a modern JSON library for Android, Java and Kotlin. It makes it easy to parse JSON into Java and Kotlin classes.
- Kotlin Coroutines Coroutines is a rich library for coroutines developed by JetBrains. It contains a number of high-level coroutine-enabled primitives that this guide covers, including launch, async and others.
- DaggerHilt DaggerHilt is a dependency injection library for Android that reduces the boilerplate of doing manual dependency injection in your project.