An AsyncTask is executed on click:
List<RSSItem> list = new Vector<RSSItem>();
private OnClickListener click = new OnClickListener() {
public void onClick(View view) {
list.clear();
if((dft.getStatus().toString()).equals("RUNNING")) dft.cancel(true);
currentCategory = catigoriesHolder.indexOfChild(view);
dft = new DownloadFilesTask();
dft.execute(rssFeedURL[currentCategory]);
}
};
In doInBackGround method the variable list is filled up. How to prevent the list to be cleared at point at which it is used to fill ListView. How to be sure, that on next click the previous instance of AsyncTask have been destroyed and there is no further processing of it.
The issue is regarding version 1.6.