当我返回到我的活动的onCreate上升,而不是onActivityResult? [英] When I return back to my Activity onCreate is raised instead of onActivityResult?

查看:136
本文介绍了当我返回到我的活动的onCreate上升,而不是onActivityResult?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有打开了一个新的活动的结果,这样一个活动:

I have an Activity that opens a new Activity for result like this:

Intent i = new Intent(ActDocument.this, ActCustomers.class);
startActivityForResult(i, ActDocument.DIALOG_CUSTOMER);

当我preSS回到了孩子的活动,并返回到父活动 onActivityResult 正确调用中的所有设备,但我发现用<设备code>的onCreate 叫>而不是 onActivityResult

when I press back in the child Activity and return back to the parent Activity onActivityResult is called in all of devices correctly but I have fount a device that onCreate is called instead of onActivityResult.

本设备是三星Galaxy Tab,P5100的Andr​​oid 4.0.3。奇怪的是,我已经测试我的应用程序的三星Galaxy Tab,P5100其他设备的Andr​​oid 4.0.3,这是确定的,但我只有在这个设备有问题。

This device is Samsung Galaxy Tab-P5100 Android 4.0.3. It is strange that I have tested my application on other devices of Samsung Galaxy Tab-P5100 Android 4.0.3 and it was OK but I have problem only in this device.

为什么呢?我该如何解决呢?

Why? How can I solve that?

更新

我注意到的onDestroy()父活动是在该设备上打开孩子活动后调用。

I noticed onDestroy() of parent Activity is called after opening child Activity on this device.

推荐答案

大部分时间后退按钮就能完成的活动,除非你具体覆盖了

most of the time Back button will finish the activity unless you specific override the

OnBack pressed()

OnBackPressed()

我觉得你的问题是缺乏资源,或者你有一个像杀activty标志或限制后台进程有些开发商选择检查。

I think your problem is lack of resources, or maybe you have some developer options like kill activty flag or limit background process check this.

更新

进入设置 - >开发人员选项选中不守设置为标准限值活动和后台进程的限制。

Go to setting-> developer options unchecked don't keep activities and background process limit set to standard limit.

这篇关于当我返回到我的活动的onCreate上升,而不是onActivityResult?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