I want to ignore or disable savedInstanceState so that the state of current activity won't save when I go to the next activity.
public void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
Just this:
public void onCreate(Bundle savedInstanceState){
super.onCreate(null);
Write this line in your activity xml file:
android:saveEnabled="false"
Or this:
@Override
protected void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
outState.clear();
}
Just override onRestoreInstanceState
without calling the super version
@Override
protected void onRestoreInstanceState(Bundle outState) {
//Just leave it empty
}