update VocabularyProgressOptionsScreen layout and expand motivational phrases

This commit is contained in:
jonasgaudian
2026-02-17 11:13:00 +01:00
parent 142eb5a31d
commit 35080c208b
5 changed files with 92 additions and 75 deletions

View File

@@ -91,44 +91,27 @@ fun VocabularyProgressOptionsScreen(
.padding(16.dp), .padding(16.dp),
verticalArrangement = Arrangement.spacedBy(16.dp) verticalArrangement = Arrangement.spacedBy(16.dp)
) { ) {
// Interval Settings // Daily Goal Settings
AppCard( AppCard {
expandable = true, val dailyGoal by settingsViewModel.dailyGoal.collectAsStateWithLifecycle()
initiallyExpanded = true,
title = stringResource(R.string.text_interval_settings_in_days),
text = stringResource(R.string.text_customize_the_intervals),
) {
val intervals by settingsViewModel.intervals.collectAsStateWithLifecycle()
Column( Column(
modifier = Modifier modifier = Modifier.padding(16.dp),
.padding(16.dp) verticalArrangement = Arrangement.spacedBy(8.dp)
.animateContentSize(),
verticalArrangement = Arrangement.spacedBy(16.dp)
) { ) {
IntervalTimeline(intervals = intervals)
intervals.forEach { (stageKey, days) ->
val displayLabel = labelForStage(stageKey)
IntervalSlider(
label = displayLabel,
value = days,
onValueChange = { newValue ->
settingsViewModel.setInterval(stageKey, newValue)
}
)
}
Spacer(Modifier.height(8.dp)) @Suppress("USELESS_ELVIS", "HardCodedStringLiteral")
Row( SettingsSlider(
modifier = Modifier.fillMaxWidth(), label = stringResource(R.string.target_correct_answers_per_day),
horizontalArrangement = Arrangement.End value = dailyGoal ?: 10,
) { onValueChange = { settingsViewModel.setDailyGoal(it) },
TextButton(onClick = { settingsViewModel.resetIntervalsToDefaults() }) { valueRange = 10f..100f,
Text(stringResource(R.string.reset_to_defaults)) steps = 17 // Allows snapping in steps of 5
} )
} Text(
text = stringResource(R.string.text_daily_goal_description),
style = MaterialTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurfaceVariant
)
} }
} }
@@ -163,30 +146,41 @@ fun VocabularyProgressOptionsScreen(
} }
} }
// Daily Goal Settings // Interval Settings
AppCard { AppCard(
val dailyGoal by settingsViewModel.dailyGoal.collectAsStateWithLifecycle() expandable = true,
Column( initiallyExpanded = true,
modifier = Modifier.padding(16.dp), title = stringResource(R.string.label_interval_settings_in_days),
verticalArrangement = Arrangement.spacedBy(8.dp) text = stringResource(R.string.text_customize_the_intervals),
) { ) {
Text( val intervals by settingsViewModel.intervals.collectAsStateWithLifecycle()
text = stringResource(R.string.daily_learning_goal), Column(
style = MaterialTheme.typography.titleMedium modifier = Modifier
) .padding(16.dp)
@Suppress("USELESS_ELVIS", "HardCodedStringLiteral") .animateContentSize(),
SettingsSlider( verticalArrangement = Arrangement.spacedBy(16.dp)
label = stringResource(R.string.target_correct_answers_per_day), ) {
value = dailyGoal ?: 10, IntervalTimeline(intervals = intervals)
onValueChange = { settingsViewModel.setDailyGoal(it) }, intervals.forEach { (stageKey, days) ->
valueRange = 10f..100f, val displayLabel = labelForStage(stageKey)
steps = 17 // Allows snapping in steps of 5 IntervalSlider(
) label = displayLabel,
Text( value = days,
text = stringResource(R.string.text_daily_goal_description), onValueChange = { newValue ->
style = MaterialTheme.typography.bodySmall, settingsViewModel.setInterval(stageKey, newValue)
color = MaterialTheme.colorScheme.onSurfaceVariant }
) )
}
Spacer(Modifier.height(8.dp))
Row(
modifier = Modifier.fillMaxWidth(),
horizontalArrangement = Arrangement.End
) {
TextButton(onClick = { settingsViewModel.resetIntervalsToDefaults() }) {
Text(stringResource(R.string.reset_to_defaults))
}
}
} }
} }
} }

View File

