Move fetch data to setUserVisibleHint method to fetch data only if fragment is visible.