[Android Tips] 13. How to Detect Tablet
时间:2014-09-04 16:54:39
收藏:0
阅读:222
/** * 判断是否是平板 * @param context * @return */ public static boolean isTablet(Context context) { return (context.getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) >= Configuration.SCREENLAYOUT_SIZE_LARGE; }
Ref
原文:http://www.cnblogs.com/shaobin0604/p/3956311.html
评论(0)