@@ -83,7 +83,6 @@
<string name="text_shuffle_languages">Sprachen mischen</string> <string name="text_shuffle_languages">Sprachen mischen</string>
<string name="text_training_mode">Trainingsmodus</string> <string name="text_training_mode">Trainingsmodus</string>
<string name="text_amount_of_cards">Anzahl der Karten</string> <string name="text_amount_of_cards">Anzahl der Karten</string>
<string name="text_interval_settings_in_days">Intervall-Einstellungen (in Tagen)</string>
<string name="text_label_word">Gib ein Wort ein</string> <string name="text_label_word">Gib ein Wort ein</string>
<string name="text_translation">Gib die Übersetzung ein</string> <string name="text_translation">Gib die Übersetzung ein</string>
<string name="text_due_today_only">Nur heute fällige</string> <string name="text_due_today_only">Nur heute fällige</string>
@@ -233,12 +232,10 @@
<string name="remaining">Übrig</string> <string name="remaining">Übrig</string>
<string name="label_ai_model_and_prompt"><![CDATA[KI-Modell & Prompt]]></string> <string name="label_ai_model_and_prompt"><![CDATA[KI-Modell & Prompt]]></string>
<string name="examples">Beispiele</string> <string name="examples">Beispiele</string>
<string name="vocabulary_settings">Vokabular-Einstellungen</string>
<string name="label_learning_criteria">Lernkriterien</string> <string name="label_learning_criteria">Lernkriterien</string>
<string name="min_correct_to_advance">Min. richtig zum Aufsteigen</string> <string name="min_correct_to_advance">Min. richtig zum Aufsteigen</string>
<string name="max_wrong_to_demote">Max. falsch zum Absteigen</string> <string name="max_wrong_to_demote">Max. falsch zum Absteigen</string>
<string name="daily_learning_goal">Tägliches Lernziel</string> <string name="daily_learning_goal">Tägliches Lernziel</string>
<string name="target_correct_answers_per_day">Ziel: Richtige Antworten pro Tag</string>
<string name="label_backup_and_restore">Sicherung &amp; Wiederherstellung</string> <string name="label_backup_and_restore">Sicherung &amp; Wiederherstellung</string>
<string name="export_vocabulary_data">Vokabeldaten exportieren</string> <string name="export_vocabulary_data">Vokabeldaten exportieren</string>
<string name="import_vocabulary_data">Vokabeldaten importieren</string> <string name="import_vocabulary_data">Vokabeldaten importieren</string>

View File

@@ -83,7 +83,6 @@
<string name="text_shuffle_languages">Embaralhar Idiomas</string> <string name="text_shuffle_languages">Embaralhar Idiomas</string>
<string name="text_training_mode">Modo de Treino</string> <string name="text_training_mode">Modo de Treino</string>
<string name="text_amount_of_cards">Quantidade de cartões</string> <string name="text_amount_of_cards">Quantidade de cartões</string>
<string name="text_interval_settings_in_days">Intervalos (em dias)</string>
<string name="text_label_word">Insira uma palavra</string> <string name="text_label_word">Insira uma palavra</string>
<string name="text_translation">Insira a tradução</string> <string name="text_translation">Insira a tradução</string>
<string name="text_due_today_only">Apenas para hoje</string> <string name="text_due_today_only">Apenas para hoje</string>
@@ -230,7 +229,6 @@
<string name="remaining">Restantes</string> <string name="remaining">Restantes</string>
<string name="label_ai_model_and_prompt"><![CDATA[Modelo de IA & Prompt]]></string> <string name="label_ai_model_and_prompt"><![CDATA[Modelo de IA & Prompt]]></string>
<string name="examples">Exemplos</string> <string name="examples">Exemplos</string>
<string name="vocabulary_settings">Configurações de Vocabulário</string>
<string name="label_learning_criteria">Critérios de Aprendizagem</string> <string name="label_learning_criteria">Critérios de Aprendizagem</string>
<string name="min_correct_to_advance">Mín. de Acertos para Avançar</string> <string name="min_correct_to_advance">Mín. de Acertos para Avançar</string>
<string name="max_wrong_to_demote">Máx. de Erros para Regredir</string> <string name="max_wrong_to_demote">Máx. de Erros para Regredir</string>

View File

