-
What is the best approach?
```
// Only expose livedata
public class MyViewModel extends ViewModel {
private MutableLiveData users = new MutableLiveData();
public void loadUsers() {
…
-
I have a question.
in browseSample we always `Transformations.switchMap()` to observe one input LiveData and set the value of `repoRepository.search(search)` to results. As below:
```
val results:…
-
Sometimes the ViewModel needs to invoke an action using an Activity (for example to show a snack bar or to navigate to a new activity). Using MVP it's easy to implement it because the presenter has a …
-
有LiveData 和ViewModel了 为啥还要用EventBus啊?
-
To switch the domains for accounting default www.eshoptest.sk, www.ala.sk....
At Google I/O 2017, the Android Framework team announced the new Android Architecture Components. Namely ViewModel, LiveD…
-
https://developer.android.com/topic/libraries/architecture/index.html
- ViewModel
- LiveData
- Lifecycles/LifecycleObserver/LifecycleOwner etc
- Room
-
// Lifecycle + ViewModel & LiveData
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycleVersion"
implementation "androidx.lifecycle:lifecycle-livedata-ktx:$lifecycleVers…
-
Why is this part of the code written in fragment?I think it could written in viewmodel.
ViewModel should use the ObservableFiled or LiveData to update UI,and I think livedata is not a UI data sometim…
-
Hi,
This is not an issue but a question. There is no other way to ask a question.
Why you did not use an MediatorLiveData instead of observing 3 differents LiveData like you do:
` viewMode…
-
Currently in GitHubBrowserSample, architecture component - `LiveData` is used in Repository layer of the application for data flow as reactive stream which can be replaced with Kotlin Coroutines `Flow…