com.example.recipe # Root Package
├── data # For data handling.
│
│ ├── remote # Remote Data Handlers
| │ ├── api # Retrofit API for remote end point.
│ └── repository # Single source of data.
|
├── model # Model classes
|
├── di # Dependency Injection
│ └── module # DI Modules
|
├── ui # Activity/View layer
│ ├── base # Base View
│ ├── main # Main Screen Activity & ViewModel
| │ ├── adapter # Adapter for RecyclerView
| │ └── viewmodel # ViewHolder for RecyclerView
│ └── details # Detail Screen Activity and ViewModel
|
└── utils # Utility Classes / Kotlin extensions
Library | comment |
---|---|
Kotlin | First class and official programming language for Android development. |
Coroutines | For asynchronous and more. |
Android Architecture Components | Collection of libraries that help you design robust, testable, and maintainable apps. |
-------->LiveData | Data objects that notify views when the underlying database changes. |
--------->ViewModel | Stores UI-related data that isn't destroyed on UI changes. |
--------->ViewBinding | Generates a binding class for each XML layout file present in that module and allows you to more easily write code that interacts with views. |
-----------> Room | SQLite object mapping library. |
Retrofit | A type-safe HTTP client for Android and Java. |
Moshi | A modern JSON library for Kotlin and Java. |