Skip to content

Commit

Permalink
Improve ListItemUI
Browse files Browse the repository at this point in the history
Signed-off-by: Saul Henriquez <[email protected]>
  • Loading branch information
saulhdev committed Dec 3, 2023
1 parent 2772877 commit 80ac55c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Omega/src/com/saggitt/omega/compose/components/ListItem.kt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.width
Expand Down Expand Up @@ -111,14 +112,15 @@ fun MultiSelectionListItem(
Row(
modifier = modifier
.fillMaxWidth()
.height(56.dp)
.clickable(onClick = { onClick(!isChecked) }, enabled = isEnabled),
verticalAlignment = Alignment.CenterVertically
) {
if (withIcon) iconIds[iconId]?.let {
Spacer(modifier = Modifier.width(16.dp))
Icon(
modifier = Modifier
.size(32.dp)
.padding(start = 16.dp),
.size(32.dp),
painter = painterResource(id = it),
contentDescription = text,
)
Expand Down

0 comments on commit 80ac55c

Please sign in to comment.