Basiclly I have two screens at the moment. Question and Answer screens. When you click on the answer you think it is on the question screen it takes you to the answer screen to tell you if you were correct. The next part is from that screen you go back to the question screen and you are asked another question. At the moment this is creating loads of new activities and can easily get out of hand.
What I need is to know when a question activity gets 3 down and stop it. Basicly from the reason screen you can go back to view the question, but when you are on a new question it should remove the old and the reason page.
How do I do this?
In the Answer Activity you should call this.finish(), and that will go back to the Question Activity. And in the Question Activity start the AnswerActivity with startActivityForResult, so that the question Activity will be notified when the Answer is finished, so you can show a new Question, etc. So each AnswerActivity will be destroyed. If you need help with this, post a code sample. If you architect this way you shouldn’t need to find Activities in the stack.
Question Activity
Answer Activity