Questions tagged [model-view-intent]
8 questions
1
vote
1 answer
Is there a way to maintain MVI pattern and still prevent excessive state updates in a Jetpack Compose-based Android project using Orbit MVI?
I'm new to MVI architecture in Android development, i'm using Orbit MVI and Jetpack compose for my new project.
Of course, with MVI there is only one state for the entire view and everything will be updated if the state changes, according to the…

Nojipiz
- 33
- 6
1
vote
0 answers
Real life use cases or scenarios MVI architecture in Android?
I saw a lot of articles about MVI but everywhere these are focused on the implementation of MVI and provide some bookish or theoretical explanations. But anyone new to MVI like me is so much confusion about some questions like -
Why do we need MVI…

Gk Mohammad Emon
- 6,084
- 3
- 42
- 42
0
votes
0 answers
Is it ok to have multiple ViewModels updating one Screen/State in Android Jetpack Compose MVI app?
When building Android application in most update way MVI with Jetpack Compose we can do it by using Presenter or ViewModel. So let's consider 2 cases:
MVI by MVP: We have this reactive stuff from MVI, including State and so on. For my understanding…

RippedLegDev
- 1
- 1
- 3
0
votes
0 answers
Why cant call ActionResult for uploading process?
Here is my project in MVI that has UseCase. I can call Successful and Error in UploadImageResult sealed class. But when want to show progress in UI, should call UploadedProgressBarProcess and then get this in ViewModel. That's not call and work…

Ahmet Yılmaz
- 425
- 5
- 16
0
votes
0 answers
Jetpack Compose and MVI: Are mutable UI classes always bad?
Are there any valid reasons to make a UI data class property mutable?
For example: I have an app that allows users to send messages with polls with multiple choices using Checkboxes. I want ViewModel to maintain state of checkbox through both…

Regress.arg
- 352
- 6
- 16
0
votes
1 answer
What is the difference between MVVM and MVI pattern in Kotlin?
What is the difference between MVVM and MVI pattern in Kotlin?
MVVM, and MVI are some of the common patterns in Android and they can broadly be thought of as different flavours of the same core concept — abstracting logic from the UI into classes…

samad nk
- 1
- 1
0
votes
0 answers
How to mock sealed classes and test their arguments with Mockk?
I am trying to test sealed classes in a view model:
sealed class MyActions {
data class BottomNavigate(val fragment: Fragment2) :
MyActions()
}
How do I test BottomNavigate was called with an argument of type Fragment2 using mockk or anything…

wamae
- 660
- 9
- 21
0
votes
1 answer
How do I manage multiple types of error states?
Basically, I have a UI state data class as:
data class ServerState(
val isLoading: Boolean = true,
val fileData: MainData? = null,
val error: Throwable? = null,
)
In my ViewModel there are two types of errors. First, is if the client is…

Yash Garg
- 477
- 5
- 11