本文整理了Java中android.support.v4.app.FragmentActivity.onRestoreInstanceState()
方法的一些代码示例,展示了FragmentActivity.onRestoreInstanceState()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。FragmentActivity.onRestoreInstanceState()
方法的具体详情如下:
包路径:android.support.v4.app.FragmentActivity
类名称:FragmentActivity
方法名:onRestoreInstanceState
暂无
代码示例来源:origin: gzu-liyujiang/AndroidPicker
@CallSuper
@Override
public void onRestoreInstanceState(Bundle savedInstanceState) {
super.onRestoreInstanceState(savedInstanceState);
LogUtils.verbose(className + " onRestoreInstanceState");
}
代码示例来源:origin: iqiyi/Neptune
@Override
protected void onRestoreInstanceState(Bundle savedInstanceState) {
super.onRestoreInstanceState(savedInstanceState);
}
代码示例来源:origin: ManbangGroup/Phantom
@Override
protected void onRestoreInstanceState(Bundle savedInstanceState) {
super.onRestoreInstanceState(savedInstanceState);
appendLog("onRestoreInstanceState");
}
代码示例来源:origin: shazam/android-aspects
@Override
public void onRestoreInstanceState(Bundle savedInstanceState, PersistableBundle persistentState) {
super.onRestoreInstanceState(savedInstanceState, persistentState);
dispatcher.dispatchOnRestoreInstanceState(this, savedInstanceState, persistentState);
}
代码示例来源:origin: shazam/android-aspects
@Override
protected void onRestoreInstanceState(@NonNull Bundle savedInstanceState) {
super.onRestoreInstanceState(savedInstanceState);
dispatcher.dispatchOnRestoreInstanceState(this, savedInstanceState);
}
代码示例来源:origin: grzegorznittner/chanu
@Override
protected void onRestoreInstanceState(Bundle bundle) {
super.onRestoreInstanceState(bundle);
if (bundle == null) return;
boardCode = bundle.getString(ChanBoard.BOARD_CODE);
threadNo = bundle.getLong(ChanThread.THREAD_NO, 0);
postNo = bundle.getLong(ChanPost.POST_NO, 0);
if (bundle.containsKey(SUBJECT)) subjectText.setText(bundle.getString(SUBJECT));
if (bundle.containsKey(TEXT)) setMessage(bundle.getString(TEXT));
if (bundle.containsKey(REPLY_TEXT)) replyText = bundle.getString(REPLY_TEXT);
if (bundle.containsKey(QUOTE_TEXT)) quoteText = bundle.getString(QUOTE_TEXT);
if (bundle.containsKey(SPOILER)) spoilerCheckbox.setChecked(bundle.getBoolean(SPOILER, false));
if (bundle.containsKey(POST_REPLY_IMAGE_URL)) imageUri = bundle.getString(POST_REPLY_IMAGE_URL) != null ? Uri.parse(bundle.getString(POST_REPLY_IMAGE_URL)) : null;
imagePath = bundle.getString(IMAGE_PATH);
contentType = bundle.getString(CONTENT_TYPE);
orientation = bundle.getString(ORIENTATION);
if (DEBUG) Log.i(TAG, "onRestoreInstanceState() bundle=" + bundle);
}
代码示例来源:origin: j4velin/MapsMeasure
@Override
protected void onRestoreInstanceState(final Bundle savedInstanceState) {
super.onRestoreInstanceState(savedInstanceState);
try {
metric = savedInstanceState.getBoolean("metric");
@SuppressWarnings("unchecked")
// Casting to Stack<LatLng> apparently results in
// "java.lang.ClassCastException: java.util.ArrayList cannot be cast to java.util.Stack"
// on some devices
List<LatLng> tmp = (List<LatLng>) savedInstanceState.getSerializable("trace");
Iterator<LatLng> it = tmp.iterator();
while (it.hasNext()) {
addPoint(it.next());
}
mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(
new LatLng(savedInstanceState.getDouble("position-lat"),
savedInstanceState.getDouble("position-lon")),
savedInstanceState.getFloat("position-zoom")));
} catch (Exception e) {
if (BuildConfig.DEBUG) Logger.log(e);
e.printStackTrace();
}
}
代码示例来源:origin: ManbangGroup/Phantom
@Override
protected void onRestoreInstanceState(Bundle savedInstanceState) {
savedInstanceState.setClassLoader(mPluginInfo.getPluginClassLoader());
Set<String> keys = savedInstanceState.keySet();
for (String key : keys) {
Bundle internalBundle = savedInstanceState.getBundle(key);
if (null != internalBundle) {
internalBundle.setClassLoader(mPluginInfo.getPluginClassLoader());
}
}
try {
super.onRestoreInstanceState(savedInstanceState);
} catch (Exception e) {
VLog.w(e, "super.onRestoreInstanceState() error");
LogReporter.reportException(e);
}
Bundle savedData = getPluginSavedData(savedInstanceState);
callTargetActivityMethod(ON_RESTORE_INSTANCE_STATE, "onRestoreInstanceState", savedData);
}
内容来源于网络,如有侵权,请联系作者删除!