I have a backward compatible app which is using screen specific layout (only for HVGA). Structure of my layout is as follows:
res/layout
res/layout-480×320 (for HVGA)
layout-480×320 contains few sepcific XMLs.
Manifest is as follows:
<uses-sdk android:minSdkVersion="7"
android:targetSdkVersion="11"
android:maxSdkVersion="15"/>
When I am running this app in Galaxy Nexus (720×1280), the kayout is taken from 480×320 folder. I have built it on 2.1 target and 4.0 target. Both are resulting same result.
Can anyone please help.
This is a stange change made to ICS 4.0 (or may be 3.2).
Pre ICS:
If you specify “layout-480×320” it finds and exact match and take from this folder if you device is HVGA, else it will fallback to “layout” folder.
ICS:
If you specify “layout-480×320” Android think this layout is good for any resolution which is “same OR ABOVE” 480×320, hence it does not fall back to “layout” folder. So you have to provide another folder with higher resolution.
So, now it not EXACT match but a “Range” based matching.
I dont know if this is a feature or bug. But going through the documentation it seems, it is a feature. 🙂