-
Notifications
You must be signed in to change notification settings - Fork 0
Switch modes programatically
Devrath edited this page May 28, 2021
·
2 revisions
There are three modes which we can programmatically select
-
Dark Mode
> Display into dark mode -
Light Mode
- > Display into light mode -
System
-> Default settings from the system
AppCompatDelegate.setDefaultNightMode(nightMode)
// nightMode = Integer value passed based on selection
- For this, we use shared preferences to save the selection, it will be integer value we are saving
Use get the value in shared preferences
and load it when the application opens