Hello everyone in need to know what is the proper way of using the Async in tab Layout Activity.
In my task there a activity with two tabs.
Tab1 and Tab2
Tab1 Load data from server and show the data.
Tab2 Also load the another data from server and show the data in list view.
im using Async Task in tab1 and tab2 but the problem is when the activity started then the both Async Task class execute at same time that cause the error .
i need how to use it' sapratly when first tab fragment is visable then run the rirst Async Task and when second fragment is visable then run the 2nd Async Task one by one.