Существует метод обнаружения планшета в источнике приложения Google I / O , который выглядит следующим образом:
public class UIUtils {
public static boolean isHoneycomb() {
// Can use static final constants like HONEYCOMB, declared in later versions
// of the OS since they are inlined at compile time. This is guaranteed behavior.
return Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB;
}
public static boolean isHoneycombTablet(Context context) {
// Can use static final constants like HONEYCOMB, declared in later versions
// of the OS since they are inlined at compile time. This is guaranteed behavior.
return isHoneycomb() && (context.getResources().getConfiguration().screenLayout
& Configuration.SCREENLAYOUT_SIZE_MASK)
== Configuration.SCREENLAYOUT_SIZE_XLARGE;
}
}
В своей деятельности вы можете просто позвонить
if (!UIUtils.isHoneycombTablet(this)) {
requestWindowFeature(Window.FEATURE_NO_TITLE);
}