<activity android:name=".app.PersistentState"
android:label="@string/activity_persistent"
android:windowSoftInputMode="stateVisible|adjustResize"> //屏幕在出现软键盘情况下自适应大小
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.SAMPLE_CODE" />
</intent-filter>
</activity>

Intent intent = new Intent(ReorderFour.this, ReorderTwo.class);
intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
startActivity(intent);

ANDROID系统,如果该Activity有记录,则删除Stack中记录,然后再入stack放到最后。

int android.content.Intent .FLAG_ACTIVITY_REORDER_TO_FRONT = 131072 [0x20000]

public static final int FLAG_ACTIVITY_REORDER_TO_FRONT

Since:API Level 3

If set in an Intent passed to Context.startActivity() , this flag will cause the launched activity to be brought to the front of its task's history stack if it is already running.

For example, consider a task consisting of four activities: A, B, C, D. If D calls startActivity() with an Intent that resolves to the component of activity B, then B will be brought to the front of the history stack, with this resulting order: A, C, D, B. This flag will be ignored if FLAG_ACTIVITY_CLEAR_TOP is also specified.

Constant Value: 131072 (0x00020000)

更多相关文章

  1. Android Screen Monitor抓取真机屏幕
  2. android锁屏唤醒并解锁屏幕
  3. Android屏幕自适应详解
  4. android View的快照与屏幕的截屏
  5. Android软键盘-弹起时布局向上拉-登录界面
  6. Android监听手机软键盘的弹起和关闭
  7. Android屏幕尺寸详解
  8. Android键盘系统
  9. Android之监听手机软键盘弹起与关闭

随机推荐

  1. 面向对象综合练习(超市收银系统)
  2. 你可能不知道的 Python 技巧
  3. 一文读懂python的map、reduce函数
  4. LightningChart JS Angular图表使用示例
  5. 最全Python数据科学小抄,赶紧收藏吧!
  6. 使用NIM Server网络半自动安装AIX系统
  7. 小白如何入门Python爬虫
  8. 一文搞懂Python错误和异常
  9. 分析全球1085例新冠肺炎患者数据,我们得出
  10. pandas读取表格后的常用数据处理操作