Skip to content

Commit

Permalink
add a method for activitymanager
Browse files Browse the repository at this point in the history
  • Loading branch information
XinYiWorld committed May 16, 2017
1 parent 812153d commit 5ce894e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,19 @@ public void finishAllActivity() {
activityStack.clear();
}

/**
* 结束所有Activity,除了。
*/
public void finishAllActivityExcept(Class<?> cls) {
for (int i = 0, size = activityStack.size(); i < size; i++) {
if (null != activityStack.get(i) && !activityStack.get(i).getClass().equals(cls)) {
finishActivity(activityStack.get(i));
break;
}
}
activityStack.clear();
}

/**
* 获取指定的Activity
*
Expand Down

0 comments on commit 5ce894e

Please sign in to comment.