[url]http://sillydong.com/myjava/android-activity-finish.html[/url]
[url]http://alex-yang-xiansoftware-com.iteye.com/blog/1099207[/url]
//建立一个public static的list用来放activity
public static List activityList = new ArrayList();
//在每个activity建立的时候将这个activity加进list
main.activityList.add(main.this);
//finish所有list中的activity
public static void killall(){
int siz=activityList.size();
for(int i=0;i<siz;i++){
if(activityList.get(i)!=null){
activityList.get(i).finish();
}
}
}
[url]http://alex-yang-xiansoftware-com.iteye.com/blog/1099207[/url]