为什么我切换屏的时候不会调用onsaveInstance
public void onSaveInstanceState(Bundle outState, PersistableBundle outPersistentState) {
super.onSaveInstanceState(outState, outPersistentState);
outState.putString("data","lalalala");
Log.d("tag", "onSaveInstanceState()!!!!!!");
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Log.d("tag", "MainActivity onCreate!!!!!!!!!!!!");
textView = (TextView) findViewById(R.id.text);
if (savedInstanceState != null) {
textView.setText( savedInstanceState.getString("data")+"1!!");
}
}