0
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/LinearLayout1"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content" >

<ImageView
    android:id="@+id/imageView1"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:gravity="center_vertical"
    android:scaleType="fitXY"
    android:adjustViewBounds="true"
    android:layout_x="0dip" 
    android:layout_y="0dip"
    android:background="@drawable/mlview1" />

私はAndroidエミュレータ2.2を使用しています。私の画像は画面を水平方向に占めていますが、垂直方向は下からの大きなギャップを示しています。画像サイズは800X600です。サイズを変更してから使用する必要がありますか?

4

1 に答える 1

1

次のことを確認してください
。1。親と子の両方の高さと幅がfill_parent
である 2.画像の背景プロパティではなくsrcプロパティを設定している

注: layout_xlayout_yも必要ありません

于 2012-05-18T05:45:42.620 に答える