First and Second Challenge

Hello All,
I am trying to solve challenges for cheat activity, i am not able to figure out where is it going wrong, i have used a boolean variable that is true when user presses show for the first time and then i saved that variable in bundle and retrieve it when user rotates screen, somehow the logic is going wrong somewhere and its not working as expected.

Cheat Activity code below

public class CheatActivity extends AppCompatActivity {

    private static final String TAG = "CheatActivity";

    //to prevent name collisions with extras from other apps
    private static final String EXTRA_ANSWER_IS_TRUE = "artist.web.samplequiz.answer_is_true";

    private static final String EXTRA_ANSWER_SHOWN = "artist.web.samplequiz.answer_shown";

    private static final String SET_TEXT_VALUE ="setTextValue";

    private boolean mAnswerIsTrue;
    private boolean mAnswerShown;
    private String mTextValue;

    private TextView mAnswerTextView;
    private Button mShowAnswerButton;

    //to encapsulate data and hide code implementation from QuizActivity class
    public static Intent newIntent(Context packageContext, boolean answerIsTrue){
        Intent intent = new Intent(packageContext, CheatActivity.class);
        intent.putExtra(EXTRA_ANSWER_IS_TRUE, answerIsTrue);
        return intent;
    }

    public static boolean wasAnswerShown(Intent result){
        return result.getBooleanExtra(EXTRA_ANSWER_SHOWN,false);
    }

    @Override
    protected void onSaveInstanceState(Bundle outState) {
        super.onSaveInstanceState(outState);
        Log.i(TAG,"onSaveInstanceState");
        Log.i(TAG, " "+ mAnswerShown);
        outState.putBoolean(EXTRA_ANSWER_SHOWN,mAnswerShown);
        outState.putString(SET_TEXT_VALUE, mAnswerTextView.getText().toString());
    }

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

        if(savedInstanceState!=null){
            mAnswerShown = savedInstanceState.getBoolean(EXTRA_ANSWER_SHOWN);
            mTextValue = savedInstanceState.getString(SET_TEXT_VALUE);
        }

        //Activity.getIntent() always return the intent that started the activity
        mAnswerIsTrue = getIntent().getBooleanExtra(EXTRA_ANSWER_IS_TRUE, false);

        mAnswerTextView = (TextView) findViewById(R.id.answer_text_view);

        mShowAnswerButton = (Button) findViewById(R.id.show_answer_button);
        mShowAnswerButton.setOnClickListener(new View.OnClickListener(){

            @Override
            public void onClick(View v) {
                if (mAnswerShown==false) {
                    if (mAnswerIsTrue) {
                        mAnswerTextView.setText(R.string.true_button);
                    } else {
                        mAnswerTextView.setText(R.string.false_button);
                    }

                    mAnswerShown = true;
                    setAnswerShownResult(true);

                if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
                    int cx = mShowAnswerButton.getWidth() / 2;
                    int cy = mShowAnswerButton.getHeight() / 2;
                    float radius = mShowAnswerButton.getWidth();
                    Animator anim = ViewAnimationUtils.createCircularReveal(mShowAnswerButton, cx, cy, radius, 0);
                    anim.addListener(new AnimatorListenerAdapter() {
                        @Override
                        public void onAnimationEnd(Animator animation) {
                            super.onAnimationEnd(animation);
                            mShowAnswerButton.setVisibility(View.INVISIBLE);
                        }
                    });
                    anim.start();
                } else {
                    mShowAnswerButton.setVisibility(View.INVISIBLE);
                }
            }else {
                    mAnswerTextView.setText(mTextValue);
                    mShowAnswerButton.setVisibility(View.INVISIBLE);
                }
            }

        });
    }

    private void setAnswerShownResult(boolean isAnswerShown){
        Intent data = new Intent();
        data.putExtra(EXTRA_ANSWER_SHOWN, isAnswerShown);
        setResult(RESULT_OK, data);
    }
}

Could someone help point out the error

EDIT :- This was solved.

Many Thanks!!

so, if this was already solved, do we see the final correct code or you just mentioned that you don’t need help anymore?