Reputation: 12201
I have this huge data in 7 Navigation Tabs
. My problem is all the Tabs load simultaneously instead of one Tab at a time.
I tried using onHiddenChanged(boolean isHidden)
but its not been called.
Upvotes: 2
Views: 517
Reputation: 456
@Override
public void setUserVisibleHint(boolean isVisibleToUser) {
// TODO Auto-generated method stub
super.setUserVisibleHint(isVisibleToUser);
if(isVisibleToUser) {
To do what is required to load data
} else {
Do nothing
}
}
This method will gets called when u select each tab. Override this method in every tab fragment activity.
Upvotes: 2