Skip to content

Commit

Permalink
updated results page
Browse files Browse the repository at this point in the history
  • Loading branch information
joaomanaia committed Aug 30, 2022
1 parent 078b48e commit 2085499
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 7 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@
local.properties

/app/build
/app/release

/buildSrc/build
/buildSrc/build
16 changes: 15 additions & 1 deletion app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,18 @@
}

# @Serializable and @Polymorphic are used at runtime for polymorphic serialization.
-keepattributes RuntimeVisibleAnnotations,AnnotationDefault
-keepattributes RuntimeVisibleAnnotations,AnnotationDefault

# Firebase
-keep class com.firebase.** { *; }
-keep class org.apache.** { *; }
-keepnames class com.fasterxml.jackson.** { *; }
-keepnames class javax.servlet.** { *; }
-keepnames class org.ietf.jgss.** { *; }
-dontwarn org.w3c.dom.**
-dontwarn org.joda.time.**
-dontwarn org.shaded.apache.**
-dontwarn org.ietf.jgss.**

# Only necessary if you downloaded the SDK jar directly instead of from maven.
-keep class com.shaded.fasterxml.jackson.** { *; }
Binary file removed app/release/app-release.aab
Binary file not shown.
Binary file removed app/release/app-release.apk
Binary file not shown.
2 changes: 2 additions & 0 deletions core/src/main/res/values-pt/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,6 @@
<string name="is_not_in_the_target_word_wordle">" não está na palavra."</string>
<string name="is_in_the_word_but_in_the_wrong_spot_wordle">" está na palavra, mas no lugar errado."</string>
<string name="is_in_the_word_and_in_the_correct_spot_wordle">" está na palavra e no lugar correto."</string>
<string name="results_screen">Tela de resultados</string>
<string name="n_correct_questions">$1%s perguntas corretas</string>
</resources>
2 changes: 2 additions & 0 deletions core/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,6 @@
<string name="is_not_in_the_target_word_wordle">" is not in the target word."</string>
<string name="is_in_the_word_but_in_the_wrong_spot_wordle">" is in the word but in the wrong spot."</string>
<string name="is_in_the_word_and_in_the_correct_spot_wordle">" is in the word and in the correct spot."</string>
<string name="results_screen">Results screen</string>
<string name="n_correct_questions">$1%s correct questions</string>
</resources>
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
import com.airbnb.lottie.compose.LottieAnimation
import com.airbnb.lottie.compose.LottieCompositionSpec
Expand All @@ -25,6 +26,7 @@ import com.infinitepower.newquiz.model.multi_choice_quiz.getBasicMultiChoiceQues
import com.infinitepower.newquiz.multi_choice_quiz.components.CardQuestionAnswers
import com.infinitepower.newquiz.multi_choice_quiz.components.QuizStepViewRow
import com.infinitepower.newquiz.multi_choice_quiz.destinations.MultiChoiceQuizScreenDestination
import com.infinitepower.newquiz.core.R as CoreR
import com.ramcosta.composedestinations.annotation.Destination
import com.ramcosta.composedestinations.navigation.DestinationsNavigator
import kotlinx.serialization.decodeFromString
Expand Down Expand Up @@ -67,7 +69,7 @@ private fun MultiChoiceQuizResultsScreenImpl(
topBar = {
SmallTopAppBar(
title = {
Text(text = "Results screen")
Text(text = stringResource(id = CoreR.string.results_screen))
}
)
}
Expand All @@ -94,7 +96,7 @@ private fun MultiChoiceQuizResultsScreenImpl(
}
Spacer(modifier = Modifier.height(spaceLarge))
Text(
text = "${questionSteps.countCorrectQuestions()}/${questionSteps.size} correct questions",
text = stringResource(id = CoreR.string.results_screen, "${questionSteps.countCorrectQuestions()}/${questionSteps.size}"),
style = MaterialTheme.typography.headlineMedium
)
Spacer(modifier = Modifier.height(spaceLarge))
Expand All @@ -116,13 +118,13 @@ private fun MultiChoiceQuizResultsScreenImpl(
onClick = onPlayAgainClick,
modifier = Modifier.weight(1f)
) {
Text(text = "Play again")
Text(text = stringResource(id = CoreR.string.play_again))
}
Button(
onClick = onBackClick,
modifier = Modifier.weight(1f)
) {
Text(text = "Back")
Text(text = stringResource(id = CoreR.string.back))
}
}
}
Expand All @@ -145,7 +147,7 @@ private fun MultiChoiceQuizResultsScreenImpl(
},
confirmButton = {
TextButton(onClick = { setQuestionDialog(null) }) {
Text(text = "Close")
Text(text = stringResource(id = CoreR.string.close))
}
}
)
Expand Down

0 comments on commit 2085499

Please sign in to comment.