英文: How to process data asynchronously using coroutines? 问题 我需要执行4个并行请求。以下是我的代码: suspend fun fetchAs...
匹配错误(assertEquals)在使用Hilt和Mockk进行单元测试ViewModel时发生。
英文: Matching Error (assertEquals) when unit testing ViewModel with Hilt and Mockk 问题 我正在尝试对我的ViewMod...
Jetpack Compose:在屏幕上为每个交互式组件使用单独的ViewModel有多好
英文: Jetpack Compose: How good is having a separate ViewModel for every interactive component on Scre...
Navigation component – Why ViewModel is not re-created even though its owner (Fragment) is being re-created in NavHostFragment?
英文: Navigation component - Why ViewModel is not re-created even though its owner (Fragment) is being...
如何更新/刷新 RecyclerView 中选定项的数据
英文: How to update/refresh data of selected item from RecyclerView 问题 I have a recyclerview that its ...
why i cannot get data from api ? my live data "test" value equal null. how can i solve this?
英文: why i cannot get data from api ? my live data "test" value equal null. how can i solve...
如何在我的ViewModel类中传递活动上下文?
英文: How to pass activity context in my ViewModel class? 问题 class LoginViewModel: ViewModel() { var a...
你可以在使用Hilt在Android Studio时在ViewModel中引用Application吗?
英文: Why can I reference Application in ViewModel when I use Hilt in Android Studio? 问题 I use Hilt as...
Jetpack Compose 无法观察 MutableLiveData。
英文: Jetpack Compose can't observe MutableLiveData 问题 viewModel.todoLists.observe(lifecycleOwner)...
如何在Activity中不观察ViewModel viewModelScope.launch中的值?
英文: How to get value from ViewModel viewModelScope.launch without observing it in Activity? 问题 I am ...