jackieliu

Results 3 comments of jackieliu

@PrototypeZ 我这边是准备在项目中接入,不过是看到你这边文档写着: No boilerplate code like onSaveInstanceState or onRestoreInstanceState any more. 我以为是在 onRestoreInstanceState 再去恢复的。 建议在文档说明下,如果是 Activity 中,是在 onCreate 时期恢复的。 最后有个建议是,可以提供两种恢复机制,某些变量是要求在 onCreate 中恢复的,某些变量要求在 onRestoreInstanceState 中恢复(因为继承关系可能不会去调用 super.onCreate)。

`class XActivity extends Activity { @AutoRestore protected int someValue; public void onCreate(Bundle save){ super.onCreate(save); // do some stuff } } class YActivity extends XActivity { public void onCreate(Bundle save){ //...