Special thanks to codingwithmitch.com
Get to know some amazing facts about
- Date
- Year
- Number
- Random facts
- Trivia
MVI stands for Model-View-Intent. MVI is one of the newest architecture patterns for Android, inspired by the unidirectional and cyclical nature of the Cycle.js framework.
MVI works in a very different way compared to its distant relatives, MVC, MVP or MVVM. The role of each MVI components is as follows:
- Model represents a state. Models in MVI should be immutable to ensure a unidirectional data flow between them and the other layers in your architecture.
- Like in MVP, Interfaces in MVI represent Views, which are then implemented in one or more Activities or Fragments.
- Intent represents an intention or a desire to perform an action, either by the user or the app itself. For every action, a View receives an Intent. The Presenter observes the Intent, and Models translate it into a new state.
Playground for learning how to use Hilt. A new way to incorporate Dagger dependency injection into an Android application.
Below is a list of examples.
- Preparing to use Hilt
- Follow the setup procedure:
- Field injecting a class with no dependencies. You own that class.
- Scopes and the "tier-like" system
- Dependencies that require dependencies (Concrete classes that you own)
- Some things can't be constructor-injected.
- Hilt Modules, Binds and Provides
- Multiple Bindings of the same type
- Retrieve data from Number Api with Retrofit
- Cache data with Room
- Display cached data in UI