I want to add a night mode on my android app. For this case I added a folder layout-night
in the res
folder. Now I want that if my user choose the night mode theme from the settings, the app will use the layout from the layout-night folder.
Can anyone give me any suggestion how to implement it from the coding part.
NightOwl has build its own implementation for separate night and day attributes. https://github.com/ashqal/NightOwl
Use UI MODE Manager in android application to set night mode in application. for more details follow this link. http://developer.android.com/reference/android/app/UiModeManager.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With