Android: How to ignore or disable savedInstanceState?

Just this:

public void onCreate(Bundle savedInstanceState){
    super.onCreate(null);

Or this:

@Override
    protected void onSaveInstanceState(Bundle outState) {
        super.onSaveInstanceState(outState);
        outState.clear();
    }

Write this line in your activity xml file:

    android:saveEnabled="false"

Leave a Comment