---
title: "完全退出Activity"
author: "AndLi"
date: "2011-11-05T12:29:01Z"
tags: []
categories: ["移动开发"]
slug: "activity"
draft: false
lastmod: "2011-11-05T12:29:01Z"
id: 1236290
url: "https://andli.iteye.com/blog/1236290"
---

```
public static List<Activity> activityList = new LinkedList<Activity>();// 用于保存所有的activity
```

 

 

```
public void exit() {
		for (Activity activity : activityList) {
			if (activity != null) {
				activity.finish();
			}
		}
	}
```

 

 

```
Main.activityList.add(this);//统一管理Activity
```