What are best practices for using SVG icons on Android?

前端 未结 12 1389
臣服心动
臣服心动 2020-12-12 11:46

I am about to create my first Android native (so not browser based) app and looking for some good practices regarding icon creating/provisioning. Since it s

12条回答
  •  孤街浪徒
    2020-12-12 11:53

    svg is awesome. who want use svg:

    right click on drawable "new/Vector Asset" choose "material icon" for default icons and "locale SVG file" for your file in your computer hard drive and in "resource name" type name for svg file then click on "next" button and "finish"

    and you can use that in drawable. fillcolor must be hard code.

    simple example

    navigation_toggle.xml

    
        
    
    

提交回复
热议问题