I have added one splash screen image(1440 X 2560) in background. When I run the app, I see the image as stretched for the Samsung S8(All xxx devices).
Samsung Galaxy S7 resolution: 1440 x 2560 - XXXHDPI
Samsung Galaxy S8 resolution: 1440 x 2960 - XXXHDPI
The issue is if I am adding image(1440 X 2960) in a drawable-xxxhdpi folder, then image will be compressed for Samsung S7, and if I am adding image(1440 X 2560) in a drawable-xxxhdpi folder, the things will be bad in Samsung S8 device.
Is there any way through which we can manage the different images in our resources folder for different XXXHDPI devices?
I tried my way and it worked, try to create a drawable-long-xxxhdpi folder in res and put the 1440x2960 pixel image there. Hopefully can
Related
I'm trying to set up specific values/drawable folders for all screen devices but it is quite complicated, for example I have 2 similar phones :
HTC Pixel which has resolution 1920x1080 (screen size 5") and,
HTC 5X which has same 1920x1080 resolution (screen size 5,2").
For this type of phones I have values-xxhdpi and also same folder for drawable drawable-xxhdpi. Should this phones use same folders? because on both looks it differently and this is quite strange.
Is there a way to create a drawable folder and a values folder to 420 dpi and 560 dpi devices? One for the 420 dpi and one for 560 dpi.
420dpi: Samsung Galaxy S5, S4, LG G5, ...
560dpi: Nexus 6, Samsung S6, S7, ...
Because in those type of devices my app not looks well. Images in drawable-xxhdpi are smaller in a device with 420 dpi. Because multiplies the width of the image x 2,625 (density). I need bigger images or multiply images x 3.
The solution that I've found is to create a drawable-420dpi and a drawable-560dpi folder and copy xxhdpi and xxxhdpi resources respectively.
I'm not sure that this is the best solution but It works on PIXEL XL, Nexus 5X, 6 and 6p simulators.
This is very frustrating for developers and designers too.
If you using Android Studio, you can easily create a folder width name: mipmap-420dpi and mipmap-560dpi in the folder that same with folders as mipmap-hdpi, mipmap-mdpi, mipmap-xhdpi .... You can see this picture
You can get ppi using DisplayMetrics and after getting ppi you can use IF condition and set that drawable that you need to set.
Samsung Galaxy s6 has a screen density of 577 ppi which maps to xxhdpi - xxxhdpi
Screen resolution: 1440 X 2560
Samsung Galaxy S3 has a screen density of 306 ppi which maps to xhdpi
Screen resolution: 720 X 1280
My app with a lot of scenic images was developed against xhdpi-devices (i.e. S3)
but to have margins against the future the images has a resolution of:
Image resolution: 1300 X 1950
So - what happends with images with this resolution when put in a xxxhdpi device such as Galaxy S6? I compiled the app against an S6 and cannot see any
difference. Is this because the images are in the xhdpi-folder and s6 thanks to
this does not use the full density of 577 ppi? My theory - IF it have used the
full capacity - the images whould have been stretched out since the width is 1300 px and the screenwidht of S6 is 1440.
Greatful for answers
EDIT: the images uses the whole screenwidth.
I am building a Hybrid app using Cordova.
I have placed different sized splash images in the res drawable folders and It works fine in all major devices but it gets squashed on Samsung Galaxy S4. Any fix to it?
First add 640 × 1136 image (splash screen) to res-> drawable-xhdpi folder in your phonegap android project, i think thats solve your problem,
Galaxy S4 comes under xxhdpi. So you need to put splash image in res-> drawable-xxhdpi folder.
Samsung galaxy S4 comes under large screen size. 1080 x 1920 image to res-> drawable-xhdpi
if you want that your app works fine on modern devices such as Galaxy Nexus, Nuxus 4, etc you should support xhdpi screens.
large screens are at least 640dp x 480dp (hdpi)
xlarge screens are at least 960dp x 720dp (xhdpi)
Check the phone model before load the image. And if it is Galaxy S4, load a proper image for it.
I am trying to create an application that I want to run on both Samsung Galaxy S3 and the Nexus One. But later I came to know that both the devices comes in the normal screen size. How can I make the layouts that fits both the devices?
What type of folders should be created and any entry in the menifest for that folders..?
Samsung galaxy s3 - 4.8 inches(Normal screen)
Resolution - 720 * 1280
XHDPI
And
Nexus one -
3.7 inches(Normal)
480 * 800
HDPI
A single layout(normal) should be fine for both the devices . You can create different set of images for both as one is hdpi and other is xhdpi.
Edit : Adding the example table
MDPI X Large 10.1 inches 1280w * 800h(landscape) Samsung Tablet
MDPI Large 7 inches 1024h * 600w HTC Flyer
MDPI Large 7 inches 976h * 600 w Samsung GT P6620