diff --git a/app/src/main/java/com/luca0n/joguitos/pluck/fragments/TriviaQuestionFragment.java b/app/src/main/java/com/luca0n/joguitos/pluck/fragments/TriviaQuestionFragment.java index eaa02fa..0e53613 100644 --- a/app/src/main/java/com/luca0n/joguitos/pluck/fragments/TriviaQuestionFragment.java +++ b/app/src/main/java/com/luca0n/joguitos/pluck/fragments/TriviaQuestionFragment.java @@ -43,7 +43,7 @@ import com.luca0n.joguitos.pluck.R; import com.luca0n.joguitos.pluck.activities.TriviaGameActivity; import com.luca0n.joguitos.pluck.trivia.TriviaQuestion; import com.luca0n.joguitos.pluck.trivia.TriviaQuestionMultiple; - +import com.luca0n.joguitos.pluck.trivia.TriviaQuestionBoolean; public class TriviaQuestionFragment extends Fragment { @@ -112,9 +112,12 @@ public class TriviaQuestionFragment extends Fragment { } } } else { - buttonAnswerTrue.setOnClickListener(listener); - buttonAnswerFalse.setOnClickListener(listener); - } + buttonAnswerTrue.setOnClickListener(listener); + buttonAnswerFalse.setOnClickListener(listener); + + boolean correctAnswer = ((TriviaQuestionBoolean) question).checkAnswer("true"); + buttonAnswerCorrect = correctAnswer ? buttonAnswerTrue : buttonAnswerFalse; + } } private void disableButtons() {