In my app, I am getting different resolutions of images from URL and I put them in a Bitmap to finally send it to the screen.
The problem is that I don't find a way to choose between the different resolution automatically depending on the screen resolution of the device. Since I get the images while the app is running, I can't put them in the drawable folders before...
Any help will be greatly appreciated!
Related
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 asked a question yesterday.
Why do resolutions become smaller after a image file be read by program?
Very thanks the people helped me.
They let me know that if I use the devices having different densities, the resolutions of the same image may be changed.
For example:
I have a image with resolution 1440x2560 and a device with density 3.5.
The revolution will become 1260x2240 after the image be read into the program.
But I don't want the resolutions of the images to be changed, because the proportion of the images on the screen will be different.
I tried to find a solution, but I failed.
Is there a convenient way to fix the same resolution of the same image on the different devices with different densities?
If you want your images to be adjusted by Android, I understand they are drawables even if you didn't explicitly mention it, add them to the drawable-nodpi directory.
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.
As we know it there are several screen layout out there on various android devices. Now, my question is, what's the best solution for displaying image on screen (full sized image) on that various device?
Should I (this is several strategy I have in mind right now):
resize every images for that target device? (with the cost of resizing it and lost of quality on larger device)
create several images for all or several common screen size? (with larger download size)
create core application and let them download images appropriate to that screen size (that means, I have to prepare hosting of those images)
something I don't know yet...
So, if you guys have experience in this kind of situation, your recommendation is greatly appreciated.
Update: My application will have several (20-30) images.
This is documented ( http://developer.android.com/guide/practices/screens_support.html ) and answered quite a few times already I believe.
Create different images for the different screen resolution (store in drawable, drawable-hdpi... accordingly).
You can also define different layouts for different screen sizes (although to display full screen images, it does not sound like you need that).
I have a wallpaper app and it seems to work fine but... when i open the app in eclipse... the app icon appears as the first image in the wallpaper. I cannot figure out what is happening. can someone help.
also the scrolling seemed to have slowed down after i added more images (40)..any suggestions. what is the recommended file size the files papers should be. I know the dimensions but what about the resolution.
The resolution isn't relevant if you already know the dimensions (if I'm understanding you correctly). For the Droid, you need 960 x 854 pixel images. When I hear resolution, I think dpi/ppi.
As far as the app icon appearing in the list...you should post some code as to how you're listing the images. Are you just populating them from the #drawables folder? That's where your app icon is stored, too.