[android-developers] Re: Get the screen resolution

2009-01-06 Thread Dianne Hackborn
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

[android-developers] Re: Get the screen resolution

2009-01-05 Thread Michal
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