Whenever I open the app and click the switch, dark mode turns on and it stays in the position. However, if I relaunch the app, the switch goes back to default, and dark mode is still on. How would I do this in Kotlin?
Also, is there any reference code for this in Kotlin?
https://stackoverflow.com/questions/66838056/saving-switch-state-in-kotlin March 28, 2021 at 11:07AM
没有评论:
发表评论