A library to give you Switch with image background + UI Sample by Jetpack Compose
If you like or are using this project to learn or start your solution, please give it a star. Thanks!
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
dependencies {
implementation 'com.github.razaghimahdi:ImageSwitch:1.0.0'
}
val checkedState = remember { mutableStateOf(true) }
ImageSwitch(
checkedImage = painterResource(R.drawable.good_morning),
unCheckedImage = painterResource(R.drawable.good_night),
size = 150.dp,
checked = checkedState.value,
onCheckedChange = { checkedState.value = it }
)
doc_2023-03-19_00-54-30.mp4
Developed by Mahdi Razzaghi Ghaleh