2011-11-14 14 views
0

私のアプリのスプラッシュ画面を実装したいのですが、このコードを使用して画像を表示していますが、画像は中央に配置され、画面全体に伸びません。どうすれば問題を解決できますか? ありがとうございます。SplashScreenが伸びていない

<?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"> 
     <ImageView android:src="@drawable/splash" 
     android:id="@+id/splash" 
     android:layout_width="fill_parent" 
     android:layout_height="fill_parent"> 
     </ImageView> 
</RelativeLayout> 
+1

あなたは、アクティビティのスタイルとしてandroid:windowBackground属性を使用することを検討しましたか? – FunkTheMonk

答えて

4

android:scaleType="fitXY"は、画像をストレッチする責任がある

<ImageView android:id="@+id/splash" android:layout_width="fill_parent" 
    android:layout_height="fill_parent" android:src="@drawable/splash" 
    android:scaleType="fitXY" /> 

を試してみてください。

+0

Great;)、「fitXY」属性を追加する必要があります。どうもありがとうございました。 10分後に答えを受け入れる:)。 – androniennn

関連する問題