如何防止闪屏图像拉伸

Joh*_*ula 0 android splash-screen

我在创造一个游戏.
目前,对于我的启动画面,我使用的是图像.
问题是它延伸.
陶氏我会阻止吗?

android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context="hitesh.asimplegame.SplashScrean"
    android:background="@drawable/mulalo">
Run Code Online (Sandbox Code Playgroud)

Sha*_*got 8

始终使用Imageview显示图像.

用于启动画面的示例xml

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <ImageView
        android:layout_width="match_parent"
        android:layout_height="match_parent" 
        android:src="@drawable/splash_bg"
        android:scaleType="centerCrop"
        />
</RelativeLayout>
Run Code Online (Sandbox Code Playgroud)

splash_bg替换你的图像.

注意:作为信息较少的问题,我假设您只使用一个图像作为启动画面.