xiaohui312 最近的时间轴更新
xiaohui312

xiaohui312

V2EX 第 130765 号会员,加入于 2015-08-05 10:05:08 +08:00
xiaohui312 最近回复了
2015-08-12 09:21:31 +08:00
回复了 xiaobetty 创建的主题 推广 晒出你最蠢的一段代码,送 Cherry 鼠标垫
大鼠标垫已经收到,超赞!100ofer威武霸气
2015-08-05 12:07:01 +08:00
回复了 xiaobetty 创建的主题 推广 晒出你最蠢的一段代码,送 Cherry 鼠标垫
/** 获取设备宽度和高度 **/
public static int[] getDeviceWH(Context paramContext) {
int[] arrayOfInt = new int[2];
DisplayMetrics localDisplayMetrics = new DisplayMetrics();
((WindowManager) paramContext.getSystemService("window")).getDefaultDisplay().getMetrics(localDisplayMetrics);
int i = localDisplayMetrics.widthPixels;
int j = localDisplayMetrics.heightPixels;
arrayOfInt[0] = i;
arrayOfInt[1] = j;
return arrayOfInt;
}
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2984 人在线   最高记录 6543   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 10ms · UTC 15:06 · PVG 23:06 · LAX 08:06 · JFK 11:06
Developed with CodeLauncher
♥ Do have faith in what you're doing.