Issue I am trying to use ViewModel with Jetpack Compose by doing a number increment. It’s not working. Maybe I’m not using the ViewModel in the right way. Here is my Activity code: class MainActivity : ComponentActivity() { override fun
Continue readingTag: mvvm
How to stop LiveData event being triggered more than Once
Issue I am using MutableLiveData within my application for event based communication. I have single activity two fragments architecture. With the help of ViewModel, I’m consuming the LiveData events in Fragment-1. But, when I replace this Fragment-1 with Fragment-2 using
Continue readingandroid keep tabs state on device rotation
Issue I’m building Android app that has fragments and the app uses an MVVM design pattern. Each fragment represents a football league title and icon These tabs are added dynamically depending on API calls. Here’s the API call signature call
Continue readingThe expression cannot be inverted, to be used in a two-way binding in EditText error
Issue It is my first time using data binding, so I’m confused. Trying to implement two-way databinding in EditText with MVVM architecture and getting this error in my Build: The expression ‘viewmodelClientUrl.getValue()’ cannot be inverted, so it cannot be used
Continue readingCan't add an item to room database
Issue For some reason I can’t add an Item to room database , The rest of my Daos are working ok but it seems @Upsert isn’t (obviously I’m messing up somewhere). I used the query in "App inspection" to add
Continue readingProblem with observing room database flows trough usecases
Issue I’m trying to get to know how to use flows in android app with clean architecture and MVVM using Room database. To do this i want to create basic notes app. Dependency injection is handled by Dagger Hilt. My
Continue readingthe display of the variable value does not change when the variable is changed (Jetpack Compose Android Studio)
Issue the application uses mvvm and jetpack compose, the screen (View, compose) shows whether permission has been obtained using the following code: val context = LocalContext.current val access by remember { mutableStateOf( NotificationManagerCompat.getEnabledListenerPackages(context) .contains(context.packageName) ) } Text(if (access) "good" else
Continue readingAccess local files on Android in a data source via Jetpack Compose and MVVM
Issue What’s the most common or recommended approach to access an application’s context in a data source class of a MVVM setup using Jetpack Compose? Specifically, I have the following setup: A view via class MainActivity : ComponentActivity() A view
Continue readingUpdate UI when permission is Granted
Issue I learning kotlin and coroutines; I would like that the app zoom on my location just after i give location permission, but instead i need to close app and restart it to have zoom… Can someone help me please
Continue readingWhen i add products to my cart it display nothing
Issue In my MenuFragment I display products that I can then add to the cart, when I click on any product in the logs I see that the product is added to the list and the list is updated, but
Continue reading