美文网首页
Android 添加 svg 图标

Android 添加 svg 图标

作者: Rinaloving | 来源:发表于2024-02-24 23:26 被阅读0次

    操作

    将 SVG 转换为 Vector Drawable: Android Studio 提供了一个向量图形导入工具,可以将 SVG 文件转换为 Vector Drawable。在 Android Studio 中,选择 File -> New -> Vector Asset,然后选择 Local file (SVG, PSD),然后选择你的 SVG 文件。按照向导的步骤进行操作,Android Studio 将会生成对应的 Vector Drawable 文件。

    1. 选择 File -> New -> Vector Asset,
    image.png
    2. 然后选择 Local file (SVG, PSD),然后选择你的 SVG 文件。
    image.png
    3. 按照向导的步骤进行操作,Android Studio 将会生成对应的 Vector Drawable 文件。
    image.png
    image.png
    4. 我们可以在 user.xml 中调整图标大小了
    image.png

    效果图

    image.png

    相关文章

      网友评论

          本文标题:Android 添加 svg 图标

          本文链接:https://www.haomeiwen.com/subject/cfnoadtx.html