I have developed a clock widget. And I only have 1 res/layout and 1 res/drawable. Everything works perfectly.
It works on mdpi like Samsung Galaxy Ace. It works on hdpi like Samsung Galaxy S2. It works on xhdpi like Samsung Galaxy Note.
However I got ugly look on 720x1280 devices such as Samsung Galaxy Nexus or Sony Xperia S. And coming soon Samsung Galaxy S3.
When I provide res/layout/xhdpi which I built specifically for 720x1280 devices and then Galaxy Note will also use this layout and it looks ugly on Galaxy Note.
How to address this issue?
It is like some crossing between 720x1280 (Galaxy Nexus, Sony Xperia S, Galaxy S3) and 800x1280 (Galaxy Note).
The resolution and DPI of the device don't necessarily match up (high resolution doesn't mean high DPI). DPI is a ratio of the resolution of the device and its physical dimensions.
Instead of separating your layout folders by DPI, separate them by dimensions. For instance, layout-large, layout-xlarge. You can also quantify by specific sizes, such as layout-w720-h1280, in which case that would match only device with a minimum width of 720 pixels and minimum height of 1280 pixels.
Use layout-sw320dp for Galaxy S3
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.
I'm testing my app on 2 devices - a Samsung Galaxy S3 and a Samsung Galaxy Note 2. Both have the same screen resolution and apparently both use the same xhdpi density even though the Note 2 has a considerably lower physical dpi.
My icons on the action bar look smaller on the S3 than on the Note 2. Why is this so, and how can I fix it so that it looks consistent?
Samsung Galaxy S3
Samsung Galaxy Note 2
It turns out that even though the resolutions I was using for the individual pixel densities were correct, the actual icon area within the image file had an incorrect size. I followed this guide at iconhandbook.co.uk/reference/chart/android/ and now things look consistent.
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
I've run into a formatting issue regarding the Galaxy S and Galaxy S2. Perhaps someone can share some insight. When testing my app on the two emulators which I downloaded from the Samsung site, the emulator pulls graphic resources from the drawable-xhdpi folder and the graphics are way too large. I confirmed this by setting different graphics in each drawable-<density> folder. The phone specs for the S2 are 480 x 800 pixels, 4.3" screen size (works out to ~217ppi screen density) so I would expect the emulator to pull from the hpdi folder. The emulator setting for the the S2 declares an abstracted LCD density of 300 while hw.lcd.width and hw.lcd.height are 480 and 800 respectively. Is the abstracted LCD Density set incorrectly by the manufacturer and should I change it in the hardware settings to 217 to get an accurate representation on the actual device? I haven't been able to test on a Galaxy S or S2 device and I'd hate to have to write a special case to deal with a particular phone type as this is bad practice.
Is anyone out there testing on a Samsung Galaxy S3 yet?
Specifically, does it have what is considered a large or normal screen for layout purposes?
I have the Galaxy Nexus and it takes normal layouts, but I read the Galaxy Note is considered a large screen.
Thanks in advance.
As owner of Samsung Galaxy S3 I confirm - it is "normal" screen, not "large" one. Also "xhdpi" when it comes to density.
Samsung S3 takes images from drawable-sw360dp and layout files from layout-sw360dp folder only...
Here's a link to the complete specifications for the European version of the Samsung Galaxy S3. The screen is 720 x 1280 pixels and 4.8 in. diagonal. The American version is the same as far as the screen goes.
all phones will use the drawable folder by default if no others are specified, but officially you should use xhdpi and hdpi for these
Create a layout specifyc for Galaxy S3. Android S3 layout vs Galaxy Nexus layout