When I press the end button, I want to end not only that activity but all the previous activities. When finish ();is used, only the activity that set the end button ends and the previous activity appears. How can I quit multiple previous activities by pressing a button? Let me tell you.
Answer # 1
If taskAffinity is not set in Activity, it should be the same value by default, so you can end it together with the following code.
Answer # 2
It ’s a little different from what you want, but "android: launchMode =" singleInstance " "To the target screen and declare it, the moment you open that screen, you can end the activity so far.
If you declare that and finish the screen, the previous Activity will not appear.
I don't know how to quit other activities. .
- java - i want to execute a class by pressing a button
- java - you can have multiple same android activities multiple layers? ?? ??
- c # - i want to be able to switch characters by pressing a button
- java - i want to change the color when i press the like button and keep the color changed
- java - i want to create a radio button branch with the equals method
- i want to implement a java button action
- about java button creation
- java - i want to display the toast by clicking the button
- php - inquiry form what to do if you can't get back by pressing the back button
- java - i want to sort the variables of list using multiple value values of map
- [java] how should the target of the delete button duplicated with be specified?
- java - i want to display multiple objects whose black eye direction changes
- i want to add contextmenu to button with javafx
- java - i don't respond when i press a button
- python - i want to avoid "no response" when pressing gui button in pyqt
- java - i want to use the saved values in multiple programs
- java - i want to transfer the answers entered from multiple google forms to another psi
- java - cannot define listener for button with inflated layout
- java - i want to change the text of the answer button depending on the problem
- duplicate check for multiple java input fields
- assuming that there are 3 android apps [java] buttons and a switch, they are managed by the switch statement button responds, bu
- java - listview seems to be null
- java - i want to place a fixed button at the bottom of the screen of android viewpager + tablayout
- java - i want to display the processed image on the screen
- java - can tts read only one text?
- java - about type conversion of view in android studio
- java - i can't log out of my google account
- java - change every time you press the color of the android studio button
- layout of fragment in java code
- java - there is a message in android:layout_margin because the application does not start even though there is no error at the t