MediatorLiveData or switchMap transformation with multiple parameters
问题 I am using Transformations.switchMap in my ViewModel so my LiveData collection, observed in my fragment, reacts on changes of code parameter. This works perfectly : public class MyViewModel extends AndroidViewModel { private final LiveData<DayPrices> dayPrices; private final MutableLiveData<String> code = new MutableLiveData<>(); // private final MutableLiveData<Integer> nbDays = new MutableLiveData<>(); private final DBManager dbManager; public MyViewModel(Application application) { super