Reputation: 479
I have created the following layouts to support multiple devices and screens:
layout-normal
layout-normal-land
layout-sw240dp
layout-sw240dp-land
layout-sw320dp
layout-sw320dp-land
and included the following in manifest
<supports-screens
android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="true"
android:anyDensity="true" />
I have also created a AVD with ICS 4.0.3 skin WVGA800,LCD density 240..etc
When i run my app on the emulator i have observed that it loads some resources from layout-sw240dp and some from layout-sw320dp
I confirmed it by changing some text in the XML files of these directories.
My question is for the same device config why should it load resources from different layout directories?.
I could not find any info regarding this problem in android Multiple screens support documentation.
Upvotes: 2
Views: 1320
Reputation: 133560
http://developer.android.com/guide/practices/screens_support.html. Check the link for Supporting multiple screeens. http://www.youtube.com/watch?v=kFhgmS2Kc7k. Supporting multi versions and avoiding code duplication. Please go through the links.
Upvotes: 1