Challenge difficulty

Hi there,
I am actually working through this great book and am solving now the challenges of chapter 5.
It is written that the loopholes are in order from easy to hard but I think that the second loophole is way easier to close than the first one. Am I missing something?
I closed the second loophole in QuizActivity by just adding another savedInstanceState with the boolean mIsCheater.

But for the first loophole in CheatActivity I would also add now a savedInstanceState and this is the hard part to me because I think that there is a better way than just adding a savedInstanceState and adding an extra boolean variable to the CheatActivity code. But I don’t know how I could achieve it.

1 Like

You would solve both of those two loopholes in the same way. Add a new variable and save it in onSaveInstanceState to indicate if the user cheated. You would also want to make sure the UI in CheatActivity shows the correct thing across rotation. The answer should not disappear when you rotate CheatActivity.

So there is really only this solution. Okay, thank you.