i want to my apps support different screen sizes. i add folders "layout-small and layout-large " in /res directory. but XMLs inside this folders aren't accessible in my activity.so i add all my XMLs in default layout and add this code
if((getResources().getConfiguration().screenLayout &&
Configuration.SCREENLAYOUT_SIZE_SMALL) == Configuration.SCREENLAYOUT_SIZE_SMALL) {
setContentView(R.layout.main1);
}else if((getResources().getConfiguration().screenLayout &&
Configuration.SCREENLAYOUT_SIZE_LARGE) == Configuration.SCREENLAYOUT_SIZE_LARGE){
setContentView(R.layout.main2);
}
else
setContentView(R.layout.main);
in my activity, but when my AVD skin is 1024*600 and hw.lcd.dencity is 160 (large) it didn't work.
any help?