I\'m kind of a noob in the android world, and doing a pet project for exercising. It\'s a very simple reminder-like app with just two activities. One is a customized ListVie
I did some more tests and lockon the problem in the anonymous inner class for Back button, since the error will appear whenever I clicked this before restarting the app. If I switch activities using the "go back" button on the phone, everything is fine.
I added one line in the inner class
EditEntry.this.finish();
It does solve the problem. I tried to test it more systematical this time. Let's say the code without the above line is A, and the code with this line is B. Scenario goes like follow
1.run A then A --> Error
2.run A then B --> Error
3.run B then A --> OK
4.run B then B --> OK
Therefore, I assume it is some kind of problem about the activity stack?