WVGA800 和 WVGA854 的资源不同吗?

发布于 2024-09-29 12:50:59 字数 584 浏览 2 评论 0原文

遇到了这个非常愚蠢的问题:
可以找到 WVGA800 资源的 android 文件夹的正确名称。

我为 WVGA854 创建了一个文件夹:drawable-normal-long-hdpi
它工作得很好。
对于 WVGA800,我尝试过 'drawable-normal-notlong-hdpi' - 模拟器和手机仍然从
'drawable' 获取资源,甚至不是 'drawable-normal-long-hdpi'。
尝试使用“drawble-hdpi”、“drawable-notlong-hdpi” - 没有任何效果,它继续使用“drawable”作为资源。

WVGA800的文件夹应该如何命名?

更新:
使用
<代码> 支持屏幕 android:anyDensity="true"
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"/>
没有解决问题。
有没有办法调试使用哪个资源文件夹以及为什么?

Got this really stupid problem:
Can find the proper name for the android folder for WVGA800 resources.

I've created a folder for WVGA854: drawable-normal-long-hdpi
It worked totally fine.
For WVGA800 I've tried 'drawable-normal-notlong-hdpi' - emulator and handset still gets resources from
'drawable', not even 'drawable-normal-long-hdpi'.
Tried using 'drawble-hdpi', 'drawable-notlong-hdpi' - nothing works, it keeps using 'drawable' for resources.

How should the folder for WVGA800 be named?

UPD:
Using

supports-screens android:anyDensity="true"
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"/>

Didnt solve the problem.

Is there a way to debug what resource folder is used and why?

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

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

发布评论

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

评论(2

踏雪无痕 2024-10-06 12:50:59

Android 与 iPhone 不同。在 iPhone 中,它可以为两种受支持的分辨率制作全屏图像,并依赖于此。在 Android 中,它不起作用。有太多的决议,而且一周中的任何一天都可能有更多的决议出现。那么,解决方案就是真正使布局和图像设备独立。有时这需要创造性的解决方案,但无论如何都需要改变思维。

例如,我们试图为全屏启动页面解决同样的问题。我们在图片底部有一个徽标、一个渐变和一组对象。我们的解决方案是将这三件事分开,允许拉伸渐变,然后将徽标放置在中心,将对象放置在底部。这是 Android 中所需的解决方案类型,它将使您不必为每种分辨率剪切不同的图形。

您还可以尝试使用九块图像来实现其中一些。除了图像包含渐变这一事实之外,这对于我们的情况来说非常有用。

Android is not like the iPhone. In iPhone it works to make full-screen images for the two supported resolutions, and rely on that. In Android, it doesn't work. There are too many resolutions, and more can come out any day of the week. The solution, then, is to really make the layouts and images device independent. Sometimes this requires creative solutions, but in any case it requires a change in thinking.

For example, we were trying to solve this same problem for a full-screen splash page. We had a logo, a gradient, and a set of objects at the bottom of the picture. The solution for us was to split these three things, allow the gradient to be stretched, and then position the logo in the center, and the objects at the bottom. This is the type of solution that is required in Android, and it will save you from having to cut a different graphic for every resolution.

You can also try nine-patch images for some of this. This would have worked great for our case except for the fact that the image included a gradient.

少女情怀诗 2024-10-06 12:50:59

一切似乎都是正确的,除了你犯了一个拼写错误:“drawble”。检查您的目录名称。

我建议您首先尝试更宽松的资源过滤器。将您的资源分为 drawable-longdrawable-notlong,然后看看它是否有效。

All seems correct, except you did a spelling mistake: "drawble". Check your directory names.

I suggest you try a more permissive resource filter first. Separate your assets in drawable-long and drawable-notlong, and see if it works.

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