Note that it is very unlikely you should not be doing this, since this is
the raw size of the display and does not account for space taken by the
status bar and other display decorations in the future such as an input
method. I would strongly recommend that you don't use this, instead setting
up y
First you need to get the WindowManager by :
WindowManager wm = getSystemService(Context.WINDOW_SERVICE);
Next use the method to retrieve a Display object:
Display d = wm.getDefaultDisplay();
... and finally the resolution:
int height = d.getHeight();
int width = d.getWidth();
Hope that help
2 matches
Mail list logo