![](/img/trans.png)
[英]Didn't find class “adaptive-icon” on path: DexPathList after adding adaptive icons
[英]Adaptive Icon shapes path
这就是Launcher3定义图标形状路径的方式。
<string-array translatable="false" name="icon_shape_override_paths_values">
<item>M50,0L100,0 100,100 0,100 0,0z</item>
<item>M50,0 C10,0 0,10 0,50 0,90 10,100 50,100 90,100 100,90 100,50 100,10 90,0 50,0 Z</item>
<item>M50 0A50 50,0,1,1,50 100A50 50,0,1,1,50 0</item>
<item>M50,0A50,50,0,0 1 100,50 L100,85 A15,15,0,0 1 85,100 L50,100 A50,50,0,0 1 50,0z</item>
</string-array>
这些分别对应于正方形,鼠形,圆形和泪珠。
现在我想知道如何创建自己的形状。 我想画一个六角形。
尝试类似:
<item>M 50,0 L 100,25, 100,75, 50,100, 0,75, 0,25 Z</item>
例:
svg { background: linen; }
<svg width="100" height="100"> <path d="M 50,0 L 100,25, 100,75, 50,100, 0,75, 0,25 Z"/> </svg>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.