我必须在方向更改时保存多个整数数组如何操作。 这是我为保存一个值而看到的代码。
@Override
public void onSaveInstanceState(Bundle outState) {
//--- save what ever you need to persist ---
outState.putString("ID", "1234567890");
super.onSaveInstanceState(outState);
}
@Override
public void onRestoreInstanceState(Bundle savedInstanceState) {
super.onRestoreInstanceState(savedInstanceState);
String ID = savedInstanceState.getString("ID");
}