本文整理了Java中android.app.Activity.onRestoreInstanceState()
方法的一些代码示例,展示了Activity.onRestoreInstanceState()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Activity.onRestoreInstanceState()
方法的具体详情如下:
包路径:android.app.Activity
类名称:Activity
方法名:onRestoreInstanceState
暂无
代码示例来源:origin: googlesamples/android-testing
@Override
protected void onRestoreInstanceState(Bundle savedInstanceState) {
super.onRestoreInstanceState(savedInstanceState);
}
代码示例来源:origin: commonsguy/cw-omnibus
@Override
protected void onRestoreInstanceState(Bundle state) {
super.onRestoreInstanceState(state);
contact=state.getParcelable("contact");
viewButton.setEnabled(contact != null);
}
}
代码示例来源:origin: commonsguy/cw-omnibus
@Override
protected void onRestoreInstanceState(Bundle state) {
super.onRestoreInstanceState(state);
contact=state.getParcelable("contact");
viewButton.setEnabled(contact != null);
}
}
代码示例来源:origin: commonsguy/cw-omnibus
@Override
public void onRestoreInstanceState(Bundle savedInstanceState, PersistableBundle persistentState) {
super.onRestoreInstanceState(savedInstanceState, persistentState);
Log.d(getClass().getSimpleName(), "persistable onRestoreInstanceState() called");
}
代码示例来源:origin: commonsguy/cw-omnibus
@Override
protected void onRestoreInstanceState(Bundle savedInstanceState) {
super.onRestoreInstanceState(savedInstanceState);
dumpBundleToLog("restore", savedInstanceState);
creationTime=savedInstanceState.getLong(STATE_CREATION_TIME, -1L);
Log.d(getClass().getSimpleName(), "onRestoreInstanceState() called");
}
代码示例来源:origin: commonsguy/cw-omnibus
@Override
protected void onRestoreInstanceState(Bundle savedInstanceState) {
super.onRestoreInstanceState(savedInstanceState);
dumpBundleToLog("restore", savedInstanceState);
creationTime=savedInstanceState.getLong(STATE_CREATION_TIME, -1L);
}
代码示例来源:origin: commonsguy/cw-omnibus
@Override
protected void onRestoreInstanceState(Bundle savedInstanceState) {
super.onRestoreInstanceState(savedInstanceState);
lastPosition=savedInstanceState.getInt(STATE_POSITION);
video.seekTo(lastPosition);
}
代码示例来源:origin: android-hacker/VirtualXposed
@Override
protected void onRestoreInstanceState(Bundle savedInstanceState) {
super.onRestoreInstanceState(savedInstanceState);
if (mAlwaysUseOption) {
final int checkedPos = mListView.getCheckedItemPosition();
final boolean enabled = checkedPos != ListView.INVALID_POSITION;
mLastSelected = checkedPos;
mAlwaysButton.setEnabled(enabled);
mOnceButton.setEnabled(enabled);
if (enabled) {
mListView.setSelection(checkedPos);
}
}
}
代码示例来源:origin: commonsguy/cw-omnibus
@Override
protected void onRestoreInstanceState(Bundle state) {
super.onRestoreInstanceState(state);
adapter.onRestoreInstanceState(state.getBundle(STATE_ADAPTER));
}
}
代码示例来源:origin: commonsguy/cw-omnibus
@Override
protected void onRestoreInstanceState(Bundle state) {
super.onRestoreInstanceState(state);
adapter.onRestoreInstanceState(state.getBundle(STATE_ADAPTER));
}
}
代码示例来源:origin: commonsguy/cw-omnibus
@Override
protected void onRestoreInstanceState(Bundle state) {
super.onRestoreInstanceState(state);
adapter.onRestoreInstanceState(state.getBundle(STATE_ADAPTER));
}
}
代码示例来源:origin: robolectric/robolectric
@Override
protected void onRestoreInstanceState(Bundle savedInstanceState) {
super.onRestoreInstanceState(savedInstanceState);
transcribeWhilePaused("onRestoreInstanceState");
transcript.add("finishedOnRestoreInstanceState");
}
代码示例来源:origin: robolectric/robolectric
@Override
public void onRestoreInstanceState(Bundle savedInstanceState) {
transcript.add("onRestoreInstanceState");
assertTrue(savedInstanceState.containsKey("TestActivityKey"));
assertEquals("TestActivityValue", savedInstanceState.getString("TestActivityKey"));
super.onRestoreInstanceState(savedInstanceState);
}
代码示例来源:origin: commonsguy/cw-omnibus
@Override
protected void onRestoreInstanceState(Bundle state) {
super.onRestoreInstanceState(state);
adapter.onRestoreInstanceState(state.getBundle(STATE_ADAPTER));
tabs.removeAllTabs();
for (int i=0;i<adapter.getItemCount();i++) {
tabs.addTab(tabs.newTab().setText(adapter.getTabText(i)));
}
}
代码示例来源:origin: limpoxe/Android-Plugin-Framework
@Override
protected void onRestoreInstanceState(Bundle savedInstanceState) {
if (savedInstanceState != null) {
savedInstanceState.clear();
}
super.onRestoreInstanceState(savedInstanceState);
}
代码示例来源:origin: shchurov/HorizontalWheelView
@Override
protected void onRestoreInstanceState(Bundle savedInstanceState) {
super.onRestoreInstanceState(savedInstanceState);
updateUi();
}
代码示例来源:origin: iqiyi/Neptune
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
@Override
public void onRestoreInstanceState(android.os.Bundle bundle0, android.os.PersistableBundle persistablebundle1) {
mOriginActivity.onRestoreInstanceState(bundle0, persistablebundle1);
}
代码示例来源:origin: fookwood/Launcher3
@Override
public void onRestoreInstanceState(Bundle state) {
super.onRestoreInstanceState(state);
for (int page: mSynchronouslyBoundPages) {
mWorkspace.restoreInstanceStateForChild(page);
}
}
代码示例来源:origin: noties/Markwon
@Override
protected void onRestoreInstanceState(Bundle savedInstanceState) {
try {
super.onRestoreInstanceState(savedInstanceState);
} catch (Throwable t) {
// amazing stuff, we need this because on JB it will crash otherwise with NPE
Debug.e(t);
}
}
代码示例来源:origin: com.actionbarsherlock/actionbarsherlock
@Override
protected void onRestoreInstanceState(Bundle savedInstanceState) {
super.onRestoreInstanceState(savedInstanceState);
getSherlock().dispatchRestoreInstanceState(savedInstanceState);
}
内容来源于网络,如有侵权,请联系作者删除!