Search code examples
androidscreenandroid-screen

Android resource notlong / long identifiers not working


Currently I have the following resource folders:
1. layout-sw600dp
2. layout-sw600dp-notlong

The idea is that we have 3 types of devices and the devices should use the resources from the correct folder accordingly. The devices are:
1. Samsung Galaxy Tab 10.1, 1280 X 800 mdpi. 16/10
2. Asus Transformer TFT 101, 1280 X 800 mdpi. 16/10.
3. A generic tablet, 800 X 600 ldpi. 4/3.

The problem is that all 3 devices use resources from layout-sw600dp-notlong. To my understanding 4/3 is categorized as -notlong devices.

Is there anything wrong in my identifier usage? Or there's a bug reported for the identifier?

Thank in advance.


Solution

  • The 'notlong' identifier is for devices that are similar in aspect ratio to baseline devices (see http://developer.android.com/guide/practices/screens_support.html). While the docs are scarce on what baseline devices are, typical resolution of Android devices 1.5~1.6. So what you are seeing is correct.

    While there is a 'long' identifier for devices that are longer than baseline ratios, it looks like you can't force resources for devices that are shorter (e.g. 800x600).