I have 3 tabs , the tabs created by this codes:
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
mTabHost = new FragmentTabHost(getActivity());
mTabHost.setup(getActivity(), getChildFragmentManager(), R.layout.tab);
mTabHost.addTab(mTabHost.newTabSpec("TabA").setIndicator("tab1"),
ItemFragment.class, null);
mTabHost.addTab(mTabHost.newTabSpec("TabB").setIndicator("tab2"),
TrailerFragment.class, null);
mTabHost.addTab(mTabHost.newTabSpec("TabC").setIndicator("tab3"),
PicFragment.class, null);
mTabHost.addta
mTabHost.setOnTabChangedListener(new TabHost.OnTabChangeListener() {
@Override
public void onTabChanged(String s) {
}
});
return mTabHost;
}
in the first tab I'm getting some data from web , when I select the second tab then the first tab the data loading again , How to fix that?