我在开始一项新活动时收到这个非常奇怪的日志,我似乎找不到任何解释这种行为的东西(我的笔记在连字符后面):
D/LifeCycle﹕ onStart - old activity - first activity started for the first time
...
D/LifeCycle﹕ starting new activity - a button triggers starting the second activity
D/LifeCycle﹕ onStart - old activity - ??????
D/LifeCycle﹕ onStart - new activity - second activity is starting
D/LifeCycle﹕ onStop - old activity - first activity is stopped
...
D/LifeCycle﹕ onStart - old activity - pressing the back button, returning to the first activity
D/LifeCycle﹕ onStop - old activity - ??????
D/LifeCycle﹕ onStop - new activity - second activity is stopped
这是我开始新活动的方式(我不必传递任何东西):
startActivity(new Intent(this, ResultListActivity.class));
此外,当我在标记函数的问题中调用findViewById
时,我得到null。
任何人都可以解释为什么我得到这个日志?