Auto-commit after successful build: update app gameplay/UI, improve build setup
Changed files:\napp/build.gradle.kts app/src/main/java/solutions/tretter/githugandroid/Exercise.kt
This commit is contained in:
@@ -19,8 +19,8 @@ android {
|
|||||||
applicationId = "solutions.tretter.githugandroid"
|
applicationId = "solutions.tretter.githugandroid"
|
||||||
minSdk = 26
|
minSdk = 26
|
||||||
targetSdk = 35
|
targetSdk = 35
|
||||||
versionCode = 101
|
versionCode = 102
|
||||||
versionName = "0.1.100"
|
versionName = "0.1.101"
|
||||||
|
|
||||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||||
vectorDrawables.useSupportLibrary = true
|
vectorDrawables.useSupportLibrary = true
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import androidx.compose.foundation.layout.Arrangement
|
|||||||
import androidx.compose.foundation.layout.Column
|
import androidx.compose.foundation.layout.Column
|
||||||
import androidx.compose.foundation.layout.Row
|
import androidx.compose.foundation.layout.Row
|
||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
|
import androidx.compose.foundation.text.selection.SelectionContainer
|
||||||
import androidx.compose.material3.Button
|
import androidx.compose.material3.Button
|
||||||
import androidx.compose.material3.ButtonDefaults
|
import androidx.compose.material3.ButtonDefaults
|
||||||
import androidx.compose.material3.MaterialTheme
|
import androidx.compose.material3.MaterialTheme
|
||||||
@@ -29,8 +30,12 @@ fun ExercisePane(
|
|||||||
modifier = Modifier.fillMaxWidth(),
|
modifier = Modifier.fillMaxWidth(),
|
||||||
verticalArrangement = Arrangement.spacedBy(12.dp),
|
verticalArrangement = Arrangement.spacedBy(12.dp),
|
||||||
) {
|
) {
|
||||||
Text(level.title, style = MaterialTheme.typography.titleLarge, color = TextPrimary)
|
SelectionContainer {
|
||||||
Text(level.description, color = TextSecondary)
|
Column(verticalArrangement = Arrangement.spacedBy(12.dp)) {
|
||||||
|
Text(level.title, style = MaterialTheme.typography.titleLarge, color = TextPrimary)
|
||||||
|
Text(level.description, color = TextSecondary)
|
||||||
|
}
|
||||||
|
}
|
||||||
Row(horizontalArrangement = Arrangement.spacedBy(8.dp)) {
|
Row(horizontalArrangement = Arrangement.spacedBy(8.dp)) {
|
||||||
Button(
|
Button(
|
||||||
onClick = onHint,
|
onClick = onHint,
|
||||||
@@ -57,14 +62,22 @@ fun ExercisePane(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (suggestionsExpanded && level.commandSuggestions.isNotEmpty()) {
|
if (suggestionsExpanded && level.commandSuggestions.isNotEmpty()) {
|
||||||
Text("Suggestions", color = TextPrimary, fontWeight = FontWeight.Bold)
|
SelectionContainer {
|
||||||
level.commandSuggestions.forEach { suggestion ->
|
Column(verticalArrangement = Arrangement.spacedBy(4.dp)) {
|
||||||
Text(suggestion, color = TextSecondary, fontFamily = FontFamily.Monospace)
|
Text("Suggestions", color = TextPrimary, fontWeight = FontWeight.Bold)
|
||||||
|
level.commandSuggestions.forEach { suggestion ->
|
||||||
|
Text(suggestion, color = TextSecondary, fontFamily = FontFamily.Monospace)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (visibleHint != null) {
|
if (visibleHint != null) {
|
||||||
Text("Hint", color = TextPrimary, fontWeight = FontWeight.Bold)
|
SelectionContainer {
|
||||||
Text(visibleHint, color = TextSecondary)
|
Column(verticalArrangement = Arrangement.spacedBy(4.dp)) {
|
||||||
|
Text("Hint", color = TextPrimary, fontWeight = FontWeight.Bold)
|
||||||
|
Text(visibleHint, color = TextSecondary)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user