Android Closing Program Activities

What is the equivalent operation in action to move from the screen. For example, when you click the back button, the action disappears from view. How can this be called from within the action so that it closes.

+75
android android-activity
Feb 27 2018-11-21T00:
source share
5 answers

What about the Activity.finish() method:

Call it when your activity is completed and must be closed.

+151
Feb 27 '11 at 16:11
source share

you can use this.finish () if you want to close the current activity.

 this.finish() 
+32
Sep 26 '13 at 19:20
source share
Method

finish () is used to complete the operation and remove from the previous stack. You can call it in any way in action. But make sure that you close all database connections, all reference variables are null, to prevent memory leak.

+2
Oct 20 '16 at 1:59
source share

you can use finishAffinity(); to close all actions.

+1
Mar 16 '17 at 13:36 on
source share
 finish(); OR System.exit(0); 

I think this will help.

-one
Dec 12 '17 at 16:32
source share



All Articles