You can use View.getWindowVisibleDisplayFrame(Rect)

On Thu, Aug 18, 2011 at 4:12 PM, neuromit <[email protected]> wrote:

> I'm interested in getting the usable dimensions of the screen as
> opposed to the dimensions of the entire screen as part of the screen
> is occupied by the notification bar and a system bar in Honeycomb. The
> numbers reported by DisplayMetrics only give you the dimensions of the
> whole screen. I've been looking for a way to figure our the dimensions
> of the  usable part of the screen.
>
> I know I can create a view that fills the screen and then grab the
> size of the view after the view has been drawn but this requires the
> view to be drawn once before I can query its size. It also seems very
> "hackish".
>
>
> Is there a proper way to do this?
>
> --
> 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
>



-- 
Romain Guy
Android framework engineer
[email protected]

-- 
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

Reply via email to