Code acting *odd*


Hey, so I just wrote our first little app from the book, the GeoQuiz app. I thought everything was working out but apparently I’m wrong. So my problem is that it seems like my “next” and “true” buttons are switched… When I click “true” it just grabs a new question with no toast or anything. When I click “next” it does a toast as if it were a “true/false” button and then grabs a new question.

I downloaded the to compare my code to what they have, but unfortunately it only contains the code for the app from only the first few sections of the book. Nothing about the next button or model layer.

I’ve been looking over my code to see what could be wrong but I’m just not seeing it… from what I described you’d imagine that maybe I had just switched the id’s of the next and true buttons but that’s not the case, at least I don’t think it is…

Here’s some of my code: (pretty much straight from the book )…

[code] mTrueButton = (Button) findViewById(;
mTrueButton.setOnClickListener(new View.OnClickListener() {

		public void onClick(View v) {


[code] mNextButton = (Button) findViewById(;
mNextButton.setOnClickListener(new View.OnClickListener() {

		public void onClick(View v) {
			mCurrentIndex = (mCurrentIndex + 1) % mQuestionBank.length;



Have you looked at your layout file?


Got it working, I wasn’t updating question after clicking true or false.