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 your window to be positioned how you want it and reacting to the final size your view inside of the window receives.
On Mon, Jan 5, 2009 at 6:52 AM, Michal <[email protected]> wrote: > > 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 helps. > > On 5 Sty, 15:17, Nico <[email protected]> wrote: > > Hi, > > I need to get the screen resolution, how can I get it ? > > Thx. > > > > -- Dianne Hackborn Android framework engineer [email protected] Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

