I am using a ViewPager
in my app.
My ViewPager
is loading a lot of data and it is talking some time until it shows any content.
My question is this: How can I tell that the ViewPager is done loading (about to show its content on screen) so I can remove the loading progressbar?
Thanks!
Try removing your Progressbar on your adapter getItem() call back function when you are returning your last page Fragment :
@Override
public Fragment getItem(int position) {
TabInfo info = mTabs.get(position);
Fragment InsantiatedFragment = Fragment.instantiate(mContext, info.clss.getName(), info.args);
if(InsantiatedFragment.getId() == 5) // your last page Id
{
//remove your progressbar here
}
return InsantiatedFragment;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With