fix buttons
This commit is contained in:
parent
dbcdb47dfe
commit
dd922b0b38
1 changed files with 13 additions and 9 deletions
|
@ -103,7 +103,6 @@ fun HomeScreen(padding: PaddingValues, model: HomeViewModel = viewModel()) {
|
||||||
ActionRow(context, model)
|
ActionRow(context, model)
|
||||||
|
|
||||||
Button(
|
Button(
|
||||||
modifier = Modifier.fillMaxWidth(0.9f),
|
|
||||||
onClick = { Toast.makeText(context, "Start", Toast.LENGTH_SHORT).show() }) {
|
onClick = { Toast.makeText(context, "Start", Toast.LENGTH_SHORT).show() }) {
|
||||||
Text(text = context.getString(R.string.main_button_start), fontSize = 30.sp)
|
Text(text = context.getString(R.string.main_button_start), fontSize = 30.sp)
|
||||||
}
|
}
|
||||||
|
@ -121,19 +120,24 @@ private fun DeleteRow(
|
||||||
) {
|
) {
|
||||||
Row(
|
Row(
|
||||||
modifier = Modifier.fillMaxWidth(),
|
modifier = Modifier.fillMaxWidth(),
|
||||||
horizontalArrangement = Arrangement.Center,/*, horizontalArrangement = Arrangement.SpaceEvenly*/
|
horizontalArrangement = Arrangement.Center
|
||||||
) {
|
) {
|
||||||
Button(onClick = {
|
Button(
|
||||||
(model::doAction)(ActionHome.DELETION_DB)
|
onClick = {
|
||||||
}, colors = ButtonDefaults.buttonColors(containerColor = colorResource(id = R.color.red))) {
|
(model::doAction)(ActionHome.DELETION_DB)
|
||||||
|
},
|
||||||
|
colors = ButtonDefaults.buttonColors(containerColor = colorResource(id = R.color.red))
|
||||||
|
) {
|
||||||
Text(text = context.getString(R.string.main_button_deletebase))
|
Text(text = context.getString(R.string.main_button_deletebase))
|
||||||
}
|
}
|
||||||
|
|
||||||
Spacer(modifier = Modifier.padding(2.dp))
|
Spacer(modifier = Modifier.padding(2.dp))
|
||||||
|
|
||||||
Button(onClick = {
|
Button(
|
||||||
(model::doAction)(ActionHome.DELETION_SELECT)
|
enabled = false, /*TODO: Activer uniquement quand on a qqch de sélectionner */
|
||||||
}) {
|
onClick = {
|
||||||
|
(model::doAction)(ActionHome.DELETION_SELECT)
|
||||||
|
}) {
|
||||||
Text(text = context.getString(R.string.main_button_delete))
|
Text(text = context.getString(R.string.main_button_delete))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -296,7 +300,7 @@ fun ShowList(
|
||||||
) {
|
) {
|
||||||
LazyColumn(
|
LazyColumn(
|
||||||
Modifier
|
Modifier
|
||||||
.fillMaxHeight(0.7f)
|
.fillMaxHeight(0.6f)
|
||||||
) {
|
) {
|
||||||
itemsIndexed(sets) { index, item ->
|
itemsIndexed(sets) { index, item ->
|
||||||
ListItem(index, item, currentSelection, updateSelection)
|
ListItem(index, item, currentSelection, updateSelection)
|
||||||
|
|
Reference in a new issue