DisplayMetrics dm = getResources().getDisplayMetrics()
;
int screenWidth = dm. widthPixels ;
int screenHeight = dm. heightPixels ;
Log.d( "liudezu" , "==========屏幕分辨率:" + "(" +screenWidth+ "," +screenHeight+ ") \n " ) ;
int screenWidth = dm. widthPixels ;
int screenHeight = dm. heightPixels ;
Log.d( "liudezu" , "==========屏幕分辨率:" + "(" +screenWidth+ "," +screenHeight+ ") \n " ) ;
Log.d(
"liudezu"
,
"==========屏幕密度"
+dm.
density
+
" 屏幕dpi:"
+dm.
densityDpi
)
;
android.os.Build的一些常使用常量:
BOARD |
The name of the underlying board, like "goldfish".主板名称
| |
BOOTLOADER | The system bootloader version number.系统引导程序版本号 | |
BRAND | The brand (e.g., carrier) the software is customized for, if any.android系统定制商 | |
CPU_ABI |
The name of the instruction set (CPU type + ABI convention) of native code.CPU 和ABI的本地代码指令集
| |
CPU_ABI2 | The name of the second instruction set (CPU type + ABI convention) of native code. | |
DEVICE | The name of the industrial design.设备参数 | |
DISPLAY | A build ID string meant for displaying to the user显示屏参数 | |
FINGERPRINT | A string that uniquely identifies this build.硬件名 | |
HARDWARE |
The name of the hardware (from the kernel command line or /proc).内核命令行中的硬件名
| |
HOST | ||
ID | Either a changelist number, or a label like "M4-rc20".修改版本列表 | |
MANUFACTURER | The manufacturer of the product/hardware.硬件厂商 | |
MODEL | The end-user-visible name for the end product.版本 | |
PRODUCT | The name of the overall product.手机厂商 | |
RADIO | This field was deprecated in API level 14. The radio firmware version is frequently not available when this class is initialized, leading to a blank or "unknown" value for this string. Use getRadioVersion() instead. | |
SERIAL | A hardware serial number, if available. | |