New way to support dark theme to improve integration with system
Summary
This patch implements the new preferred way of supporting a dark theme using DayNight
theme. https://developer.android.com/guide/topics/ui/look-and-feel/darktheme which is also backwards-compatible. It also adds a new theme picker in the main App settings.
I've removed the old implementation of the dark theme and all the references it had in the project.
I've tested it on Android 10 and works awesome. It needs to be tested below Android 10.
Options on Android Systems that have global system dark theme(from API 28)
- System Default
- Light
- Dark
Options on below API 28
- Set by Battery Saver
- Light
- Dark
This is in accordance with the examples provided by Google on dark themes. https://github.com/android/user-interface-samples/tree/master/DarkTheme
Test Plan
Select different options from App Settings to set different themes.
On Android 10
On Android 8.1 (Emulator)
Battery Saver turns on the dark theme