Samsung Galaxy Tab 7inch - Layout Issues - android

I have been laying out some Android xml screens on a Galaxy Samsung Tab 7" GT-P3110 which has a screen resolution of 1024 x 600. It is running Android ver 4.0.3
My customer however is running a Galaxy Samsung Tab 7" SPH-P100 with Android 2.2 with the same screen size and resolution.
When the customer is viewing the screens I have created they are being cut-off width ways.
Both devices appear to have the same size and resolution and I'm trying to work out why there are differences in layout ?
Galaxy Samsung Tab GT-P3110
http://www.samsung.com/uk/consumer/mobile-devices/tablets/tablets/GT-P3110TSABTU-spec
Galaxy Samsung Tab SPH-P100
http://www.samsung.com/us/mobile/galaxy-tab/SPH-P100ZKASPR

I've done some digging into this...
Here on SO, there are a few comments like "device manufacturers can select the density of their device to achieve a desired UI -- for example the Samsung Tab uses a density that is a fair amount larger than the actual DPI, resulting in an overall larger UI." from
basics of device-independent-pixels, and this is further reported on other sites...
One user has dug more deeply into this - and discovered that the original Galaxy Tab 7 reported that the Galaxy Tab did not obey the developer documents:
160dp is always one inch regardless of the screen density
but instead reports its display as hdpi instead of mdpi. The explanation on the Google blog for this is:
In this context, the Samsung has another little surprise: If you do the arithmetic, its screen has 170 DPI, which is far from the densest among Android devices. Still, it declares itself as “hdpi” (and as having a “large” screen size). The reason is simple: It looks better that way.
For more info on this, see:
Understanding Samsung Galaxy Tab screen density
and http://realmike.org/blog/2010/12/21/multiple-screen-sizes-with-processing-for-android/
and http://android-developers.blogspot.co.uk/2010/09/screen-geometry-fun.html
With this in mind... the only remaining piece of the puzzle is what's happened in the Galaxy Tab 2... well, my guess is that Samsung have decided in ICS to change the Galaxy Tab 2 back so that it "correctly" reports itself as a medium density rather than high density device...
... and that's why your Galaxy Tab 2 displays content so differently to your customer's Galaxy Tab 1

Related

Layout-sw400dp not called. Multiple screen support

I have multiple layouts to support different screen sizes:
layout-sw320dp (smallest phones, 4.0" and smaller)
layout-sw360dp (approximately 4.7-5")
layout-sw400dp (most phones right now, 5-6")
Note: This values are from Design tab in Layout Editor from Android Studio.
(Example for layout-sw320dp)
First layout (layout-sw320dp) for small screen sizes was designed in Android Emulator on Nexus S
Second layout (layout-sw360dp) was designed on a real device Samsung Galaxy A3 2017 - 4.7''
Both of them works! Every layout is called according to phone screen size: layout-sw320dp on Nexus S which is 4.0' and layout-sw360dp on my phone which is 4.7".
My problem arises with layout-sw400dp which should be called on devices with 5" and bigger. For this layout I have another real phone Samsung Galaxy S7 edge - 5.5" but on this phone, the app is calling layout-sw360dp instead of layout-sw400dp. This occurs only on my real phone. In Android Emulator on Pixel XL (which has the exact same specs of screen as S7 edge - 5.5" and the same resolution) the app call the right layout.
Update: Example for layout-sw400dp
My questions are: Why is this happening? How can I solve this that phones with 5" and bigger call other layout than layout-sw360dp?
Samsung S7 Edge is a 5.5 inch phone and it falls under sw360dp category
That means, everyting is working as it should be
link https://material.io/tools/devices/
The point is, DP doesn't depend solely on screen side, it depends of the sreen size and how many pixel the display actually has.

Confusion with my layouts - android

I'm currently working on my application, which tries to support different screen resolutions but I noticed a major problem with my layouts. I'll explain:
I have two folders in my res folder. They are called "layout" and "layout-sw360dp" which is meant to support big screens like Samsung Galaxy S4, HTC One, etc.
Now, when I try to run my application on my private phone, galaxy S4, the app looks fine and all of the images and the components are perfect.
But when I try to run my app on an HTC One device, suddenly the layout looks small, like very small. It supposes to fit the entire screen, like in my galaxy s4.
It's like HTC One and Galaxy S4 don't use the same layout folder, although their screens sizes are almost the same.
If you guys can clarify this matter for me I would really appreaciate that.
Edit: I have tried to run my app on an Samsung Galaxy S5 device and it looks find, like the way it should. What is the problem with HTC One?
Physical size is usually measured in inches, it simply tells you the real device's screen size
dpi, is NOT correlated with it. Dpi expresses screen density, how many pixels are shown in a given area (usually a square inch). It could be considered as a measure of screen quality.
Resolution is given by the product of the two; it expresses the total number of physical pixels on a screen.
android:anyDensity="true"
Samsung Galaxy S4, HTC One have different physical size : DIFFERENCE
Refer this for how to choice best resolution : DOC

Different icon sizes on different devices with the same resolution and dpi

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.

Emulating Galaxy Tab 3 on Android 4.+

(I searched quite a lot here on stackoverflow but could not find the answer)
My game is a tablet-only game and so far I got the interface to fit on a
1024x600 7" tablet mdpi (ex: HTC Flyer)
1280x800 10.1" tablet mdpi(ex:Acer A500)
Nexus 7" v2 xhdpi
Nexus 7" tvdpi
I thought I was near the end but today I had the chance to quickly try it on a Galaxy Tab 3 and the main image on the main layout was stretched and probably didn't use the right resource (I expected it to use the mdpi one as it's a 7" 1024x600 tablet). I read somewhere that the Galaxy tab would be using the hdpi resource. I made some changes and I would like to test it but unfortunately I no longer have access to the tablet.
I installed the Samsung emulator but it targets android 2.2 so I can't run my app on it.
I then tried to create a new definition by specifying 1024x600, Large and HDPI but then the game would crash because the game is checking some values on startup and it could not find the values-large-hdpi folder . Of course I could create the folder/values but on the other hand it was not crashing on the actual tablet so I'm not sure it's the right idea.
So how do you create an AVD that acts like the Galaxy Tab 3 on Android 4.+ ?

How to create layout for devices with screen resolution=720x1280, density=xhdpi and size=normal?

I am developing an Android application intended for high end handset devices like Galaxy S3, Galaxy Nexus, Xperia V etc. Now I want to know which layout is suitable for devices with resolution 720x1280, density xhdpi and size normal.
I already tried layout-xhdpi-1280x720 and Galaxy S3 device is loading screens from here, but not Galaxy Nexus.
I have tried layout-sw260dp but Galaxy Nexus emulator do not loading screens. Also Nexus7 is emulator is loading from here. I don't want any tablet to run my app.
What can be the problem ? Does Device definition of Galaxy Nexus causes the problem ?
I am using Android SDK 4.2.
Now I want to know which layout is suitable for devices with resolution 720x1280, density xhdpi and size normal.
res/layout/ works nicely. If you are also supporting -small screen devices, have an additional res/layout-small/ for those. You may or may not also wish -land variants (e.g., res/layout-land/) if you want different layouts for different screen orientations.
I already tried layout-xhdpi-1280x720 and Galaxy S3 device is loading screens from here, but not Galaxy Nexus.
That approach has been deprecated for years.
I don't want any tablet to run my app.
Then specify the appropriate <compatible-screens> element in your manifest, to state that you only support small and normal screens, not large and xlarge. This has nothing to do with your choice of layout resource directory.

Categories

Resources