public void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); outState.putInt("x", x); }