In app dark mode setting is ignored & missing manual dark mode override
See original GitHub issueSituation / problem:
I’m currently using Compose in conjunction with views and I’m utilizing my already defined Material Design theme via the MDC-Android Compose Theme Adapter. This works actually great, except for a dark mode applied in app via AppCompatDelegate.setDefaultNightMode(darkMode)
and not system wide. The app always stays in the system wide defined theme. That makes actually sense as the ComponentActivity isn’t aware of the AppCompat part.
Fix idea:
It would be great if this could “just work” somehow, but I’m unaware if this is somehow possible. As an easy fix and addition to this library it would be great to just have a switch for the MdcTheme()
constructor or the createMdcTheme()
method, to manually set the mode to dark or light.
Used library version: 1.0.1
Issue Analytics
- State:
- Created 2 years ago
- Reactions:8
- Comments:5
Top GitHub Comments
Thank you. I don’t think you even need to override the darkmode colors manually? I got it working like this, I believe:
setDefaultNightMode is taken into account, it takes the correct colors from my -night theme.
@Frank1234 I just double checked this in the project where I initially had the problem. I can confirm everything is working now. Closing this as it’s working as intended now (tested with version 1.1.5).