Which android layout and drawable resources should

2019-06-07 07:13发布

问题:

I am Developing Application with multiple device support. Now i want to know which Layout is Galaxy Tab Support? I mean like layout-large or layout-small, layout-xlarge or anyother ?? Samw with which drawable is supported by galary tab for images to place. ?

Thanks.

回答1:

You can also use the new size qualifiers in the supports-screens.(for android 3.2 and above)

<manifest ... >
    <supports-screens android:requiresSmallestWidthDp="600" />
    ...
</manifest>

Here are some numbers for typical screen widths:

320dp: a typical phone screen (240x320 ldpi, 320x480 mdpi, 480x800 hdpi, etc).

480dp: a tweener tablet like the Streak (480x800 mdpi).

600dp: a 7” tablet (600x1024 mdpi).

720dp: a 10” tablet (720x1280 mdpi, 800x1280 mdpi, etc).

Refer to the dev guide on screen supports



回答2:

Now I want to know which Layout is Galaxy Tab Support?

The answer for this particular question is dependant on the inch of the device whether it is a 10 inch or 7 inch or whatever.You can have a look at this image provided by the developer.android.com.which clearly describes the layout for the respective inches of the devices.

Hope this helps!



回答3:

If you set your target sdk level to anything less than 9, then support for extra-large screens is assumed to be false. If you set targetSdkVersion=9 in the manifest, then xlarge support is assumed to be true.and check out my SO answer.

The following code in the Manifest supports all dpis.

<supports-screens android:smallScreens="true" 
      android:normalScreens="true" 
      android:largeScreens="true"
      android:xlargeScreens="true"
      android:anyDensity="true" />

Best of luck