How to destroy activity in android Code Answer

This article will show you how to destroy an activity in Android.To destroy an Activity from within your code, call its method onDestroy(). This will cause the destruction of all managed components associated with this instance of the Activity class.

how to destroy activity in android

By Smiling SandpiperSmiling Sandpiper on Apr 07, 2021
Intent intent = new Intent(this, NextActivity.class);
startActivity(intent);
finish();

Source: stackoverflow.com

Add Comment

0

To do this, you need to add the following code in your Activity

Java answers related to "how to destroy activity in android"

View All Java queries

Java queries related to "how to destroy activity in android"

Browse Other Code Languages

CodeProZone