应我的Android启动画面是怎样解决? [英] What resolution should my Android splash screens be?
问题描述
我创建一个闪屏将显示,而我的Android应用程序的负载。我想在适当的大小来创建它,Android将不会自动规模向上或向下,以适应屏幕。 (这是一个位图图像,一幅油画的照片,所以我不能只是把它变成一个九补丁。)
I'm creating a splash screen that will display while my Android application loads. I'd like to create it at the correct size so Android won't auto-scale it up or down to fit the screen. (It's a bitmap image, a photograph of an oil painting, so I can't just turn it into a nine-patch.)
不过,至少有三个重要的屏幕尺寸我关心:小320x480,为480x854(Droid的),和480×800(Nexus One的)
But there are at least three important screen sizes I care about: 320x480, 480x854 (Droid), and 480x800 (Nexus One).
I've read the documentation on supporting multiple screen sizes, but I still don't see how I'm supposed to configure different splash screens for Droid/Nexus one (they're both "hdpi" resources as far as Android is concerned), and I don't know exactly how large my splash screen should be in any case. (How tall is the OS title bar/menu in Droid? N1?)
我应该做什么尺寸的这些图像,以及如何告诉机器人使用正确的尺寸给定的屏幕上?
What size should I make these images, and how do I tell Android to use the correct size on a given screen?
推荐答案
您不必担心绝对屏幕大小或状态栏或任何与mdash;这就是为什么我们有九补片图像。
You don't need to worry about the absolute screen size or status bars or anything — that's why we have nine-patch images.
我所做的就是有一个看起来很不错每个分辨率&mdash图像;实质上是一种标志上的透明背景,一些文字在底部。
What I did was have an image that looked good for each resolution — essentially a logo on a transparent background, with some text at the bottom.
然后我砍掉了相当多的空间,在顶部和侧边,取得了九补丁边框圆的形象,用左手靠近单个像素,右侧和顶部边缘。这使得图像均匀地扩大在侧面和顶部以充满屏幕。
Then I chopped off quite a lot of space at the top and side edges, made a nine-patch border round the image, with a single pixel near the left, right and top edges. This allows the image to expand evenly at the sides and top to fill the screen.
修改,根据下文丹的评论:
Edit, in response to Dan's comment below:
是的,有一种方法来确定哪些显卡应该用于何种明确的屏幕尺寸,但它的<一个href="http://groups.google.com/group/android-developers/browse_thread/thread/5187afe27b6d4906/2258cd560fb62e97?#2258cd560fb62e97">de$p$pcated.
Yes, there is a way to determine which graphics should be used for which explicit screen sizes, but it's deprecated.
正如有绘制 - 华电国际
和 -ldpi
资源预选赛中,它也可以使用绘制-HHHxWWW
&mdash;更大的像素尺寸来了第一位。
Just as there are drawable-hdpi
and -ldpi
resource qualifiers, it's also possible to use drawable-HHHxWWW
— the larger pixel dimension coming first.
例如。 绘制-800×480
和绘制-854×480
这篇关于应我的Android启动画面是怎样解决?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!