سؤال

I had developed an application. I done 2 sets of layout which were

default and small

So i have 2 layout folders which were res/layout and res/layout-small.

I tested in emulator which was 2.7in HVGA it does auto use the res/layout-small folder.

When i run it on device, it does not but still using res/layout.

Here is my manifest.xml

<supports-screens
    android:anyDensity="true"
    android:largeScreens="true"
    android:normalScreens="true"
    android:resizeable="true"
    android:smallScreens="true"
    android:xlargeScreens="true"
    android:requiresSmallestWidthDp="480"
    android:compatibleWidthLimitDp="480"
    android:largestWidthLimitDp="480" >
</supports-screens>

Why the application once installed into device and unable to detect device screen size?

هل كانت مفيدة؟

المحلول

Copying from the documentation:

Note: These minimum screen sizes were not as well defined prior to Android 3.0, so you may encounter some devices that are mis-classified between normal and large. These are also based on the physical resolution of the screen, so may vary across devices—for example a 1024x720 tablet with a system bar actually has a bit less space available to the application due to it being used by the system bar.

If you aren't using a 3.0+ device, then this could be a problem with the device.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top