Use of Android SVG
Others
2021-01-25 10:17:18
views: null
- SVG : No need for resolution adaptation, infinite expansion without distortion, and much less space than PNG.
- PNG : Suitable for icons, simple types, much better than JPG images.
- JPG : Use images with complex colors, such as background images.
How to use SVG in AS (Ali’s iconfont)
- Open iconfont, select the icon color you need, and click SVG to download.
- Right-click your own Module in AS, New>Vector Asset, change Asset Type to Local File, Path is the SVG path you downloaded, and select Size.
- The system will generate the corresponding xml file under the drawable.
- Reference in the control, not directly in the class file.
Origin blog.csdn.net/xu331700/article/details/113064604