1:53 PM
0
FIRST WAY
In your first activity, declare one Activity object like this,
public static Activity fa;
onCreate()
{
    fa = this;
}
now use that object in another Activity to finish first-activity like this,
onCreate()
{
    FirstActivity.fa.finish();
}
SECOND WAY
From View
Write below code after startactivity(intent) for finish the activity from the view/class.
((Activity_Name1) context).finish();

0 comments:

Post a Comment