resize viewportHeight and viewportWidth of XML Vector image

1.6k Views Asked by At

At first, I'm sorry for my bad English .

In my android project, I used icons in the vector XML file. there, some icons viewportHeight and viewportWidth size so large, and these icons get problems in small display size devices ( height <= 720px ). The Icons that are large size viewportHeight and viewportWidth, I created that in SVG using AI.

My question is, is there any way to reduce the XML vector viewportHeight and viewportWidth size?

2

There are 2 best solutions below

1
On

I was trying to change mine and I realized that when you increase viewpoint measurements the SVG becomes smaller and vice-versa

0
On

I got the solution of my problem.

  1. I open my vector SVG file from Adobe Illustrator.
  2. Select the whole equipment of my SVG file using dragging and select (or ctrl+A).
  3. Go to the properties of this image.

And here I find the weight(W) and height (H) of my vector image. This value is equal to the viewport value of the android studio .xml file. I reduced this value and fixed the problem.

Properties of Vector image in AI