代码之家  ›  专栏  ›  技术社区  ›  Rich

以编程方式更改应用程序磁贴背景颜色

  •  3
  • Rich  · 技术社区  · 7 年前

    我正在开发一个应用程序。我希望我部署/安装的应用程序的磁贴与用户的背景颜色同步。有一些答案( here ,则, here )对这个问题说我不能做到这一点。但其他应用程序如何实现这一点呢?喜欢这些应用程序。

    enter image description here

    我试图在VS上留下一个空白的背景色字段,但是当我这样做时,我得到了一个错误。

    enter image description here

    欢迎提出任何想法和意见。非常感谢。

    2 回复  |  直到 7 年前
        1
  •  4
  •   Andrew Leader Lukkha Coder    7 年前

    将平铺背景颜色设置为 transparent 。然后它将自动使用用户在Windows中选择的强调文字颜色。

    enter image description here

        2
  •  1
  •   Rich    4 年前

    安德鲁·巴雷斯的回答解决了这个问题。这个答案是 Ionic Framework Cordova 项目只需将此行添加到 配置。xml 在窗台下。

    <preference name="BackgroundColor" value="transparent" />