简体   繁体   English

在 Android Firefox 上添加到主屏幕不会屏蔽图标

[英]Adding to home screen on Android Firefox does not mask icon

The Google documentation on web app manifests specifies that in order to make web app icons mask properly, an icon should be marked as "purpose": "any maskable" .网络应用程序清单上的Google 文档规定,为了使网络应用程序图标正确屏蔽,图标应标记为"purpose": "any maskable" This works well on Chrome on Android but the mask fails to mask as expected when using "Add to home screen" in Firefox Android (Android 10, Firefox Mobile 68.5.0).这在 Android 上的 Chrome 上运行良好,但在 Firefox Android(Android 10,Firefox Mobile 68.5.0)中使用“添加到主屏幕”时,掩码无法按预期进行掩码。

在此处输入图片说明

In my manifest, I'm providing icons of sizes 192x192 and 512x512;在我的清单中,我提供了 192x192 和 512x512 大小的图标; Firefox does indeed take one of the icons from the manifest; Firefox 确实从清单中获取了其中一个图标; it's just not performing the desired masking:它只是没有执行所需的屏蔽:

{
  "background_color": "#00bf00",
  "description": "...",
  "display": "standalone",
  "icons": [
     {
      "src": "plug-192.png",
      "sizes": "192x192",
      "type": "image/png",
      "purpose": "any maskable"
    },
    {
      "src": "plug-512.png",
      "sizes": "512x512",
      "type": "image/png",
      "purpose": "any maskable"
    }
  ],
  "name": "...",
  "short_name": "...",
  "start_url": "/"
}

If I "install" the app, rather than just "add it to home screen" through the hamburger menu (and this time with a different icon that furthermore uses transparency), the situation is slightly better, but the Firefox version still looks rather poor (being pixelated and using a different convention for transparency than Chrome), cf.如果我“安装”该应用程序,而不仅仅是通过汉堡菜单“将其添加到主屏幕”(这次使用不同的图标,而且使用透明度),情况会稍微好一些,但 Firefox 版本看起来仍然很差(像素化并使用与 Chrome 不同的透明度约定),参见。 the screenshot below (Chrome "installed web app" on the left, Firefox on the right):下面的屏幕截图(左侧为 Chrome“已安装的网络应用程序”,右侧为 Firefox):

在此处输入图片说明

So my question simply becomes:所以我的问题就变成了:

Is there any way to coerce Android Firefox into producing a result something that looks like what Chrome (and indeed, typical Android apps) produces?有什么方法可以强制 Android Firefox 生成类似于 Chrome(实际上是典型的 Android 应用程序)生成的结果?

The current Firefox release version doesn't support maskable icons.当前的 Firefox 发行版不支持可屏蔽图标。 It works in Firefox Beta and will work once that version makes its way to the stable channel.它适用于 Firefox Beta,一旦该版本进入稳定频道,它就会工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM