package com.training.handleconfigurationsample2;

import android.support.v7.app.ActionBarActivity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;


public class MainActivity extends ActionBarActivity {
    EditText editText;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        editText = (EditText) findViewById(R.id.text1);
        Button button = (Button) findViewById(R.id.button1);
        button.setOnClickListener(new View.OnClickListener() {

            @Override
            public void onClick(View v) {
                editText.setText("Android Rocks!");
            }
        });

    }


    @Override
    protected void onSaveInstanceState(Bundle outState) {
        super.onSaveInstanceState(outState);
        outState.putParcelable("editText", editText.onSaveInstanceState());

    }

    @Override
    protected void onRestoreInstanceState(Bundle savedInstanceState) {
        super.onRestoreInstanceState(savedInstanceState);
        editText.onRestoreInstanceState(savedInstanceState
                .getParcelable("editText"));

    }
}

@@ -340,16 +340,111 @@
 ditText;
+ // just make sure to have an id for this view to maintain it's state across orientation chages
 %0A%0A    @O
@@ -936,462 +936,6 @@
  %7D%0A%0A
-%0A    @Override%0A    protected void onSaveInstanceState(Bundle outState) %7B%0A        super.onSaveInstanceState(outState);%0A        outState.putParcelable(%22editText%22, editText.onSaveInstanceState());%0A%0A    %7D%0A%0A    @Override%0A    protected void onRestoreInstanceState(Bundle savedInstanceState) %7B%0A        super.onRestoreInstanceState(savedInstanceState);%0A        editText.onRestoreInstanceState(savedInstanceState%0A                .getParcelable(%22editText%22));%0A%0A    %7D%0A
 %7D%0A

fix the latest sample