Questions tagged [android-compose-switch]

2 questions
5
votes
1 answer

Customise selected/unselected background of Switch composable in Jetpack Compose?

I am using a Switch Composable for which I want to give a custom background for selected and unselected state. How can I do that? var switchState by remember { mutableStateOf(false) } Switch( checked = switchState, onCheckedChange = {…
1
vote
1 answer

Android Compose - How to remove the space above and below the Switch

I have Row with two components, Text and Switch, after adding the Switch, I see the space above and below. I want the heigh of Switch is fit to UI height. I use padding(0.dp) but it is not working. How to remove that? This is my code: Row( …