You almost certainly don't want to do that. It does not tell you the actually available space (taking into account any screen decorations that may or may not be showing), just the raw size. You should always use the view hierarchy layout system to place your UI.
On Thu, Mar 19, 2009 at 9:36 AM, Bob <[email protected]> wrote: > > Thanks, that seems to work. > > On Mar 19, 9:54 am, Pd <[email protected]> wrote: > > this may work but I've not tested it :-) > > > > getWindow().getWindowManager().getDefaultDisplay().getWidth(); > > getWindow().getWindowManager().getDefaultDisplay().getHeight(); > > > > Bob wrote: > > > Hi, > > > How do I get the current screen resolution (width and height)? > > > > > Thanks, > > > Bob > > > -- 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 -~----------~----~----~----~------~----~------~--~---

