• 准备图片

图片格式为SVG,如果是其它的格式,需要使用Vector magic工具进行转换

  • android studio生成SVG图片到xml文件

1.点击File->New->Vector Asset

android之Vector使用

2.选择Local file(SVG,PSD),加载准备好的SVG图片,点击Next

android之Vector使用 3.点击完成

android之Vector使用

4.生成xml文件

android之Vector使用

5.引用图片资源

android之Vector使用

  • 运行效果图

android之Vector使用

 

 

 

 

 

相关文章:

  • 2021-12-20
  • 2021-09-29
  • 2022-12-23
  • 2021-08-11
  • 2022-01-16
  • 2021-05-17
  • 2022-12-23
  • 2022-01-02
猜你喜欢
  • 2022-12-23
  • 2021-11-04
  • 2021-12-18
  • 2022-03-06
  • 2022-12-23
  • 2021-09-14
  • 2021-06-01
相关资源
相似解决方案