Android onResume not called after finish() command on different activity

牧云@^-^@ 提交于 2019-12-11 11:04:40

问题


I have 2 Activities. My first activity calls the second activity. Once a button is clicked in the second activity it calls the finish() method on that activity causing it to return to Activity 1. This is fine, but my problem is that when it returns none of the expected methods are called (onResume(), onRestart(), on Start()). Is there anything that I could be missing? Anything that can inhibit the call? I have logs in each of the methods making sure that they aren't called. I have also added the android:noHistory="false" into my manifest to try solving the problem, but it did not fix it.

Here is the way I call the Activity

intent = new Intent(this, ViewEdit.class);
startActivity(intent);

and here is an example of the setup of the log in the methods

public void onStart(Bundle bundle){
    super.onStart();
    Log.d(MYACT, "On Start");
}

Thanks for any help.

来源:https://stackoverflow.com/questions/19850099/android-onresume-not-called-after-finish-command-on-different-activity

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!