My bad.  I read it as a literal.  Bob asked for the current screen 
resolution and not the width and height of a view or control etc  :-)

Dianne Hackborn wrote:
> 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 <bshumsk...@yahoo.com 
> <mailto:bshumsk...@yahoo.com>> wrote:
>
>
>     Thanks, that seems to work.
>
>     On Mar 19, 9:54 am, Pd <lotusscr...@gmail.com
>     <mailto:lotusscr...@gmail.com>> 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
> hack...@android.com <mailto:hack...@android.com>
>
> 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to