OK.. I tried replying to this thread:

http://groups.google.com/group/android-developers/browse_thread/thread/f9a3974f74e81c65

But Google Groups seems to have lost that email :/, so trying a new
post.

In the afore-mentioned thread, Dianne talks about not using
getHeight()/getWidth() for UI layout, which I'll assume is good
advice, but my problem is bootstrapping an OpenGL surface view
(specifically the viewport) and for that I NEED to know the height of
the System Bar as it's currently throwing everything off.  That is, in
order to scale the scene to fit all devices I need to know the
dimensions of the screen, but because the height is an (from
DisplayMetrics) is an absolute height including the System Bar, all
the graphics at the top of the scene are being truncated because the
VIEWABLE area is not the same as the screen height.

I have followed the advice of Chris Pruett here: 
http://youtu.be/cdvaPyq_eBU?t=8m48s,
and here:  
http://code.google.com/p/replicaisland/source/browse/trunk/src/com/replica/replicaisland/AndouKun.java
(line 128)

And in so doing now need to be able to deduct the height of the system
bar to be able to accurately scale the opengl scene to match the
device.

Anyone got any clue how I can determine the height (in pixels) of the
System Bar?  And if the answer is "you can't", that's fine but how do
I then set the viewport in an opengl scene to the correct height?
(understanding that I have to know the height BEFORE the viewport is
set because I will have already computed the scale factors as per
Chris Pruett's approach)

Thanks!

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