码迷,mamicode.com
首页 > 移动开发 > 详细

[Android Tips] 13. How to Detect Tablet

时间:2014-09-04 16:54:39      阅读:206      评论:0      收藏:0      [点我收藏+]

标签:android   style   blog   http   color   os   io   ar   div   

/**
  * 判断是否是平板
  * @param context
  * @return
  */
public static boolean isTablet(Context context) {
    return (context.getResources().getConfiguration().screenLayout
                & Configuration.SCREENLAYOUT_SIZE_MASK)
                >= Configuration.SCREENLAYOUT_SIZE_LARGE;
}

Ref

 

 

[Android Tips] 13. How to Detect Tablet

标签:android   style   blog   http   color   os   io   ar   div   

原文地址:http://www.cnblogs.com/shaobin0604/p/3956311.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!