Listing 2.9


#1

Concerning listing 2.9 on page 42 of Kindle ebook

I have to add …
TextView mQuestionTextView=(TextView)findViewById(R.id.question_text_view);

to the update() class to keep the activity from exiting on an error when I press the NEXT button. As long as its within update() section of code everything is fine. The book doesnt say I should have to do this. What am I missing?


#2

TextView mQuestionTextView=(TextView)findViewById(R.id.question_text_view);
should be inside protected void onCreate( ) not inside private void updateQuestion( ).

The code from the book works for me.