android 获取屏幕尺寸大小

  DisplayMetrics dw = new DisplayMetrics();
        getWindowManager().getDefaultDisplay().getMetrics(dw);
        Constant.screenWidth = dw.widthPixels;
        Constant.screenHeight = dw.heightPixels;

你可能感兴趣的:(android)