Easiest way to use SVG in Android?

前端 未结 8 990
一个人的身影
一个人的身影 2020-12-02 05:35

I have found a myriad of libraries in order to use svg in Android and avoid the frustrating creation of different resolutions and dropping files for each resolution, this be

8条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-02 05:51

    First you need to import svg files by following simple steps.

    1. Right click on drawable
    2. Click new
    3. Select Vector Asset

    If image is available in your computer then select local svg file. After that select the image path and an option to change the size of the image is also available at the right side of dialog if you want to . in this way svg image is imported in your project After that for using this image use the same procedure

    @drawable/yourimagename
    

提交回复
热议问题