The fragments I use in my ViewPager instance are quite resource intensive, so I\'d only like to load one at a time. When I try the following:
mV
this may be old thread but this seems to work for me. Override this function :
@Override
public void setMenuVisibility(boolean menuVisible) {
super.setMenuVisibility(menuVisible);
if ( menuVisible ) {
/**
* Load your stuffs here.
*/
} else {
/**
* Fragment not currently Visible.
*/
}
}
happy codings...