网上找了很多方法,说用分辨率的最多,但是现在很多高端手机的分辨率也上千了;还有用SDK版本的,这个更不现实,4.0的手机越来越多;其实平板和手机最大区别就是能否打电话,所以我利用这点来判断,当然像三星P1000也能打电话,要是真要非常精确就结合分辨率一起判断。

我这里仅使用电话功能来判断:

public boolean isTabletDevice() {
        TelephonyManager telephony = (TelephonyManager) mContext.getSystemService(Context.TELEPHONY_SERVICE);
        int type = telephony.getPhoneType();
        if (type == TelephonyManager.PHONE_TYPE_NONE) {
            Log.i("is Tablet!");
        } else {
            Log.i("is phone!");
        }
        return false;
    }


参考资料:http://www.cnblogs.com/coding-way/archive/2012/04/23/2466412.html