In many tutorial showing, its has one LiveData
(eg userId).
private MutableLiveData<String> userId = new MutableLiveData<>();
LiveData<Resource<List<User>>> books = Transformations.switchMap(userId, id -> repository.getAllBook(id));
Unfortunately for me, I need 4 LiveData
(eg. userEmail
, passowrd
, authKey
, and so on... )to make a network request. Transformation.swithMap
accept only one LiveData
as param
.
How can i solve for this situation? Thanks you!