android - windowLightNavigationBar 在 Android 10 (Q) 上不起作用

标签 android android-10.0

我正在尝试使用带有暗点的导航栏灯所以我使用 windowLightNavigationBar = true 制作了 style-v27.xml :

    <item name="android:windowLightNavigationBar">true</item>
    <item name="android:navigationBarColor">@android:color/white</item>

此功能在 Api Level 27+ 中可用并且:
  • 它在 api 27 (android 8.1) - 模拟器
  • 上运行良好
  • 它在 api 28 (android 9) - 模拟器
  • 上运行良好
  • 它不适用于 api 29 (android 10) - 模拟器

  • 在 Android 10 上,点仍然是白色,背景也是白色!:

    enter image description here

    顺便说一句,我的目标是 Api 29。
    我已经在“模拟器”上进行了测试。我无法访问真正的 Android 10 设备来确认此错误也存在。

    最佳答案

    这是一个 AVD 错误而不是 android 平台错误。关闭 android Q AVD 并更新 android 10 SDK 系统文件。重新打开AVD。问题解决了。

    如果这没有帮助,请删除 AVD 并重新创建它。

    关于android - windowLightNavigationBar 在 Android 10 (Q) 上不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59454430/

    相关文章:

    android - 如何使用 android.graphics.Matrix 的值?

    android - 获取 ListView 中点击项目的索引

    android - onLocationChanged() 被调用太多次,即使设备没有移动

    android - 无法在 Android 10 上从 BroadcastReceiver 启动 Activity

    Android Q Kotlin - API 29 : check if image exists

    android - Eclipse:转换为 Dalvik 格式失败,出现错误 1

    java - 一个类中存在两个单击监听器的问题

    android - 黑屏模拟器 Android Q Preview (Pixel 2)

    android - 无法在 Android 10 上更新 MediaStore

    android - 我们如何在 Android Q 中访问扩展文件?