On android does calculating the aspect ratio include the navigation bar. Does the navigation bar count as a part of the aspect ratio. Thanks
- Device manufactures list aspect ratios as a measure of actual pixel height vs width.
- Developers don’t generally care about this number (other than a starting guideline) because it is malleable. For example:
- Gen 1 Nexus 7
- 1280 x 800 pixels
- 8:5 aspect ratio
- Header Bar ~ 40 pixels (from memory)
- Bottom Bar (back, home, … buttons) ~ 40 pixels
- Usable display space when bars are on: 1200 x 800 == aspect ratio of 3:2 (Interestingly, the same as iPhone 1…4)
- Gen 1 Nexus 7
So, the short answer is YES, all visible pixels, whether they are useful to you or not are counted in the aspect ratio, but you should not rely on the number for your design. Care instead about actual usable pixels.
By the way. I find this a really interesting question because, while working with iOS is straightforward regarding the status bar, Android is much more challenging.
It’s depends on the device. Corona SDK’s height and width values should reflect a content area that does not include the button bar. But on Kindle Fire, the software is not included. You may also find devices don’t report values correctly either. So you can’t 100% guarantee if it’s included or not.
Rob
- Device manufactures list aspect ratios as a measure of actual pixel height vs width.
- Developers don’t generally care about this number (other than a starting guideline) because it is malleable. For example:
- Gen 1 Nexus 7
- 1280 x 800 pixels
- 8:5 aspect ratio
- Header Bar ~ 40 pixels (from memory)
- Bottom Bar (back, home, … buttons) ~ 40 pixels
- Usable display space when bars are on: 1200 x 800 == aspect ratio of 3:2 (Interestingly, the same as iPhone 1…4)
- Gen 1 Nexus 7
So, the short answer is YES, all visible pixels, whether they are useful to you or not are counted in the aspect ratio, but you should not rely on the number for your design. Care instead about actual usable pixels.
By the way. I find this a really interesting question because, while working with iOS is straightforward regarding the status bar, Android is much more challenging.
It’s depends on the device. Corona SDK’s height and width values should reflect a content area that does not include the button bar. But on Kindle Fire, the software is not included. You may also find devices don’t report values correctly either. So you can’t 100% guarantee if it’s included or not.
Rob