Right now, I do this:
if ((getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) >= Configuration.SCREENLAYOUT_SIZE_LARGE) {
actionBar.removeAllTabs();
} else { // other stuff to do
}
However, I want this to prove true ONLY if it is 10"+ tablets, or XLarge. Not 7 inch (e.g. Nexus 7). I want the 7" to be same layout as phone. Can I do this check pragmatically?