1

私はこのコードを持っています:

<?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:orientation="vertical"
android:gravity="top"
android:background="@drawable/db_bg_color">
<ImageView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:adjustViewBounds="true"
    android:id="@+id/noise_bar_red"
    android:src="@drawable/noise_bar_red"
    android:contentDescription="@string/app_name"
    android:layout_centerHorizontal="true" />
<ImageView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:adjustViewBounds="true"
    android:id="@+id/noise_bar"
    android:src="@drawable/noise_bar"
    android:contentDescription="@string/app_name"
    android:layout_centerHorizontal="true" />
</RelativeLayout>

問題は、db_bg_colorのように大きく、画面のように、最後の画像が拡大縮小されたようなものであるということです。わかりません...しかし、画面全体に表示されません...fill_parentでも表示されません。これを参照してください:http://img835.imageshack.us/img835/7121/schermata20121203alle12.png なぜですか?

4

1 に答える 1

1

私はあなたが使うことができると思います:

android:scaleType="fitXY"
于 2012-12-03T11:29:35.667 に答える