Anyone know how do I fix this? I'm receiving data in the detail activity using retrofit request, & send that data to the 4 tabs in my viewpager with View Model
Now when the Activity loads, it has to also load the viewpager along with the first fragment which is displayed in the start. But problem is, making the request call & get the data, pass it to viewmodel, get data from the viewmodel takes some time I guess. Until then, the first fragment is already loaded without the items in my recyclerview.
How do I automatically refresh the first fragment in the viewpager when my data has been fetched?