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.
Related
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
I know this question have been asked several times, but, I am facing a unique problem, solution of which I have not been able to find.
I have images in drawable, drawable-ldpi, drawable-mdpi, drawable-hdpi, drawable-xhdpi and drawable-xxhdpi in ratio of .75:1:1.5:2:3 respectively.
For most of the emulators, images are appearing perfectly well, but, for some of them, images are not appearing in proper proportion.
Like images appears well in 3.2" HVGA slider(ADPI) emulator- 320x480 mdpi, but, images do not appear well in 5.1" WVGA emulator- 480x800 mdpi. This is despite the fact that both are mdpi.
Why is it that despite both of them being mdpi, images appears well in one and do not appear in proper proportion in the other? How can I overcome this.
Edit:
Image where it shows mdpi:
3.2" HVGA slider(ADPI) emulator- 320x480 mdpi and 5.1" WVGA emulator- 480x800 mdpi.
EDIT2:
I think I had a similar issue where the dp wasn't being scaled well for monitor resolution. In the device settings under 'startup size and orientation', switch the scale to something like 4dp on device = 1px on screen.
In Android Virtual Device Manager:
I'm a bit confused and i hope you can help me. I'm developing an application for smartphones and i'm using prefixes like: mdpi, hdpi and xhpi. With first two i don't have any problems.
According to this:
http://developer.android.com/guide/practices/screens_support.html
and this
http://developer.android.com/about/dashboards/index.html
xhdpi is 640x960 px screen size and I have prepared my graphics for this resolution. But I can't find any device with this resolution. Instead of this, in android layout editor I have, for example, Galaxy Nexus which is marked as xhdpi device, but it has 720p screen size.
So my question is, I should look at this tables from documentation and believe that 25% devices has screen of size 640x960 px or I should change my graphics to the 720p screen size ?
If you develop only for phones and tablets for you is unnecessary you may not use xhdpi folder for your resources. 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)
So I have two sets of layout, one for a 7inch tablet, one for a 10 inch tablet.
Configuration.SCREENLAYOUT_SIZE_MASK
shows large for the 7, xlarge for the 10 device. I created two folders, layout-large and layout-xlarge, but the 7inch device uses the x-large layouts (I even deleted the normal layout folder).
What could be my problem here?
EDIT: I also tried the new qualifiers according to http://developer.android.com/guide/practices/screens_support.html#DeclaringTabletLayouts, making the layout folder for the 10"
layoutw1280dp
which the 7" cannot possiblys have, still the same.
Don't underestimate how many pixels these small screens can have. The Samsung Galaxy S3 has 720x1280 screen. That screen couldn't be larger than 7"
From the documentation:
xlarge screens are at least 960dp x 720dp
large screens are at least 640dp x 480dp
normal screens are at least 470dp x 320dp
small screens are at least 426dp x 320dp
Which tablet is it?
Sorry bothering you guys, obviously it was not an Android problem, but an Eclipse one, somehow the layout files within the folders got mixed up when I imported the project.
As you know Samsung Galaxy Tab's (7.4") screen resolution is 1200x600 and dpi is 160 normally, but Samsung reports its density 240 dpi.
So, i created hdpi graphics for galaxy tab and put them in drawable-hdpi folder.
But i noticed that after install custom ICS rom to Galaxy Tab, galaxy tab starts to report its density 160 dpi. So it show mdpi graphics.
I wonder could i do something in my application to handle this special situation; because i know i replace drawable-mpdi graphics with drawable-hdpi graphics, lots of device will have problems with app, this time.
If it is only for the situation explained above, you can use the "Platform Version" qualifier. (Refer to Providing Resources)
drawable-v14 for ICS and accordingly for other versions. You can also use drawable-hdpi-v14 for fine grained control.
I take it you are talking about the GT-P1000, and it is the only exception to have HDPI density instead of MDPI for that size. I use drawable-large-HDPI for it next to a drawable-large-MDPI folder for all other similar sized tabs and thus have different resources for both.