Android 四种获取屏幕宽度的方法总结
Android 四种获取屏幕宽度的方法 方法一: WindowManager wm = (WindowManager) this .getSystemService(Context.WINDOW_SERVICE); int width = wm.getDefaultDisplay().getWidth(); int height = wm.getDefaultDisplay().getHeight(); 方法二: WindowManager wm1 = this.getWindowManager(); int width1 = wm1.getDefaultDi