In my application, I have 4 fragment into MainActivity and I use ViewPager for a show this fragments.
In each of fragments, I have API call.
But when running application run all of the API calls in this 4 fragments!
I want when click on each fragments, then run this API call.
I write API call codes and other codes into this method in fragment :
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
How can I do it? please help me