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

:) :)) ;(( :-) =)) ;( ;-( :d :-d @-) :p :o :>) (o) [-( :-? (p) :-s (m) 8-) :-t :-b b-( :-# =p~ $-) (b) (f) x-) (k) (h) (c) cheer
Click to see the code!
To insert emoticon you must added at least one space before the code.