标签:
方法一
WindowManager managet=(WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
Display display=managet.getDefaultDisplay();
windowX=display.getWidth();
windowY=display.getHeight();
方法二
WindowManager managet=(WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
DisplayMetrics dm=new DisplayMetrics();
managet.getDefaultDisplay().getMetrics(dm);
windowX=dm.widthPixels;
windowY=dm.heightPixels;
标签:
原文地址:http://www.cnblogs.com/spyrx7/p/4661571.html