android - How to close the 'Activity Home' when i was in 'Activity Details'? -


i got 3 activity namely 'acitvity login', 'activity home' , 'activity details'

i go 'acitvity login' 'activity home' , mean time close 'acitvity login' 'activity home' go 'activity details' dont close 'activity home' since may have go 'activity home' in 'activity details' have button logout , on click of button have go 'acitvity login' now, question how close 'activity home' when in 'activity details'?

thanks,

nandakishore p

in activity details:

public static activitya instance = null; public void oncreate(bundle savedinstancestate) {     super.oncreate(savedinstancestate);     instance = this; }  @override public void finish() {     super.finish();     instance = null; } 

then in acitvity login:

public void oncreate(bundle savedinstancestate) {     if(activitya.instance != null) {         try {               activitya.instance.finish();          } catch (exception e) {}     } } 

Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -