-1

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

S Arumik
  • 633
  • 2
  • 10
  • 21

1 Answers1

0

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.

Ahmad
  • 69,608
  • 17
  • 111
  • 137
  • So, i should just "false" the xlargeScreens but "true" for anyDensity, is that right? I am quite mix up for both... thanks – S Arumik Aug 06 '12 at 18:17
  • You could just set false to xLargeScreens. This wouldn't affect which density a screen has. E.g. Many good mobile screens have a high density, but are rather small to get count as a xlarge screen. Android looks how mynay pixels are there and then to which density? Then the system knows how big the screen is by calculating . :) edit: but if you want to make everything sure: yes then you can also set anydenity to true – Ahmad Aug 06 '12 at 18:26
  • sorry, was fixing layout problem on galaxy s3, haven't try on tab yet... four times the dev workload than iOS i can say – S Arumik Aug 07 '12 at 17:00