Solved by verified expert:This is only for android proficient tutors.This is from the 2nd Edition Android Programming Big Nerd Ranch Guide – Chapter 2.This was for my Listener, added to the Quiz activity:mQuestionTextView = (TextView)findViewById(R.id.question_text_view); mQuestionTextView.setOnClickListener(new View.OnClickListener(){ @Override public void onClick(View V){ mCurrentIndex = (mCurrentIndex+1)%mQuestionBank.length; updateQueston(); }I added this to the XML:
My activity looks like this:mPrevButton = (Button)findViewById(R.id.prev_button); mPrevButton.setOnClickListener(new View.OnClickListener(){ @Override public void onClick(View v) { if (mCurrentIndex == 0) { mCurrentIndex = mQuestionBank.length – 1; } else { mCurrentIndex = mCurrentIndex – 1; } updateQueston(); } });I’m getting errors when I build the project… some help would be much appreciated to get this up and running!Be sure you have maven and updated to the gradle version 3.0.1Attached is a zip of my progress…
geoquiz_chapter2_challenges_gyurik.zip
Unformatted Attachment Preview
…
Purchase answer to see full
attachment