این هم کد فهمیدن اینکه دستگاه تبلت هستش یا ...
public static boolean isTablet(Context context) {
return (context.getResources().getConfiguration().screenL ayout
& Configuration.SCREENLAYOUT_SIZE_MASK)
>= Configuration.SCREENLAYOUT_SIZE_LARGE;
}