如何在android中保存列表视图的最后状态(视图应该在打开应用程序时恢复)

时间:2018-04-06 14:16:46

标签: android listview

@Override
public void onSaveInstanceState(Bundle outState, PersistableBundle outPersistentState) {
    super.onSaveInstanceState(outState, outPersistentState);
 //  dont know how to use this 
}

@Override
public void onRestoreInstanceState(Bundle savedInstanceState, PersistableBundle persistentState) {
    super.onRestoreInstanceState(savedInstanceState, persistentState);
    // same for this one
}

0 个答案:

没有答案