Add Back Button
This commit is contained in:
parent
2368d7b829
commit
e58cb76df9
1 changed files with 9 additions and 2 deletions
|
|
@ -11,6 +11,8 @@ import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.foundation.layout.size
|
import androidx.compose.foundation.layout.size
|
||||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||||
import androidx.compose.material.Button
|
import androidx.compose.material.Button
|
||||||
|
import androidx.compose.material.ButtonColors
|
||||||
|
import androidx.compose.material.ButtonDefaults
|
||||||
import androidx.compose.material.Icon
|
import androidx.compose.material.Icon
|
||||||
import androidx.compose.material.Text
|
import androidx.compose.material.Text
|
||||||
import androidx.compose.material.icons.Icons
|
import androidx.compose.material.icons.Icons
|
||||||
|
|
@ -57,11 +59,11 @@ data class DetailScreen(
|
||||||
val height: String = json.optString("height")
|
val height: String = json.optString("height")
|
||||||
val weight: String = json.optString("weight")
|
val weight: String = json.optString("weight")
|
||||||
Box(
|
Box(
|
||||||
modifier = Modifier.background(color = orange).fillMaxSize(),
|
modifier = Modifier.background(color = Color.White).fillMaxSize(),
|
||||||
contentAlignment = Alignment.Center
|
contentAlignment = Alignment.Center
|
||||||
) {
|
) {
|
||||||
//Back Button
|
//Back Button
|
||||||
Button(onClick = { navigator.push(navigator.lastItem) }) {
|
Button(onClick = { navigator.pop() }, modifier = Modifier.align(Alignment.TopStart), colors = ButtonDefaults.buttonColors(backgroundColor = orange, contentColor = Color.White)) {
|
||||||
Text("Back")
|
Text("Back")
|
||||||
}
|
}
|
||||||
//Details
|
//Details
|
||||||
|
|
@ -105,6 +107,11 @@ data class DetailScreen(
|
||||||
fontFamily = FontFamily.Monospace,
|
fontFamily = FontFamily.Monospace,
|
||||||
fontWeight = FontWeight.Bold
|
fontWeight = FontWeight.Bold
|
||||||
)
|
)
|
||||||
|
Text(
|
||||||
|
"Type: $type",
|
||||||
|
fontFamily = FontFamily.Monospace,
|
||||||
|
fontWeight = FontWeight.Bold
|
||||||
|
)
|
||||||
Text(
|
Text(
|
||||||
"Base XP: $xp",
|
"Base XP: $xp",
|
||||||
fontFamily = FontFamily.Monospace,
|
fontFamily = FontFamily.Monospace,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue