I am currently using an app that just supports android phones. However, recently I decided to make a tablet version of the same. I created a folder layout-large and layout-xlarge for tablet versions, but someone mentioned that there are phones which are considered large and there are certain features in layouts that I want to keep just for the tablet and not for the phones. How do I make sure the phones are not taking in any layouts from layout-large but from my default layout folders? Is there a way to make sure only tablets take in code for layouts under large and xlarge including fablets? Also, some of my tablets are xlarge with density mdpi, but all the images in mdpi are shaped at a smaller resolution so they appear stretched on my tablet, how do I go about it? Here is the code I added to recognize tablets:
boolean tabletSize = getResources().getBoolean(R.bool.isTablet);
if (tabletSize) {
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_FULL_SENSOR);
} else {
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
}
Do I need to manipulate it somehow to work for the tablets for layout-large/xlarge folders only? any idea?