【发布时间】:2012-03-15 04:03:32
【问题描述】:
我在 Android 中开发了应用程序并设计了一个 320x480 大小的初始屏幕图像。我希望只在手机上运行这个应用程序。但是当我在模拟器中运行我的应用程序时,图像被拉伸并且看起来不太好。我已经阅读了开发人员的文档,但对我的帮助还不够。所以基本上我想知道我应该定义什么尺寸才能让启动屏幕看起来像它设计的那样,并且图像不应该被拉伸。
我的 XML 文件...
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_gravity="center"
android:background="@drawable/screenbackground"
android:gravity="bottom"
android:orientation="vertical" >
<ProgressBar
android:id="@+id/progressBar1"
style="?android:attr/progressBarStyleLarge"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_centerHorizontal="true"
android:layout_marginTop="10dp" >
</ProgressBar>
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/progressBar1"
android:layout_centerHorizontal="true"
android:layout_marginTop="8dp"
android:text="@string/loaddata"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#ffffff" >
</TextView>
</RelativeLayout>
请给我建议或任何链接或资源。
谢谢
【问题讨论】:
标签: android splash-screen