Quantcast
Channel: Appcelerator Developer Center Q&A Tag Feed (status)
Viewing all articles
Browse latest Browse all 62

Redrawing components on orientation change, also Xoom tablet/Honeycomb question

$
0
0

Hi,

I'm trying to get my app polished up for a demo tomorrow, and one of the last things I have left to address is getting the available screen area on some devices.

The question I have is how do you measure the 'screen chrome' on these various devices. For example, I know that the statusbar on iPhone is 20px tall, 19/25/38px on Android, and the bottom notification bar is 80px tall on our Xoom tablet that we dev on. However, what I don't know is how you go about detecting something like that, say a Xoom tablet, to account for it when laying out components. displayCaps.platformWidth/Height returns the full size of the screen, not the usable display area.

If I can get this last issue sorted out, it will make my demo to the bosses tomorrow go perfectly.

Right now, what I'm doing is checking if (android).. if (version == 3.0 or 3.1).. if one of the platform displayCaps >= 1280. But that's gotta be too hacky to work in the long run, right?

Another thing I tried is put everything inside a 100%x100% View, but when I check the view's dimensions on orientationchange, they both return '100'. As if it were 100 pixels x 100 pixels, but that really refers to 100%.

Any help is appreciated!

Thanks!


Viewing all articles
Browse latest Browse all 62

Trending Articles