Dark Mode and Configuration Changes

When the device changes between normal and dark mode, any visible activities immediately will undergo a configuration change, for the uiMode configuration. Even manual changes to DayNight (e.g., setDefaultNightMode()) will recreate your activity, as if it underwent a configuration change.

If your activities already handle configuration changes (e.g., screen rotation), you should be fine. However:


Prev Table of Contents Next

This book is licensed under the Creative Commons Attribution-ShareAlike 4.0 International license.