如何在WebView
中保存PersistableBundle
的状态?
@Override
public void onRestoreInstanceState(Bundle savedInstanceState,
PersistableBundle persistentState) {
webview.restoreState((Bundle)persistentState); //Error
super.onRestoreInstanceState(savedInstanceState, persistentState);
}
@Override
public void onSaveInstanceState(Bundle outState,
PersistableBundle outPersistentState) {
webview.saveState(outPersistentState); //Error
super.onSaveInstanceState(outState, outPersistentState);
}
或唯一的解决方案是在首选项中手动保存?