android2.3 api demo 学习系列(12)--App/Activity/Reorder Activitys
Reorder Activitys Demo主要是实现打开activity的方式的改变。本次demo涉及到三个activity : ReorderOne、ReorderTwo、ReorderThree。
按照默认的方式执行startActivity,三个activity依次压入stack中:

这个时候ReorderThree如果还是按照默认的方式打开ReorderOne(前提:manifest没有设置activity的flags),则会新建一个ReorderOne压入stack top“

如果ReorderThree中打开ReorderOne时设置flags那么会根据设置的具体方式打开ReorderOne:
Intent intent = new Intent(ReorderThree.this,ReorderOne.class);
intent.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
startActivity(intent);
这里的示例代码设置flags为Intent.FLAG_ACTIVITY_REORDER_TO_FRONT重新排序到最前:

具体的flag大家参考sdk研究吧。本次demo就介绍到这里。因为没有什么新的知识内容就不在赘述和贴代码效果图了。谢谢