简体   繁体   English

蜂窝状状态栏(在底部)在设备上的高度是否相同?

[英]Is the Honeycomb Status bar (at the bottom) the same height across devices?

I'm trying to figure out if the Status bar (the one that has the Home and Back buttons) is consistant across devices, in terms of how many vertical pixels it occupies, and if so what that number is, and if not what do I do to get the height dynamically, so that I can act accordingly with the remaining screen real estate. 我试图找出状态栏(带有“主页”和“返回”按钮的状态栏)在各个设备上是否一致,它占用的垂直像素数是多少,如果是,该数字是多少,如果不是,该怎么办我这样做是为了动态地获得高度,以便我可以对剩余的屏幕空间采取相应的措施。

I see a couple of other questions that sort of skirt this topic, but none that actually give a definitive answer. 我看到其他几个问题可以绕开这个话题,但实际上没有一个给出明确的答案。

TIA TIA

I'm trying to figure out if the Status bar (the one that has the Home and Back buttons) is consistant across devices 我试图弄清楚状态栏(具有“主页”和“返回”按钮的状态栏)是否在设备之间一致

It is not even consistent on the same device. 在同一设备上甚至不一致。

One example: if you plug a WXGA device into a television via HDMI and hold it in landscape, the system bar will grow a bit, so that the space outside the system bar will be exactly 720p (1280x720, with an 80px high system bar). 一个示例:如果您通过HDMI将WXGA设备插入电视并保持其横向放置,则系统栏将略微增大,因此系统栏外部的空间将恰好为720p(1280x720,系统栏高度为80px) 。

if so what that number is 如果是的话那个数字是多少

It is a non-negative integer. 它是一个非负整数。 Everything else is undocumented and, therefore, subject to change. 其他所有内容均未记录在案,因此可能随时更改。

what do I do to get the height dynamically 我该怎么做才能动态获得身高

You don't. 你不知道 You do not care about the system bar. 您不必关心系统栏。 You care about the space you can draw in and how big that is. 您关心可以利用的空间以及它的大小。 Whether there is zero, one, two, or twenty system bars does not matter. 有零,一,二或二十个系统栏无关紧要。

I was assuming there'd be a less hack(y) approach. 我以为会减少黑客的行为。

What Christopher suggested is the "less hack(y) approach". 克里斯托弗(Christopher)提出的建议 “减少hack(y)方法”。 What you were trying to do is significantly more hacky, as it makes assumptions about what might be intruding upon your drawing space. 您尝试执行的操作明显更容易出错,因为它会假设可能会干扰您的绘图空间。

Since it uses Density Independent Pixels, yes. 因为它使用密度独立像素,所以可以。 If you whipped out a ruler and measured it, it'd be the same height on every device. 如果您拉出标尺并对其进行测量,则每个设备上的标尺高度都相同。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM