final Display display = this.getWindow().getWindowManager().getDefaultDisplay(); if (display != null) { // 获取屏幕大小 screenWidth = display.getWidth(); screenHeight = display.getHeight(); }
final Display display = this.getWindow().getWindowManager().getDefaultDisplay(); if (display != null) { // 获取屏幕大小 screenWidth = display.getWidth(); screenHeight = display.getHeight(); }