In your first activity, declare one
Activity object
like this,now use that object in anotherpublic static Activity fa; onCreate() { fa = this; }
Activity
to finish first-activity like this,SECOND WAYonCreate() { FirstActivity.fa.finish(); }
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