已采納回答 / orangesweet
cancel方法并不會立即停止,分很多情況,這個方法的文檔里有寫。execute方法好像是會有等待的情況,你用executeOnExecutor方法試試
2015-06-10
已采納回答 / orangesweet
你的Thread實現(xiàn)中好像沒有調(diào)用addbitmaptocache而asynctask你試試用executeOnExecutor();第一個參數(shù)你提前創(chuàng)建一個線程池對象,調(diào)用的時候傳入。
2015-06-10
最新回答 / orangesweet
1,什么時候檢查,這個就看你自己控制了,就跟結(jié)束一個線程一樣,需要自己判斷什么時候去檢查flag。在你認為恰當?shù)臅r機。你可以每隔一行檢查一次。。。2,onCancelled(Object)是AsyncTask的回調(diào),帶on的么。Calling this method will result in onCancelled(Object) being invoked on the UI thread after doInBackground(Object[]) returns.調(diào)用cancel方法會導(dǎo)致onC...
2015-06-10