Commit 4e411cc6 by likorn

Different colors are used for highlighting correct and wrong answers

parent df14831a
......@@ -51,7 +51,13 @@ class TaskActivity : AppCompatActivity() {
private fun processAnswer(answer: Answer) {
timer.cancel()
colorAnimation.cancel()
findViewById<CardView>(answer.cardId).setCardBackgroundColor(resources.getColor(R.color.colorAccent))
if (answer.correct)
findViewById<CardView>(answer.cardId).setCardBackgroundColor(resources.getColor(R.color.colorAccent))
else {
findViewById<CardView>(answer.cardId).setCardBackgroundColor(resources.getColor(R.color.colorPrimary))
(findViewById<CardView>(answer.cardId).getChildAt(0) as TextView).setTextColor(Color.WHITE)
}
makeButtonsUncheckable()
val responseFragment = ResponseFragment.newInstance().also {
......
......@@ -34,7 +34,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="32dp"
android:text="Tap to continue"
android:text="@string/tap_to_continue"
android:textAppearance="@style/TextAppearance.MaterialComponents.Subtitle1"
android:textColor="#97000000"
app:layout_constraintBottom_toBottomOf="parent"
......
......@@ -10,4 +10,5 @@
<string name="how_many_digits">HOW MANY DIGITS?</string>
<string name="time_to_solve">Time to solve: %1$s seconds</string>
<string name="btn_next">Next</string>
<string name="tap_to_continue">Tap anywhere to continue</string>
</resources>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment