I make an application with several layouts to target several devices like smartphones and tablets.
For the moment, I have the following folder to distinguish theses devices :
- res/layout # for normal devices like Samsung Galaxy Nexus, S III, ...
- res/layout-large # for tablet 7 inch on Android < 3.2
- res/layout-sw600dp # for tablet 7 inch
- res/layout-xlarge # for tablet 10 inch on Android < 3.2
- res/layout-sw720dp # for tablet 10 inch
The solution is good but I have a problem with old smartphones like HTC Desire that are still in Android 2.2 or 2.3.
Their screen size category is normal and density is hdpi so there is any difference with Samsung Galaxy Nexus for example in qualifiers in resources.
As version of Android is 2.2 or 2.3, I can't use new resources qualifiers for screen size. So, I don't know how I can target specifically these devices with qualifiers to have different layouts between Smartphones with screens that are 4 inch and more and with others that are screens with less than 4 inch.
Someone has any idea about a solution ?
Thanks by advance.
Sylvain.