@@ -59,14 +59,44 @@
</string-array> </string-array>
<string-array name="motivational_phrases"> <string-array name="motivational_phrases">
<item>Your inner parrot is learning new words! Keep talking! 🦜</item> <item>Your vocabulary is gathering crumbs. Time for a bigger cracker! 🦜</item>
<item>Even parrots start with one word. You\'re doing great! 🌟</item> <item>You\'re basically a parrot with a thesaurus. Impressive. 🪞</item>
<item>Time to spread your wings and learn something new! 🪶</item> <item>Copy that: you\'re getting better at this whole language thing. 📢</item>
<item>Your feathered friend is proud of your progress! 💚</item> <item>One day you\'ll squawk fluently. Keep practicing! 🎤</item>
<item>Repeat after me: You\'re getting better every day! 🗣️</item> <item>Your brain\'s getting fluffier. That\'s a good thing, right? 🧠💚</item>
<item>Fly high! Every new word is a new trick! 🎯</item> <item>Stealing words from dictionaries is our thing. You\'re welcome. 🦜</item>
<item>Your vocabulary is taking flight! Keep it up! 🦜</item> <item>Less chattering, more learning. Wait... no, both. Both is good. 🗣️</item>
<item>Sing a new song! Learn a new word today! 🎵</item> <item>Today\'s word count: one more than yesterday. Peak performance! 📈</item>
<item>You\'re not just a pretty bird. You\'re a smart bird now! 🪶✨</item>
<item>Perch yourself on some new vocabulary. It\'s more fun than it sounds. 🌳</item>
<item>Polly wants a cracker... of knowledge. Treat yourself! 🍪</item>
<item>Your memory span is longer than 3 seconds. Growth! 💪</item>
<item>Who needs a cage when you have a vocabulary of 50+ words? Freedom! 🗝️</item>
<item>Mimicry is an art. You\'re basically Picasso with words. 🎨</item>
<item>Feed your head. It\'s hungrier than your stomach. 🍽️</item>
<item>You\'re not repeating, you\'re... reinforcing. Definitely that. 🔁</item>
<item>Preening your lexicon one word at a time. Sleek! 😎</item>
<item>Talk to yourself. It\'s called practice, not crazy. We support it. 🦜</item>
<item>Your wingspan of knowledge is expanding. Flaunt it! 🪭</item>
<item>Seed by seed, word by word. Building a vocabulary empire! 👑</item>
<item>Soaring through sentences! Your vocabulary is finally taking flight! 🦜🌤️</item>
<item>High flyer detected! Your word count is reaching new altitudes! 🦅⬆️</item>
<item>Ready for takeoff? Your brain is about to leave the runway! ✈️💨</item>
<item>Flying high on vocabulary! Watch out, clouds! ☁️🚀</item>
<item>Your lexical wings are spreading. Time for lift-off! 🪶🔝</item>
<item>Gliding through grammar like a parrot on a thermal! 🌀📚</item>
<item>Every expert was once a beginner who didn\'t quit. You\'re on your way! 🌟</item>
<item>Small steps, big results. Today\'s word is tomorrow\'s fluency! 🚀</item>
<item>Your brain is a muscle. Time to work out those vocab gains! 💪🧠</item>
<item>Consistency beats intensity. Keep showing up! 📅✅</item>
<item>Words are your weapons. Arm yourself daily! ⚔️📖</item>
<item>Today\'s struggle is tomorrow\'s strength. Push through! 🔥</item>
<item>Learning a language is a marathon, not a sprint. Pace yourself! 🏃‍♂️🎯</item>
<item>Your future self will thank you for every word learned today. ⏰🙏</item>
<item>Progress isn\'t always linear. Every step forward counts! 📈⬆️</item>
<item>10 words a day × 365 = 3,650 words a year. Math doesn\'t lie! 🧮✨</item>
<item>Small numbers add up: 5 words/day = 1,825 new words/year. Boom! 💥📚</item>
<item>Your future vocabulary is just the sum of today\'s small efforts. Calculate success! 🧠➕</item>
</string-array> </string-array>
<string-array name="changelog_entries"> <string-array name="changelog_entries">
@@ -77,6 +107,4 @@
</string-array> </string-array>
</resources> </resources>

View File

@@ -818,7 +818,7 @@
<string name="text_in_progress">In Progress</string> <string name="text_in_progress">In Progress</string>
<string name="text_incorrect_em">Incorrect!</string> <string name="text_incorrect_em">Incorrect!</string>
<string name="text_infrequent">Rare</string> <string name="text_infrequent">Rare</string>
<string name="text_interval_settings_in_days">Interval Settings (in days)</string> <string name="label_interval_settings_in_days">Interval Settings</string>
<string name="text_key_active">Key Active</string> <string name="text_key_active">Key Active</string>
<string name="text_key_optional">Key Optional</string> <string name="text_key_optional">Key Optional</string>
<string name="text_label_word">Enter a word\n</string> <string name="text_label_word">Enter a word\n</string>
@@ -988,7 +988,7 @@
<string name="vocabulary_added_successfully">Vocabulary Added</string> <string name="vocabulary_added_successfully">Vocabulary Added</string>
<string name="vocabulary_repository">Vocabulary Repository</string> <string name="vocabulary_repository">Vocabulary Repository</string>
<string name="vocabulary_settings">Vocabulary Settings</string> <string name="vocabulary_settings">Progress Settings</string>
<string name="website_url">Website URL</string> <string name="website_url">Website URL</string>