-
Notifications
You must be signed in to change notification settings - Fork 206
View commands state strategy
##Introduction
When you apply annotation @InjectViewState to some Presenter, Moxy compiler generate ViewState-class for View, by which is typed this Presenter. This ViewState-class contains nested Command-classes for each command that View can executes. And by default when you send some command to View via ViewState, this command stack to command's queue as is. And each time when some View attaches to Presenter/ViewState, it applies this queue. Thus View become to right state.
But sometimes we want to manage this command's queue. Moxy provides @StateStrategy annotation and StateStrategy interface for this. By this way you can manage how to changes command's queue when some command start execute and finish. You can also apply this strategy to the View interface. Then this strategy apply to each View's commands by default.
- Home
- Causes of Moxy
- Getting started
- How to's
- Components
- Multiple modules
- Moxy & Kotlin
- Android Studio Templates
- FAQ
- Changelog