Spash屏幕在不同的android屏幕设备中伸展得不是很好

Spash屏幕在不同的android屏幕设备中伸展得不是很好,android,google-maps,google-maps-api-2,Android,Google Maps,Google Maps Api 2,我正在为我的应用程序实现一个启动屏幕,当我的应用程序打开时,使用以下代码显示图像(jpg)3秒钟。问题是图像被拉伸到整个屏幕,其他时间似乎被压缩,具体取决于屏幕大小。我怎样才能解决这个问题?我需要的图像,以适应每一个屏幕大小准确?谢谢 <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:lay

我正在为我的应用程序实现一个启动屏幕,当我的应用程序打开时,使用以下代码显示图像(jpg)3秒钟。问题是图像被拉伸到整个屏幕,其他时间似乎被压缩,具体取决于屏幕大小。我怎样才能解决这个问题?我需要的图像,以适应每一个屏幕大小准确?谢谢

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/background"
android:scaleType="fitXY">


<TextView
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_marginTop="10dp"
    android:textSize="30dp"
    android:textColor="#454545"
    android:gravity="center_horizontal"
    android:layout_alignParentTop="true"
    android:text="xxxx"/>


我使用android:scaleType=“fitXY”,但似乎不起作用。图像尺寸是820x615,这不起作用,因为每个安卓都有不同的纵横比。仅有的两个选项是使用fitxy拉伸图像,或者您可以在缩放类型上使用中心裁剪,使其展开并切掉不合适的内容。

谢谢。我最终使用了android:scaleType=“fitXY”,图像在不同的设备上看起来更好。