0

I wan to close all activities in a button click with out using intent flag

Scrren1 Button click ---> Screen2 Button click ----> Screen3 Button click ---> Screen1 ----> BackPressed ---> Close All activities

Any idea about how to achieve this??

Tunaki
  • 132,869
  • 46
  • 340
  • 423
Madhu
  • 1,780
  • 23
  • 47
  • 1
    Can you explain how you did this , or what you really trying for?? – Sree May 19 '15 at 06:39
  • how you achieved `Screen3 Button click ---> Screen1 ----> BackPressed` ? – Rahul Tiwari May 19 '15 at 06:40
  • override onBackPressed method in screen1 and use finish() inside it. – Apurva May 19 '15 at 06:48
  • Why don't you try this using [fragments](http://developer.android.com/guide/components/fragments.html) ? You don't need to use intents and the 3 screens would be in the same activity. – CAS May 19 '15 at 06:50
  • I have edited your question to remove the tag [tag:close] because this tag is being removed from the site as discussed here http://meta.stackoverflow.com/q/308117/1743880. If you think this tag adds value to your question, feel free to leave a comment there. – Tunaki Mar 18 '16 at 18:14

0 Answers0