i'm creating some app intros for my Android app with photoshop and illustrator. The images that i'm creating are very very large in terms of resolution. How to make them fit in all android devices without distorting their propotions?
Ps: I didn't try yet to load these images into a device, is it a good idea to resize them according to the android default Dpi resolutions (ldpi,hdpi,xhdpi etc...)?
You can use Picasso. It can handle resizing and image loading for you.
Related
I am about to publish an android application which uses several images with different resolutions. I have found the hard way (with a crash) that putting all images in drawable folder causes a OutOfMemory Exception because images are scaled up. By putting all images in a high dpi folder like drawable-xxhdpi the problem goes away.
My question is : should I arrange images according to their resolution to the respective folders ? Will that make any difference ? Will android scale-down an image found in drawable-xxhdpi even if it is a low resolution one ?
You may want to use Glide for rendering drawable in your app. Glide provides you mean to auto scale the images according to your image holder size. This also caches the images for faster access (if you were to use network images). Read the doc and see if it helps you.
In my flutter app i have set a *.PNG image as splash screen or starup screen to be shown when this app starts but it is not being shown in high quality and i have tried to set another high quality image then image spreads outside of the screen (kind of over zoomed) but i have seen many app's flash screen is in good quality, i have seen Splash Screen logo displayed is of poor quality i am seeking if there is another easy way to do so please let me know thanks
Things i am using (Flutter, on vscode, for android, on windows 10)
Using a static png file will almost always give you such problems. You need to consider different screen sizes and dpi for different devices. If you still want to use your own png convert it into svg with this site https://picsvg.com/ and convert it into material usable icon with this site https://android-material-icon-generator.bitdroid.de/. It is easy and will save you much effort.
I'm trying to get an image to fit nicely on each screen size, the image i'm using an image which is 1351 × 2048 and i have used android asset to achieve this. It has worked fine except from the image quality is a lot more poor on all resolution. Images are too large to add to here to show difference.
I've now fixed it, the way around this is to find the correct sizes for each resolution and change this in photoshop to avoid losing quality, then add the correct size to each folder hdpi - xxxhdpi, for some reason the image will lose quality when compressing folders which is what android asset does.
With devices having different resolutions and pixel densities, what's the best approach for downloading images and displaying them efficiently across those devices? Should I send a web service the size wanted for the image and have that service return the appropriately sized image?
I am not sure I'm taking the right path and I haven't found a guide about this, so, please advise. Thanks.
I am developing a live wallpaper and I would like to know how to manage high quality images. I am quite new to android development by the way.
I got 2 questions:
1)The image I use for wallpaper creation is a vector image (2560w x 1600h, 32bit, 10mb exactly), very crispy and with really high resolution. I tried it as a wallpaper and it looks just fantastic (on my tablet). I placed it in the drawable folder. This results in a high dimension .apk file (9 Mb). Is it ok to have files this big enlarge apk dimension or it is a good practice to reduce it as much as possible?
2)When building my wallpaper from the Engine class i'd like to know, after setting the above image as a wallpaper, what is the best practice to scale it fitting XY independant of screen sizes.
PS: What i found to be perfect was the default system android use when you attempt to set an image as wallpaper. What does the system do in that case?
Thanks :)
1.)Since no android device supports resoultion bigger than 1280x760 of what I know, it is not a good practice in having images with bigger size than this as they use a lot of space for nothing.
2.)The DisplayMetrics class has everything you need related to this problem.