I have an application that consists of using ActionBarSherlock in tab mode.I have 5 tabs and the content of each tab is handled using fragments. For tab2 though, I have a fr
I had this problem and I couldn't find the solution here, so I want to share my solution in case someone else has this problem again.
I had this code:
public void finishAction() {
onDestroy();
finish();
}
and solved the problem by deleting the line "onDestroy();"
public void finishAction() {
finish();
}
The reason I wrote the initial code: I know that when you execute "finish()" the activity calls "onDestroy()", but I'm using threads and I wanted to ensure that all the threads are destroyed before starting the next activity, and it looks like "finish()" is not always immediate. I need to process/reduce a lot of “Bitmap” and display big “bitmaps” and I’m working on improving the use of the memory in my app
Now I will kill the threads using a different method and I’ll execute this method from "onDestroy();" and when I think I need to kill all the threads.
public void finishAction() {
onDestroyThreads();
finish();
}