在方法结束时调用super.onSaveInstanceState(outState)?

时间:2017-03-15 15:31:37

标签: android

我想保存活动状态。所以我使用方法onSaveInstanceState()

@Override
protected void onSaveInstanceState(Bundle outState) {
    outState.putBoolean(SOME_KEY, inCheckMode);
    super.onSaveInstanceState(outState);
}

问题是:

我应该在方法结束时调用super.onSaveInstanceState(outState)吗?

1 个答案:

答案 0 :(得分:0)

我们必须先存储数据。

然后我们必须在最后调用super.onSaveInstanceState(outState)