V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  xiaohui312  ›  全部回复第 1 页 / 共 1 页
回复总数  2
2015 年 8 月 12 日
回复了 xiaobetty 创建的主题 推广 晒出你最蠢的一段代码,送 Cherry 鼠标垫
大鼠标垫已经收到,超赞!100ofer威武霸气
2015 年 8 月 5 日
回复了 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   ·   Solana   ·   1324 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 12ms · UTC 17:21 · PVG 01:21 · LAX 09:21 · JFK 12:21
♥ Do have faith in what you're doing.