stumped adding a listener to textview and adding a previous button to geoquiz challenge

Get perfect grades by consistently using Place your order and get a quality paper today. Take advantage of our current 20% discount by using the coupon code GET20

Order a Similar Paper Order a Different Paper

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(; mQuestionTextView.setOnClickListener(new View.OnClickListener(){ @Override public void onClick(View V){ mCurrentIndex = (mCurrentIndex+1)%mQuestionBank.length; updateQueston(); }

I added this to the XML:

<TextView android_id="@+id/question_text_view" android_layout_width="wrap_content" android_layout_height="wrap_content" android_padding="24dp" android_clickable="true"/>

This still isn't functioning as a proper listener :|

In addition, I need to add a ‘previous button’ to pull users back to the previous question, but for some reason my code isn’t working. I could use some help in getting this to work.

In my strings xml file, I added this:

<string name=”prev_question_button”>Previous</string>

Changed the new layout xml to this:

<Button android_id=”@+id/previous_button” android_layout_width=”wrap_content” android_layout_height=”wrap_content” android_text=”@string/prev_question_button” android_drawableLeft=”@drawable/arrow_left” android_drawablePadding=”4dp”/> <Button android_id=”@+id/next_button” android_layout_width=”wrap_content” android_layout_height=”wrap_content” android_text=”@string/next_question_button” android_drawableRight=”@drawable/arrow_right” android_drawablePadding=”4dp”/>

My activity looks like this:

mPrevButton = (Button)findViewById(; 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.1

Attached is a zip of my progress…

Do you need help with this or a different assignment? We offer CONFIDENTIAL, ORIGINAL (Turnitin/LopesWrite/SafeAssign checks), and PRIVATE services using latest (within 5 years) peer-reviewed articles. Kindly click on ORDER NOW to receive an A++ paper from our masters- and PhD writers.

Get a 15% discount on your order using the following coupon code SAVE15

Order a Similar Paper Order a Different Paper