Hello, I am creating an iPad app but I also want it to run on other devices. I need to know the screen dimensions in vertical and horizontal orientations as soon as a view is created. On the iPad I get values of Capabilities.screenResolutionX=1280, and Capabilities.screenResolutionY=800. However, when the device is in portrait orientation the exact screen dimensions are width=768, height=1004. For the landscape orientation it is width=1024, height=748. What is going on exactly? They aren't even the same ratio. I understand the the action bar height might have something to do with it but it is still confusing me.
That's exactly what's going on -- the action bar takes up some of the height, which is why the ratios aren't exactly the same. In your specific case, the iPad's screen is 1024x768, but the action bar is taking up 20px, hence it's reporting 1024x748 in landscape and 768x1004 in portrait orientations.