samsung tab3 returns wrong screen resolution - android

Working on a Flash Video player project, it would be playable in Android & iOs
The output has come perfectly in win xp & win 7 desktops. The screen and alignment of various objects was perfect in desktop. We checked it in 4:3 & 16:9 monitors, it was perfect.
Check desktop screen shoot
Here Windows Desktop view of the app. The pink colour border streches to fill the boundry of the display area. This is perfect.
But displays wrongly in Samsung Galaxy Tab 3 7.0 SM-T211
Check screen shot taken in Samsung Tab3
But the same app when displayed in Samsung Tab 3, the pink border does not touches the boundary of the screen.

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.

The layouts of two different devices (Samsung Galaxy S4 mini & Sony Xperia Z1) looks in some placed different. Why?

I have made a one layout (layout-sw360dp) for the devices Sony Xperia Z1 and Samsung Galaxy mini. Both take the layout-sw360dp when started.
And I have a third device LG Optimus 7, this device take the default layout.
In most cases the layouts for the three diveces looks fine. But in one case it do something different.
I had implement a Sliding panel from here GitHub Umano Sliding Panel. And this looks fine on the LG Optimus 7 on default layout. Here a snaped picture:
They gray area is the Sliding panel which is expaned. And the yellow are is a button. when the panel is not expanded the button is on bottom of layout. When the panel expand it goes up. This works well on the default layout, like I said.
But on the two other devices which use the layout-sw360dp it doesnt work well. Here a picture of the Sony Xperia Z1:
The two "areas" cut across.
And here a picture of the Samsung Galaxy S4 mini:
There is a gap between the areas. But I really have no idea how this happens.
Maybe I should use a other layout define?
Can anybody help me out?
Try using layout-xxhdpi for whatever you are doing in layout-sw360dp.

Logo on website in webview displays in low quality

NOTE: this issue only occurs on certain android devices (note 2, s4), looks like only on samsung devices but cannot confirm this 100%
So I needed to load a mobile website inside a webview, now the logo in the header of the website gets displayed very pixelated, like it was downsized and then upscaled...
I tried everything: transparent png, jpg with correct background, svg, bigger image, perfect size image, smaller image,... Image didn't went over 10kb.
Any idea what could go wrong...
EDIT: included screenshot
On the left the icon showed on HTC One, HTC One X, Nexus 4, Nexus One
Right: Samsung Galaxy S4 and Note 2

Android display differences between WXGA with Nexus 7

I have a Nexus 7 tablet which should have a resolution of 1280px by 800px (WXGA). I develop on Eclipse and my layout is set to display at WXGA. Then, I can place my button and object and choose their size according to what I see on the Eclipse display. The problem is that what I see in Eclipse is very different from the display on the tablet. Everything is much bigger on the tablet and it causes me a lot of troubles.
I wonder if someone have an idea about this?
Edit
For some reason it seems like the 7inch WSVGA is the exact replication of my Nexus 7 screen. It is strange since it offers only 964×544 pixels while the Nexus 7 should give 1280x800
WXGA means nothing by itself. You should look at the density too. Nexus 7 is 213dpi (tvdpi) while a Galaxy Nexus is the same res but 240dpi (hdpi).
You should try to detect the screen size that the Android device has and then run code to re-position screen elements accordingly
In Unity scripting you would get the vars Screen.Width and Screen.Height , I'm not sure what the vars are called in normal android , but you would then set your screen elements to react to what ever size the screen it .

Samsung Galaxy Tab 7inch - Layout Issues

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

Categories

Resources