I’m making an Android app in Android Studio and was wondering if I import a SVG file will it be scaled down or up to fit every screen?
For example it looks good on my S20FE which is XXXHDPI screen, but will it look the same on say HDPI screen without making separate XML Density files
Edit: I do not have any device with smaller density and for some reason a virtual phone that can be run in Android Studio doesn’t work for me.
2
Answers
According to https://developer.android.com/studio/write/vector-asset-studio , "Using vector drawables instead of bitmaps reduces the size of your APK because the same file can be resized for different screen densities without loss of image quality."
So, same SVG will be scaled depending upon the screen size.
SVG files are best because they will reduce the size of APK and quality is best. if you do not know how to use SVG files then please ask me. I will provide you step with step process.1 SVG file works for every device without quality change so you do not have to make separate 5 file for every resource.