我试过了
不过,我很难让Android设备在下拉通知中有黑暗主题。
我想在下拉通知中有深色的原因,因为我正在调试这个问题 - How to get the notification drop-down background color, and decide best text color when night Mode is enabled?
任何的想法?我正在使用Android Pie 9模拟器。
您可以通过Android Q(Beta)模拟器上的ADB执行此操作。相同的命令也适用于Android P,但我认为它没有黑暗的主题通知。
启用夜间模式:
adb shell settings put secure ui_night_mode 2
重新启动以应用更改:
adb reboot
禁用夜间模式:
adb shell settings put secure ui_night_mode 1