在 ICS(冰淇淋三明治)上运行的 Android Honeycomb 应用程序
我有一个为 Honeycomb(最初为 3.0)开发的应用程序,在 ICS 发布后,用户可以将其安装到带有 ICS 的手机上,而不仅仅是平板电脑上。如何过滤这些电话?我尝试过
但这不起作用。还有一个有趣的事情(至少对我来说),我的应用程序不会缩小到较小的屏幕。我使用固定大小的控件,但大小以 dp 为单位。
简而言之:
- 有人知道如何过滤 ICS 电话吗? (最好来自代码)
- 我应该怎样做才能支持 ICS 电话? (我想我需要为 ICS 手机实现全新的布局,但对我来说仍然是一个问题,如何确定它是哪种设备,是手机还是平板电脑?
I have an application developed for Honeycomb (initially 3.0) and after the ICS is released the users can install it to theirs phones with ICS, not just to tablets. How can I filter these phones? I have tried with the <support-screens>
but that is not working. Also an interesting (at least to me) thing my application won't scale down to smaller screens. I used fixed sized controls but the size is in dp.
In short:
- Somebody knows how can I filter the ICS phones? (preferably from code)
- What should I do to support ICS phones? (I guess I need to implement a whole new layout for the ICS phones, but it is still a question to me how can I determine what kind of device is it, phone or tablet?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
从此答案复制: https://stackoverflow.com/a/8427523/253583
您可能还想限制Android Market 允许用户通过 http://developer.android.com/guide/topics/manifest/supports-screens-element.html 在清单中。
Copied from this answer here: https://stackoverflow.com/a/8427523/253583
You will also probably want to restrict Android Market from enabling users to install this on phones with http://developer.android.com/guide/topics/manifest/supports-screens-element.html in your manifest.
您可以使用
Build 是 android.os.Build 类来检查
You can check using
where Build is android.os.Build class
如果您只想在平板电脑市场中显示您的应用程序,请在 AndroidManifest.xml 中使用
属性(更多信息 此处)。确保在 Honeycomb 3.2(x-large、large)和 3.2+(600dp 等)之前使用两个标识符。“我的应用程序没有缩小规模”到底是什么意思?您能在这里提供更多信息吗?
If you only want your app being shown in the Market for tablets, in your AndroidManifest.xml use the
<support-screens>
attribute (more info here). Make sure you use both indentifiers for before Honeycomb 3.2 (x-large, large) and 3.2+ (600dp etc).And what exactly do you mean by "my app doesn't scale down"? Could you give more information here?