Android中 判断是平板还是手机

//是平板返回true 不是平板返回false

public  boolean isTablet(Context context) {

  return (context.getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) >= Configuration.SCREENLAYOUT_SIZE_LARGE;

 }

原文地址:https://www.cnblogs.com/keanuyaoo/p/3357893.html