9
I’ve been developing for Android for a long time, I program natively, to be more specific. But lately I have had some doubts with the use of images in the application. One time or another we will make some application that uses a vast amount of images and then a problem arises: we need several images so that, on different devices, they are not blurred.
Then the alternative arises Scalable Vector Graphics
or just SVG
.
In the Android Studio you can create a Vector Asset
, that will generate a file in XML
for you to use in your application, in place of normal images.
The difference is that you create one, to use in several, as for example:
Scalable Vector Graphics
drawable/ic_vector_name.xml
Imagens Comuns
drawable-hdpi/ic_image.png
drawable-xhdpi/ic_image.png
drawable-xxhdpi/ic_image.png
That is, while in svg
I create an image to use in several sizes, with png
I have to create an image for each type of resolution.
But my question is, when should I use SVG? It is recommended to start a transition from PNG
for SVG
in the app?
Great answer! I managed to clarify some of the doubts that I had, I learned to vector with Illustrator, but anyway, thank you. Éh nóis
– itscorey