Height of screen in portrait mode only?

Posted by user246114 on Stack Overflow See other posts from Stack Overflow or by user246114
Published on 2010-03-31T02:19:13Z Indexed on 2010/03/31 2:23 UTC
Read the original article Hit count: 328

Filed under:
|

Hi,

How can I get the height of the device for portrait mode? I have to create a bitmap (which is zoomable) and I just want to get a rough idea what the tallest height should be.

getResources().getDisplayMetrics().heightPixels;

does the above return the height, in portrait mode only?

I'm not binding my UI to this absolute value, it's just a rough fit,

Thanks

© Stack Overflow or respective owner

Related posts about android

Related posts about android-sdk