Reputation: 117
I'm a self taught developer and I'm working on my second Android app. My app has a lot images which I think my be inflating the size of my app. The images are mostly .png or .webp files.
I've been doing some research and one piece of advice was to convert images to vectors (so that I would have to create multiple images for various screen densities). I believe those files would be .svg files.
But when I look into my drawables folder, I'm already using numerous XML files, which look look vector files to me.
I don't have access to Illustrator, so I will have to hire someone to assist. However, I'm not sure if I should ask them to convert my png files to vector (svg) files or specifically to xml files. Can anyone assist?
Also, all the images I am requesting are relatively basic 1 color images, like a settings icon, facebook logo, navigation arrows, ovals, etc.
Upvotes: 0
Views: 682
Reputation: 61
One way you avoid using an illustrator at least for any basic icons is by generating your own SVGs using Android Studio's built in Asset Studio. It has tons of useful images that you could probably utilize. (prime example would be a settings icon).
You can access it by right clicking the drawable folder then navigating to New -> Vector Asset.
This will open the Asset Studio window. If you click on whatever image by default is in the "Clip art:" section it'll open another window
Here you can search for and filter by whatever icons you may need.
If you need to customize them further you can set their size, color, and opacity after selecting an icon from the Asset Studio menu, or just manually mess with the xml file after you've generated it. Another quick tip is that while searching for icons you can filter by "filled", "outlined", "round", "sharp", and "two tone", which provides even further customizability for whatever your use case is.
Upvotes: 0
Reputation: 807
• When SVG is converted to Vector drawable using android studio file size is 1kb.
• I usually use Vector drawable for bottom nav icons.
• Not all SVG files can be converted to vector drawable. That is a big problem. Even if you hire something this is still a problem.
• One solution is to use the following website to compress your jpeg.
• You can also use WebP to reduce the size of images.
• You can use this website to get SVG icons. After downloading it edit these svg and remove watermark from this website.
In the past, I have used adobe xd to get SVG icons. but some didn't convert successfully. I hope this will help you.
Upvotes: 1