支持 1.5 目标的屏幕,无法使应用程序不可缩放
我现在有点迷失,我正在尝试做的事情:构建一个 1.5 兼容的应用程序,该应用程序也应该在 Nexus 等 2.0/2.1 设备上运行。问题是在 Eclipse 中设置的 1.5 目标中,supports-screen 无法按照预期的方式工作。
我错过了什么吗?基本上,我只是希望我的应用程序不要缩放任何东西,我会处理这个问题(anyScale = true)
提前致谢!
I'm a bit lost right now, what I'm trying to do: build a 1.5 compatible app that should also run on 2.0/2.1 devices like the Nexus. The problem is that supports-screen doesn't work the way it's supposed to with 1.5 target set in eclipse.
Did I miss something? Basically, I just want my app not to scale anything, I'll handle that ( anyScale = true )
Thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
正如您所注意到的
<
元素是在 API 级别 4(即 Android 1.6)中引入的,这意味着它不适用于 Android 1.5应用。
的;support-screens>但是,您可以让它适用于在 1.5 上运行的应用程序。
如果您指定
targetSdkVersion
以及minSdkVersion
,您的应用程序将开始在所有平台上正常工作。因此,您的清单中应有一个如下所示的条目:
Android 开发者文档中的Android API 级别页面。
As you've noted the
<support-screens>
element of<manifest>
was indroduced at API Level 4, which is Android 1.6, and this means it doesn't work for an Android 1.5 application.However, you can get this to work for an application that does run on 1.5.
If you specify
targetSdkVersion
as well asminSdkVersion
your application will start to work correctly on all platforms.So have an entry in your manifest like this:
This is covered in the Android API Levels page in the Android Developer documentation.