问题描述
我试图停止刷新我的选项卡活动,在下面的图片中,您可以看到我从选项卡片段启动新活动,然后通过按下返回按钮并返回选项卡的活动将其关闭,所有选项卡都将重新启动.我需要以某种方式恢复标签活动,
在下面的代码中,我称为新活动:
Intent i = new Intent(context, New_Activity.class); startActivity(i);
并以这种方式关闭它:
finish();
问题描述
I am trying to stop refreshing my tabs activity, in the below pictures, you can see when I start new activity from tab fragment and then close it by pressing back button and returning to the tabs activity, all tabs will be restarted. I need to somehow resume tabs activity,
In the codes below, I call new activity:
Intent i = new Intent(context, New_Activity.class); startActivity(i);
and close it in this way:
finish();
推荐答案
Instead of finish just use flag for it like this way
Intent intent = new Intent(current_context, destination_activity.class); intent.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT); startActivity(intent);
相关问答
onCompletion在我希望它被调用时没有被调用。
在调用时,保持当前活动在前。
当新活动被调用时,无法启动活动ComponentInfo。NullPointerException
'IllegalStateException。活动已被销毁'当'getSupportFragmentManager()'在活动重启后调用时
Android - 从被调用的主活动中刷新/更新ListView
每当活动的onCreate()回调被调用时,Repository中的RefreshShows()会被调用。
课堂活动不'调用时不存在?
我不'当按钮单击事件调用时,不希望网格视图为空
当我不希望它与nsubstitute一起使用时,可以调用功能
当使用异步调用时,我如何从javascript中更新元刷新?