我如何获得广义屏幕大小? [英] How do I get the generalized screen size?

查看:151
本文介绍了我如何获得广义屏幕大小?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<一个href=\"http://developer.android.com/guide/practices/screens_support.html\">http://developer.android.com/guide/practices/screens_support.html声明:

术语和概念

屏幕大小的实际物理尺寸,
  作为屏幕的对角线测量。对于
  简单起见,Android将所有实际
  屏幕尺寸为广义
  大小:小,中,大,和额外的
  大的。

Screen size Actual physical size, measured as the screen's diagonal. For simplicity, Android groups all actual screen sizes into four generalized sizes: small, normal, large, and extra large.

我如何编程获取设备屏幕的大小普遍?该方法或属性我要找会返回之一:小,中,大,超大。 (或者可以映射到那些常量/枚举)

How do I programmatically get the generalized size of the device screen? The method or property I am looking for will return one of: small, normal, large, and extra large. (or const/enums that can be mapped to those)

感谢。

-mz

推荐答案

使用<一个href=\"http://developer.android.com/reference/android/content/res/Configuration.html#screenLayout\"><$c$c>screenLayout配置对象。

这篇关于我如何获得广义屏幕大小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