Android - switch to activity without restarting it

前端 未结 1 748
执笔经年
执笔经年 2020-12-30 09:00

I am programming a chat program for android.

I have the contact list as one activity and the chat windows as a second activity. I use startActivity to switch to the

1条回答
  •  [愿得一人]
    2020-12-30 09:46

    Add FLAG_ACTIVITY_REORDER_TO_FRONT to your Intent. That will bring the existing activity instance to the foreground if it exists or create a new one if it does not exist.

    0 讨论(0)
提交回复
热议问题