cuixiaoyiyi
Results
3
comments of
cuixiaoyiyi
You stop task on destruction by invoking the cancel(…) method. ``` AsyncTask.java * @param mayInterruptIfRunning true if the thread executing this * task should be interrupted; otherwise, in-progress tasks are...
** The anonymous class should be able to control the outer class (Activity). ** This is the exception case for anonymous threads, active (unfinished) thread objects are included in the...
``` Solution: static ThreadA extends thread{ WeakReference w = null; // or Context c = null; // getApplicationContext() with long lifecyle void run(){ try{ for/while(...){ .... if(isInterrupted()){ break; } }...