获取屏幕分辨率及获取设置壁纸分辨率

wpm = (WallpaperManager) getSystemService(WALLPAPER_SERVICE);

 wallPaperWidth = wpm.getDesiredMinimumWidth();
 wallPaperHeight = wpm.getDesiredMinimumHeight();
 DisplayMetrics metrics = new DisplayMetrics();
getWindowManager().getDefaultDisplay().getMetrics(metrics);
 wpm.suggestDesiredDimensions(metrics.widthPixels, metrics.heightPixels);
 wpm.suggestDesiredDimensions(wallPaperWidth, wallPaperHeight);

你可能感兴趣的:(获取屏幕分辨率及获取设置壁纸分辨率)