从活动android调用时不希望刷新tabsactivity [英] Don't want to refresh tabsactivity when call from activity android
本文介绍了从活动android调用时不希望刷新tabsactivity的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正尝试停止刷新我的标签页活动,在下面的图片中,您可以看到当我从标签页片段开始新活动,然后通过按返回按钮并返回到标签页活动将其关闭时,所有标签页都将重新启动.我需要以某种方式恢复标签页活动,
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);
并以这种方式关闭它:
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);
这篇关于从活动android调用时不希望刷新tabsactivity的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文