代码之家  ›  专栏  ›  技术社区  ›  Cheok Yan Cheng

如何使您的通知下拉为黑色主题?

  •  0
  • Cheok Yan Cheng  · 技术社区  · 5 年前

    我试过了

    1. 设置->显示
    2. 开发人员选项->设置夜间模式

    enter image description here

    enter image description here


    尽管如此,我还是很难让Android设备在下拉式通知中有黑色的主题。

    enter image description here


    我想在下拉式通知中使用深色的原因,因为我正在调试这个问题- How to get the notification drop-down background color, and decide best text color when night Mode is enabled?

    知道吗?我正在使用Android Pie 9模拟器。

    0 回复  |  直到 5 年前
        1
  •  0
  •   Pranav Pandey    5 年前

    你可以通过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