Skip to content

Commit

Permalink
fixed alignment of toggles and text
Browse files Browse the repository at this point in the history
  • Loading branch information
robinsrk committed Dec 8, 2024
1 parent d21ef65 commit 413be19
Showing 1 changed file with 12 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,27 +101,25 @@ fun SettingsSwitchItem(
checked: Boolean,
onCheckedChange: (Boolean) -> Unit
) {
Row(
modifier = Modifier
.fillMaxWidth()
.padding(vertical = 8.dp),
horizontalArrangement = Arrangement.SpaceBetween,
verticalAlignment = Alignment.CenterVertically
) {
Column {
ListItem(
headlineContent = {
Text(
text = title,
style = MaterialTheme.typography.titleMedium
)
)
},
supportingContent = {
Text(
text = description,
style = MaterialTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurfaceVariant
)
},
trailingContent = {
Switch(
checked = checked,
onCheckedChange = onCheckedChange
)
}
Switch(
checked = checked,
onCheckedChange = onCheckedChange
)
}
)
}

0 comments on commit 413be19

Please sign in to comment.