多屏幕支持健全性检查

发布于 2024-08-13 15:29:39 字数 400 浏览 2 评论 0原文

我有一个使用 1.5 编译的项目。我现在想支持不同的屏幕尺寸,而不是让 android 处理缩放。

我所做的只是将清单修改为如下所示:

<uses-sdk android:minSdkVersion="3" android:targetSdkVersion="4"/>

并且我更改了项目属性以针对 1.6(级别 4)SDK 进行构建。

这就是我需要做的,对吧?我所有的布局都使用倾角,所以它应该缩放,而且我还不想弄乱不同尺寸的位图。 在我的情况下,真的有必要将:

<supports-screens>

标签添加到清单中吗?可以按原样在所有屏幕尺寸上运行,甚至是 QVGA。

谢谢

I have a project compiled with and targeting 1.5. I now want to support different screen sizes instead of letting android handle the scaling.

All I've done is modified my manifest to look like this:

<uses-sdk android:minSdkVersion="3" android:targetSdkVersion="4"/>

and I changed my project properties to build against the 1.6 (level 4) SDK.

That's all I need to do, right? All my layouts are using dip, so it should scale, and I don't want to mess with different size bitmaps just yet. Is it really necessary to add the:

<supports-screens>

tag to the manifest in my case? It's good to run on all screen sizes as-is, even QVGA.

Thanks

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

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

发布评论

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

评论(1

瀞厅☆埖开 2024-08-20 15:29:39

我没有看到文档明确说明支持屏幕是可选的还是强制的。 support-screens 具有 默认 值,以及标题为“策略”的部分旧版应用程序”听起来(至少对我来说)就像如果您对默认值感到满意的话,它是可选的。不过,据我所知,如果它在那里也没什么坏处,所以我就把它放进去。如果需要的话,以后可以很容易地向它添加属性。

I don't see the documentation explicitly saying whether or not supports-screens is optional or mandatory. supports-screens has default values, and the section titled "Strategies for Legacy Applications" makes it sound (to me at least) like it would be optional if you are fine with defaults. However, it does not hurt if it is there as far as I know, so I would just put it in. Makes it easy to add attributes to it later if you need to.

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