Fix UI being too tall for some devices.
This commit is contained in:
parent
aedb86030a
commit
31703cffb9
@ -11,8 +11,8 @@ android {
|
||||
applicationId = "com.hyperling.tictactoe"
|
||||
minSdk = 21
|
||||
targetSdk = 34
|
||||
versionCode = 1
|
||||
versionName = "1.0"
|
||||
versionCode = 2
|
||||
versionName = "1.0.1"
|
||||
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
vectorDrawables {
|
||||
|
@ -194,8 +194,8 @@ fun Game() {
|
||||
Column(
|
||||
horizontalAlignment = Alignment.CenterHorizontally
|
||||
, verticalArrangement = Arrangement.Center
|
||||
, modifier = Modifier
|
||||
.fillMaxSize()
|
||||
//, modifier = Modifier
|
||||
// .fillMaxSize()
|
||||
) {
|
||||
|
||||
Spacer(modifier = Modifier.weight(0.1f))
|
||||
@ -346,6 +346,15 @@ fun Game() {
|
||||
fontSize = 16.sp
|
||||
)
|
||||
Spacer(modifier = Modifier.size(5.dp))
|
||||
|
||||
Row(
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
horizontalArrangement = Arrangement.SpaceEvenly
|
||||
) {
|
||||
Column (
|
||||
horizontalAlignment = Alignment.Start,
|
||||
verticalArrangement = Arrangement.Top
|
||||
) {
|
||||
Row (
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
modifier = Modifier.clickable {
|
||||
@ -361,21 +370,6 @@ fun Game() {
|
||||
fontSize = 16.sp
|
||||
)
|
||||
}
|
||||
Row (
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
modifier = Modifier.clickable {
|
||||
opponentRandom = setRadiosFalse()
|
||||
}
|
||||
){
|
||||
RadioButton(
|
||||
selected = opponentRandom,
|
||||
onClick = { opponentRandom = setRadiosFalse() },
|
||||
)
|
||||
Text(
|
||||
text = stringResource(id = R.string.opponent_random),
|
||||
fontSize = 16.sp
|
||||
)
|
||||
}
|
||||
Row (
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
modifier = Modifier.clickable {
|
||||
@ -391,21 +385,6 @@ fun Game() {
|
||||
fontSize = 16.sp
|
||||
)
|
||||
}
|
||||
Row (
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
modifier = Modifier.clickable {
|
||||
opponentEasy = setRadiosFalse()
|
||||
}
|
||||
){
|
||||
RadioButton(
|
||||
selected = opponentEasy,
|
||||
onClick = { opponentEasy = setRadiosFalse() },
|
||||
)
|
||||
Text(
|
||||
text = stringResource(id = R.string.opponent_easy),
|
||||
fontSize = 16.sp
|
||||
)
|
||||
}
|
||||
Row (
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
modifier = Modifier.clickable {
|
||||
@ -421,6 +400,42 @@ fun Game() {
|
||||
fontSize = 16.sp
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Column (
|
||||
horizontalAlignment = Alignment.Start,
|
||||
verticalArrangement = Arrangement.Bottom
|
||||
) {
|
||||
Row (
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
modifier = Modifier.clickable {
|
||||
opponentRandom = setRadiosFalse()
|
||||
}
|
||||
){
|
||||
RadioButton(
|
||||
selected = opponentRandom,
|
||||
onClick = { opponentRandom = setRadiosFalse() },
|
||||
)
|
||||
Text(
|
||||
text = stringResource(id = R.string.opponent_random),
|
||||
fontSize = 16.sp
|
||||
)
|
||||
}
|
||||
Row (
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
modifier = Modifier.clickable {
|
||||
opponentEasy = setRadiosFalse()
|
||||
}
|
||||
){
|
||||
RadioButton(
|
||||
selected = opponentEasy,
|
||||
onClick = { opponentEasy = setRadiosFalse() },
|
||||
)
|
||||
Text(
|
||||
text = stringResource(id = R.string.opponent_easy),
|
||||
fontSize = 16.sp
|
||||
)
|
||||
}
|
||||
Row (
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
modifier = Modifier.clickable {
|
||||
@ -437,6 +452,8 @@ fun Game() {
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Spacer(modifier = Modifier.weight(.05f))
|
||||
// */
|
||||
|
||||
|
@ -2,12 +2,12 @@
|
||||
<string name="app_name">Tic-Tac-Toe</string>
|
||||
|
||||
<string name="opponent_header">Choose your opponent:</string>
|
||||
<string name="opponent_human">Human - Someone next to you.</string>
|
||||
<string name="opponent_random">AI : Random - Fills any open spot.</string>
|
||||
<string name="opponent_hard">AI : Hard - Your typical try-hard.</string>
|
||||
<string name="opponent_easy">AI : Easy - Opportunist, may try to win.</string>
|
||||
<string name="opponent_annoying">AI : Stubborn - Won\'t let you win.</string>
|
||||
<string name="opponent_shy">AI : Shy - Too scared to win.</string>
|
||||
<string name="opponent_human">Human</string>
|
||||
<string name="opponent_random">AI : Random</string>
|
||||
<string name="opponent_hard">AI : Hard</string>
|
||||
<string name="opponent_easy">AI : Easy</string>
|
||||
<string name="opponent_annoying">AI : Stubborn</string>
|
||||
<string name="opponent_shy">AI : Shy</string>
|
||||
|
||||
<string name="link1_text">Website</string>
|
||||
<string name="link1_uri">https://hyperling.com</string>
|
||||
|
Loading…
x
Reference in New Issue
Block a user