Converting SVG into Raster PNGs by Android Studio - android

I am working with Android Studio 2.2.2. I am developing a project and it will be used in Tab 7 inch.
I am importing SVG through vector asset wizard. My tablet, where I am compiling the APK is 7-inch. After installation, the application showing the SVGs in very bad quality.
I made several types of research and concluded that my Tablet is having API-19 and android studio is converting all SVGs into the Raster PNGs (For all devices below V-21) at compile time and place them on the following path
D:....\app\build\generated\res\pngs\debug
When I looked at this folder I found
I know for 7-inch Tablet drawable-large-mdpi or drawable-large-hdpi is required, because android studio is not creating the drawable folder for larger screens and placing the Raster PNGs into smal screens drawable folder, That's may be the reason of bad quality of SVGs because 7-inch tablet is using the PNG from drawable-mdpi which is made for small screens.
Can anyone advice how to force Android-Studio to create drawable-large-mdpi folder under app\build\generated\res\pngs\debug and place the converted Raster PNG into it.

Related

Image with different dimensions?

android studio 3.6
In android app I use one image with different dimensions. I put image in the next folders:
drawable-hdpi, drawable-mdpi, drawable-xhdpi, drawable-xxhdpi, drawable-xxxhdpi
Nice. It's work fine.
Now what about flutter app. Is I also need to create different folders for every image's dimension?
P.S. I need this image for android and iOS version
As mentioned in the Declaring resolution-aware image assets. You can create folders based on the resolution and add images to it.
The main asset is assumed to correspond to a resolution of 1.0. For
example, consider the following asset layout for an image named
my_icon.png:
.../my_icon.png
.../2.0x/my_icon.png
.../3.0x/my_icon.png
On devices with a device pixel ratio of 1.8, the asset
.../2.0x/my_icon.png would be chosen. For a device pixel ratio of 2.7,
the asset .../3.0x/my_icon.png would be chosen.
Reference Assets and Images
For an Android App created using Flutter, You can still use these folders as shown below for varying screen densities

Android ic_launcher icon is small in app list

I have a bit of a weird bug/issue with one of the apps I'm working on. On some devices running Android 6, the app icon is smaller in comparison to the rest of the icons from other apps.(See attachment) Any idea why?
I've checked and the ic_launcher have the right resolution - according to this: Android - Launcher Icon Size
Probably also worth mentioning that the icons were generated using the icon generator within Android Studio.
Thanks!
Drawables and mipmaps are nearly identical even mipmaps are mostly used for launcher icons and drawables for other things. The suffixes (e.g., -mdpi, -hdpi) are filters,
indicating under what circumstances the images stored in those directories should
be used. Specifically, -ldpi indicates images that should be used on devices with
low-density screens (around 120 dots-per-inch, or “dpi”). The -mdpi suffix indicates resources for medium-density screens (around 160dpi), -hdpi indicates resources for high-density screens (around 240dpi) and so on.
Android Studio offers an Image Asset Wizard. This wizard is designed to take a
starter image and give you icons, in a variety of densities.Android will calculate density of the screen on which app is installed and by that it will take the correct icon. If there is non than Android will take the nearest one. You can find more about mipmaps and drawables on official developer site or any relevant book about android programming like The Busy Coder's Guide to Android Development.
There is Android Asset Studio which you can use in Chrome browser to generate your icons: https://romannurik.github.io/AndroidAssetStudio/
it seems that the problem was the selected shape when generating the icon with the Images Asset tool in Android Studio. Square is selected by default. Selecting none fixed the issue.

Android Studio Drawables

I want to make all drawables files from one image.png
I tried Image asset from android studio but it creates too small images..
Anyone got an idea how can i generate from one png file all drawables files?
Not sure if this is what you're looking for. But with this tool you can generate images of multiple sizes:
Android Assets Studio
You can upload images, and get icons back, in the sizes of xxxhdpi, xxhdpi, xhdpi, hdpi, mdpi

Creating images with Android Asset Studio using iPhone images

I have the iPhone / iPad images from an already created application.
Now I would like to create the images for Android using the tool
Android Asset Studio.
Which is the best approach ?
Creating the Android images using the images from iPhone 6 Plus (#3x)?
Using the images from the iPhone 6 and iPhone 5 (#2x)?
Or from iPad 2 and iPad mini (#1x)?
For better results, all of them.
1x images should go into the drawable folder.
2x ones into the drawable-xhdpi folder, and
3x ones into the drawable-xxhdpi folder.
In alternative, to save some apk size, you could use only the 3x ones and put them into the drawable-xxhdpi folder.
Android will do its best to scale them down.

different drawable resolutions

I want to deploy my application on different screen sizes using the 1.6 feature.
I exported the drawable resources with different resolutions in drawable-ldpi, drawable-mdpi and drawable-hdpi folders.
On android 1.6 and 2.0 everything looks good.
My problem is that on 1.5 the drawable-ldpi resources are used instead of drawable or drawable-mdpi ... the application still works but it renders the images scaled and the image quality is lost.
How can I configure the application so that on 1.5 the only the drawable-mdi folder will be used?
I'd like to keep the apilevel to 3 so that the same apk will run on 1.5, 1.6 and 2.0.
Try adding -v4 to your -ldpi, -mdpi, and -hdpi directory names, and having a base res/drawable/ for use by Android 1.5.

Categories

Resources