android - 矢量图像在 Android 中显示错误

标签 android vector-graphics

当我使用 Android Vector Asset Studio 导入矢量图像时,它会变形,即使在预览中也是如此。我尝试使用的矢量之一是直接来自 Material 网站的照片轮廓。

它应该是这样的:enter image description here

这是它在 Android 中的样子:enter image description here

这是另一个示例,它应该是什么样子以及它在 Android 中的外观:enter image description here enter image description here

如果您想要任何其他信息,请告诉我。任何帮助将不胜感激。

最佳答案

使用 <androidx.appcompat.widget.AppCompatImageView而不是 ImageView并使用 app:srcCompat安装于 android:src=

关于android - 矢量图像在 Android 中显示错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55272641/

相关文章:

cocoa - 使用 NSBezierPath 绘制不同的线宽?

c# - 如何使用 WPF 创建交互式图形?

c# - c# 中可缩放、可打印、可滚动的火车运动图

python - PIL 和基于矢量的图形

android - 单击通知按钮 - 方法调用

android - 没有 TabActivity、ActivityGroup 或 LocalActivityManager 的 TabHost

android - SeekBar 和 ListView 回收问题

java - 接收到 volley 响应后执行该方法

android - 如何获得 2.2 版本的 android google api?

Android Vector Drawable 与 SVG 路径不同