Thank you for this. There is a problem. If you select dark mode, force-close the app and reopen the app, it automatically changes to light mode. The option selected was still in dark mode though.
You will have to also use shared preferences inside your startup/launcher activity to set the dark mode to your desired setting once the activity is created. I have made these changes in the github repo. Take a look. Hope it's helpful.
Thank you for this. There is a problem. If you select dark mode, force-close the app and reopen the app, it automatically changes to light mode. The option selected was still in dark mode though.
You will have to also use shared preferences inside your startup/launcher activity to set the dark mode to your desired setting once the activity is created. I have made these changes in the github repo. Take a look. Hope it's helpful.
Awesome. One more thing, will the code change if i want to use SwitchPreference?
Not much really. Even the methods used should remain the same. Switch preference will have to be implemented and that's pretty much it.
Okay, that really helps.