如何管理手机和平板电脑(均为 hdpi)的绘图?

发布于 2024-11-09 01:36:27 字数 253 浏览 0 评论 0原文

我尝试在类似 Nexus-One 的模拟器皮肤和类似 Galaxy-Tab 的模拟器上运行我的应用程序。据我所知,这两款设备都是 hdpi,但 Nexus 被认为是大型设备,而 Galaxy Tab 被认为是超大设备。我的可绘制对象有两个文件夹:drawable-large-hdpi 和drawable-xlarge-hdpi。但是,Galaxy Tab 从drawable-large-hdpi 文件夹中获取资源。这对我来说没有意义。我做错了什么吗?如何管理我的资源以适应两个屏幕?谢谢。

I've tried to run my app on a Nexus-One-like emulator skin and a Galaxy-Tab-like. As far as I know, both devices are hdpi, but Nexus is considered large and Galaxy Tab is considered xlarge. I have two folders for my drawables: drawable-large-hdpi and drawable-xlarge-hdpi. However, Galaxy Tab takes resources from the drawable-large-hdpi folder. It does not make sense for me. Am I doing something wrong? How can I manage my resources to fit on both screens? Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

绅士风度i 2024-11-16 01:36:27

有两件事,你说 Galaxy tab 是超大的可能是错误的,根据我的记忆,我发现它是大屏幕,检查一下。其次,请阅读此处了解更多相关信息。相信我,它可能会变得非常混乱并且难以记住:)

Two things, you are probably wrong in saying Galaxy tab is xlarge, from my memory I had found it to be large screen, check this. Second, read up here to learn more about this. Trust me it can get really messy and hard to remember :)

握住你手 2024-11-16 01:36:27

根据 http://d.android.com,7 英寸屏幕可以是大屏幕或超大屏幕/guide/practices/screens_support.html
对于 Galaxy Tab,它似乎被视为大型。

问题还可能是,Android 2.2 没有 XLarge 限定符,因此默认情况下无法进入 Large。该限定符是在 Android 2.3 中引入的。我认为 2.3 尚未推出到 Galaxy Tab,因此资源可能会随着更新版本而改变。

A 7" screen can be either Large or XLarge according to http://d.android.com/guide/practices/screens_support.html
For the Galaxy Tab, it appears to be considered Large.

The problem could also be that, Android 2.2 does not have the XLarge qualifier, so it fails into Large by default. That qualifier was introduced in Android 2.3. I do not think 2.3 has been rolled out to the Galaxy Tabs yet, so it's possible the resources may change with an updated version.

盛装女皇 2024-11-16 01:36:27

这可能有点晚了,但我想迟到总比不好。

7 英寸 Galaxy Tab 被认为是“大”。如果 AndEngine 没有从“drawable-large-hdpi”文件夹中正确获取资源,则可能与您的 AndroidManifest.xml 有关。检查并确保您有“supports-screens”标签,并且“large”属性设置为 true。示例:

<supports-screens android:large="true".../>

您可能还需要设置其他属性(例如“正常”)来支持电话。作为后备方案,还可以启用“anyDensity”。

This is probably a little late, but better late than never I guess.

The 7 inch Galaxy Tab is considered "large". If AndEngine is not picking up your resources correctly from the "drawable-large-hdpi" folder, then it is likely to do with your AndroidManifest.xml. Check to make sure that you have a "supports-screens" tag, and the "large" attribute set to true. Example:

<supports-screens android:large="true".../>

You will probably need other attributes set as well (e.g. "normal") to support phones. As a fallback, also enable "anyDensity".

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文