Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How decide the size of svg file for using as VectorDrawable for android?

Tags:

android

svg

I was using pngs instead of svg, now I want to move . When we are using from android asset the material icons ,the default size 24dp, I know we can modify it. Now I want to know that if the png size for an icon is 52x62 hdpi 26x31 ldpi ...... saving resource in svg format the size how much should be? and in layout xml we are going to use the xml as wrap_content yes?

like image 334
I.S Avatar asked Sep 18 '25 17:09

I.S


1 Answers

For VectorDrawables, it doesn't really matter. They might have default width and height values of 24dp, but those values will be overridden by whatever size they eventually get drawn at.

like image 52
Paul LeBeau Avatar answered Sep 20 '25 07:09

Paul LeBeau