如何设计闪屏图像?

发布于 2024-10-29 15:05:18 字数 140 浏览 8 评论 0原文

我想显示启动画面图像。我已阅读关于不同目录(ldpi、mdpi、 ...) 在 res/ 下创建,但我不明白,除了创建 240x320、320x480 和 480x800 的相同图像之外,我是否还需要做其他事情来实现良好的效果结果。
谁能建议我哪件事最好做?

I would like to show a splash screen image. I've read Screen compatibility overview about the different directories (ldpi, mdpi, ...) to create under res/ but I've not understood if, other than creating the same image of 240x320, 320x480 and 480x800 I need to do other things to achieve a good result.
Can anyone suggest me which is the best thing to do?

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

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

发布评论

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

评论(2

私藏温柔 2024-11-05 15:05:18

你描述的就是你需要做的。您需要每个屏幕像素密度组(ldpi、mdpi、hpdi 和 poss xhdpi)的图像

您可以做其他事情吗?

  • 在图像周围使用背景,使图像看起来有拉伸效果(例如,如果图像边缘附近为白色,则使用白色背景)。如果图像周围没有明显的边框并且淡入背景,效果会更好。
  • 背景/边框可以是 9-patch 可拉伸图像
  • 理论上, 您可以提供更多图像并在运行时根据实际屏幕尺寸选择它们,但这是一个非常糟糕的主意(您永远不知道会出现什么新尺寸)
  • 请记住包括纵向和横向版本 - 假设一个方向绝不是一个好主意如果你可以避免它,

请将 Android 屏幕想象成一个可调整大小的网页 - 它们有各种不同的尺寸和形状,并且你的布局需要拉伸和适应所有内容。

What you describe is what you need to do. You need an image for each screen pixel density group (ldpi, mdpi, hpdi and poss xhdpi)

Other things you can do?

  • Use a background around the image so the image appears to stretch (e.g. if image is white near the edges, use a white background). It'll look better if there isn't an obvious border around the image and it fades into a background.
  • The background/borders could be a 9-patch, stretchable image
  • In theory you could provide a lot more images and select them at runtime based on actual screen size, but it's a very bad idea (you never know what new sizes are coming)
  • Remember to include portrait and landscape versions - never a good idea to assume one orientation if you can possibly avoid it

Think of an Android screen like a resizable web page - they come in various different sizes and shapes, and your layout needs to stretch and adapt for all.

梦与时光遇 2024-11-05 15:05:18

就像 Ollie C 所说,我还制作了一个在背景中设置的 9 块,这种方法的唯一问题是你的 Splashscreen 必须具有统一的可拉伸区域。

Like Ollie C said, I also make a 9-patch that I set in background, the only probleme with this methos is that your Splashscreen must have uniform stretchable areas.

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