Get the real screen resolution on Ice Cream Sandwich
问题 Devices with Ice Cream Sandwich can use on-screen soft keys, and this means that some of the screen estate is taken by these keys. I need to get the real screen resolution, and not the resolution minus the space taken up by the soft keys. I've tried the following, but neither works: Display display = getWindowManager().getDefaultDisplay(); int width = display.getWidth(); int height = display.getHeight(); Log.d("SCREEN RES", "Width: " + width + ". Height: " + height); DisplayMetrics metrics =