Nov 16, 2019 — Just make a fragment pager adapter, set its source to a LiveData, and in your immediate lifecycle parent, load the data from SharedPreferences ...
how-to-pass-data-from-one-fragment-to-another-in-viewpager
Aug 2, 2019 — We usually create one view model for one activity. ... Here we'll have two fragments in ViewPager and we will try to send data from first fragment to second ... So onTextChanged() we will send the data to second fragment.. notifyObservers(Object data) => data will be passed to Observer's update method. Code uses first one. You can modify it to call the second one if necessary. 3925e8d270
how to pass data from one fragment to another in viewpager
Comentarios