本文整理了Java中android.app.Activity.onSaveInstanceState()
方法的一些代码示例,展示了Activity.onSaveInstanceState()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Activity.onSaveInstanceState()
方法的具体详情如下:
包路径:android.app.Activity
类名称:Activity
方法名:onSaveInstanceState
暂无
代码示例来源:origin: square/leakcanary
@Override protected void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
outState.putString("visibleLeakRefKey", visibleLeakRefKey);
}
代码示例来源:origin: googlesamples/android-testing
@Override
protected void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
outState.putParcelable(KEY_HISTORY_DATA, mLogHistory);
}
代码示例来源:origin: commonsguy/cw-omnibus
@Override
protected void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
outState.putBoolean(STATE_IN_PERMISSION, isInPermission);
}
代码示例来源:origin: commonsguy/cw-omnibus
@Override
protected void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
outState.putSerializable(EXTRA_FILENAME, output);
}
代码示例来源:origin: commonsguy/cw-omnibus
@Override
protected void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
outState.putParcelable(STATE_PICKED, pickedDocument);
}
代码示例来源:origin: commonsguy/cw-omnibus
@Override
protected void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
outState.putBoolean(STATE_IN_PERMISSION, isInPermission);
}
代码示例来源:origin: commonsguy/cw-omnibus
@Override
protected void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
outState.putBoolean(STATE_IN_PERMISSION, isInPermission);
}
代码示例来源:origin: commonsguy/cw-omnibus
@Override
protected void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
outState.putBoolean(STATE_IN_PERMISSION, isInPermission);
}
代码示例来源:origin: commonsguy/cw-omnibus
@Override
protected void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
outState.putSerializable(EXTRA_FILENAME, output);
}
代码示例来源:origin: commonsguy/cw-omnibus
@Override
protected void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
outState.putString(STATE_ASSET, chosenAsset);
outState.putParcelable(STATE_PICKED, pickedDocument);
}
代码示例来源:origin: commonsguy/cw-omnibus
@Override
protected void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
outState.putBoolean(STATE_IN_PERMISSION, isInPermission);
outState.putBoolean(STATE_IN_RESOLUTION,
isResolvingPlayServicesError);
}
代码示例来源:origin: commonsguy/cw-omnibus
@Override
protected void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
outState.putString(STATE_ASSET, chosenAsset);
outState.putParcelable(STATE_PICKED, pickedDocument);
}
代码示例来源:origin: commonsguy/cw-omnibus
@Override
public void onSaveInstanceState(Bundle outState, PersistableBundle outPersistentState) {
super.onSaveInstanceState(outState, outPersistentState);
Log.d(getClass().getSimpleName(), "persistable onSaveInstanceState() called");
}
代码示例来源:origin: aporter/coursera-android
@Override
protected void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
outState.putCharSequence(MTEXTVIEW_TEXT_KEY,mTextView.getText());
}
}
代码示例来源:origin: commonsguy/cw-omnibus
@Override
protected void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
outState.putInt(STATE_POSITION, video.getCurrentPosition());
}
代码示例来源:origin: commonsguy/cw-omnibus
@Override
protected void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
outState.putStringArrayList(KEY_MIDDLE_CONTENTS, middleContents);
}
代码示例来源:origin: commonsguy/cw-omnibus
@Override
protected void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
outState.putLong(STATE_CREATION_TIME, getCreationTime());
dumpBundleToLog("save", outState);
Log.d(getClass().getSimpleName(), "onSaveInstanceState() called");
}
代码示例来源:origin: commonsguy/cw-omnibus
@Override
protected void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
outState.putLong(STATE_CREATION_TIME, getCreationTime());
dumpBundleToLog("save", outState);
}
代码示例来源:origin: robolectric/robolectric
@Override
public void onSaveInstanceState(Bundle outState) {
isRecreating = true;
transcript.add("onSaveInstanceState");
outState.putString("TestActivityKey", "TestActivityValue");
super.onSaveInstanceState(outState);
}
代码示例来源:origin: crazycodeboy/TakePhoto
@Override
protected void onSaveInstanceState(Bundle outState) {
getTakePhoto().onSaveInstanceState(outState);
super.onSaveInstanceState(outState);
}
内容来源于网络,如有侵权,请联系作者删除!