AsyncTask execution need to cancel in same fragment when make request from Navigation Drawer's every List Items
问题 My Question is i need to open SAME FRAGMENT from Navigation Drawer's every List Item 's , and when fragment display, If AsynTask execution is On Going then AsyncTask execution should be cancel. How can i do it? I tried so many ways to accomplish this but i failed everytime. I used asynctaskObject.cancel(true); So Can anybody please answer. i hope i'll get the result. Thanks in advance. :) 回答1: i found solution of my problem. We just need to make request in onStop method like below : @Override