How to use finish () method in android

I am new to android, so please tell me how to finish working in Android. I have already done one project. Previous activities also worked in this project. Therefore, please tell me how to complete this activity when the next event begins.

Thank you in advance

+4
source share
2 answers

After I started the operation, I call the finish () method:

Intent i=new Intent(mainclass.this,nextclass.class); startActivity(i); finish(); 

Then the previous action is performed (main class).

+10
source

Perhaps this post will help?

+3
source

Source: https://habr.com/ru/post/1334217/


All Articles