My application simply request the json data from url and displays it in TableLayout. I used asynctask to request the json data and then I use that jsondata to fill my TableLayout. It works correct but on change of device orientation it again request the json data by running AsyncTask. I just want to stop calling AsyncTask again.i want the AsyncTask to run only once during lifetime of activity.
My application simply request the json data from url and displays it in TableLayout
Share
Add
android:configChanges="keyboardHidden|orientation"in your activity that prevents the restart activity when orientation change.