Android Device/Screen support

162 Views Asked by At

As you all know, the latest devices from LG, Samsung and HTC got all sorts of different screen dimension.

As I tried my app on galaxy sII, older nexus one and they seems fine until I tried it on galaxy tab and all layout is stretched. I only have 1 set of layouts for all; and graphics for ldpi/mdpi/hdpi but not xhdpi

I am wondering how could I disable support or install for tablet devices like the Tab, Flyer...etc., but supporting the Galaxy note and other 4+" devices?

Thank you in advance, because I am quite confuse on the screen size vs. density thing

1

There are 1 best solutions below

3
On

Have you tried setting up a layout jut for tabs? With layout-xlarge? Or layout-xlarge-land folder? But if you don't want to support large screens (tabs) you should look at the "support-screen" tag in the manifest:

<supports-screens android:resizeable=["true"| "false"]
                  android:smallScreens=["true" | "false"]
                  android:normalScreens=["true" | "false"]
                  android:largeScreens=["true" | "false"]
                  android:xlargeScreens=["true" | "false"]
                  android:anyDensity=["true" | "false"]
                  android:requiresSmallestWidthDp="integer"
                  android:compatibleWidthLimitDp="integer"
                  android:largestWidthLimitDp="integer"/>

You just need to set this:

android:xlargeScreens=["false"]

and it won't run on Tabs.