s********r 发帖数: 24 | 1 假设有一个listview,点击item进入详情页activity,但是按返回键以后activity销毁
。现在想知道怎么能复用这个详情页activity,点击返回键不销毁activity,点击
listview item可以重新传值,复用详情页activity。 | z*******n 发帖数: 1034 | 2 FLAG_ACTIVITY_NEW_TASK
Start the activity in a new task. If a task is already running for the
activity you are now starting, that task is brought to the foreground with
its last state restored and the activity receives the new intent in
onNewIntent().
This produces the same behavior as the "singleTask" launchMode value,
discussed in the previous section.
理解task概念 https://developer.android.com/guide/components/tasks-and-back-
stack.html
【在 s********r 的大作中提到】 : 假设有一个listview,点击item进入详情页activity,但是按返回键以后activity销毁 : 。现在想知道怎么能复用这个详情页activity,点击返回键不销毁activity,点击 : listview item可以重新传值,复用详情页activity。
|
|