/**
* 判断是否是平板
* @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的更多相关文章

  1. Android Tips – 填坑手册

    出于: androidChina   http://www.androidchina.net/3595.html 学习 Android 至今,大大小小的坑没少踩,庆幸的是,在强大的搜索引擎与无私奉献的 ...

  2. 【Xamarin开发 Android 系列 13】 应用打包部署

    原文:[Xamarin开发 Android 系列 13] 应用打包部署 开始倒叙咯................ 先更新大宝部署吧,这个章节比较的Easy,童鞋们不用费脑筋.点解?从界面上填写几个参 ...

  3. CyanogenMod wiki reading tips | Android tips

    To Enable the Developer and Performance settings on CyanogenMod 10.1 In the Settings app, choose the ...

  4. android tips—NumberPicker,DataPicker,TimePicker样式改动

    在使用NumberPicker.DataPicker,TimePicker这几个控件时,非常easy出现例如以下这个界面 可是我们想要的却是以下图示的结果 改动Application.activity ...

  5. 【Android】13.4 使用SQLite.NET.Async-PCL访问SQLite数据库

    分类:C#.Android.VS2015: 创建日期:2016-02-27 一.简介 这一节演示如何利用以异步方式(async.await)访问SQLite数据库. 二.示例4运行截图 下面左图为初始 ...

  6. 【Android】13.0 第13章 创建和访问SQLite数据库—本章示例主界面

    分类:C#.Android.VS2015: 创建日期:2016-02-26 一.简介 Android 内置了三种数据存取方式:SQLite数据库.文件.SharedPreferences. 这一章我们 ...

  7. Android 这 13 道 ContentProvider 面试题,你都会了吗?

    前言 作为 Android 的四大组件之一,ContentProvider 可以说是无处不在了. 但是对于我而言,开发过程中看似 ContentProvider 用得很娴熟,却一直没能形成一个完整的体 ...

  8. [Android Tips] 25. ADB Command Note

    copy from https://github.com/operando/Android-Command-Note Android Command Note Logcat adb logcat -v ...

  9. [Android Tips] 24. Gradle listing project dependencies

    ./gradlew app:dependencies or install this Android Studio Plugin https://github.com/rholder/gradle-v ...

随机推荐

  1. iOS 项目中用到的一些开源库和第三方组件

    iOS 项目中用到的一些 iOS 开源库和第三方组件 分享一下我目前所在公司 iOS 项目中用到的一些 iOS 开源库和第三方组件, 感谢开源, 减少了我们的劳动力, 节约了我们大量的时间, 让我们有 ...

  2. 纪念逝去的岁月——C/C++交换排序

    交换排序 代码 #include <stdio.h> void printList(int iList[], int iLen) { ; ; i < iLen; i++) { pri ...

  3. IIS7 + mysql + php + wordPress 在win7下部署

    最近在玩WordPress.wiki等开源平台的站点部署.通过一下实践和资料学习,为了以后少走弯路,觉得有必要把这个过程记录下来. 用到的东西: IIS服务: mysql; php; wordpres ...

  4. zk回车事件

    private Textbox testTextB; testTextB.addEventListener(Events.ON_OK, new EventListener<Event>() ...

  5. php+curl上传文件

    因为公司项目用java做的,需要我这边用php上传文件.只给了个接口,参数都不明确,然后这边不提交表单,在生成pdf之后就立马上传.用了php+curl,总是没上传成功,这里看到了篇文章http:// ...

  6. IntelliJ 有的时候移动滚动条后会自动回到光标所在位置的解决方法

    关闭有道词典的取词.划词功能.

  7. div自定义的滚动条 (竖直导航条)

    <style type="text/css"> .scrollBar { width: 10px; background-color: #daa520; positio ...

  8. oracle结构与安全

    从宏观上来看:oracle数据库服务器主要有数据库和实例组成. 在orale数据库服务器中,首先会产生一个实例,通过实例访问一个数据库. 一个实例对应着一个数据库. oracle 数据库在逻辑上是按层 ...

  9. spidermark sensepostdata ntp_monlist.py

    试NTP 时间服务器用的,ntp_ip_enum.py,源码如下:#!/usr/bin/env python"""Basic script to pull address ...

  10. Empire C:Basic 1

    一.首先,从一个C程序开始: ///Name:Hello World ///Author:JA ///Date:2015-2-4 #include <stdio.h> //包含标准库的信息 ...