Join Slack
How do I set `Switch` colors in my theme?
# compose
l
Lukasz Kalnik
08/09/2022, 9:57 AM
How do I set
Switch
colors in my theme?
s
Stylianos Gakis
08/09/2022, 10:13 AM
Just jump inside the source code of
Switch
and see where it finds the colors from
https://cs.android.com/androidx/platform/tools/dokka-devsite-plugin/+/master:testDat[…]l=96?q=colors:%20SwitchColors%20%3D%20SwitchDefaults.colors()
and
https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:compose/material/material/src/commonMain/kotlin/androidx/compose/material/Switch.kt;l=260-308?q=checkedThumbColor:%20Color%20%3D%20MaterialTheme.colors.secondaryVariant
,
l
Lukasz Kalnik
08/09/2022, 11:12 AM
Thanks, probably just setting proper Material theme colors in my app theme will be enough. 🙏
5
Views
Open in Slack
Previous
Next
kotlinlang
A modern programming language that makes developers happier.
Powered by