我有一個佈局與根相對佈局和和ImageView裏面當我設置它的源圖像不適合裏面到圖像視圖離開頂部和底部填充是在預覽但不是在xml中定義。我想知道如何拉伸圖像以完全適合ImageView。圖像不拉伸imageView android
XML:
<?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:background="#fff">
<ImageView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:src="@drawable/place_demo_2"
android:id="@+id/back_ground_place"
android:layout_alignParentBottom="true"
android:layout_marginBottom="400dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="Manila Main"
android:id="@+id/visit_place_title"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="68dp"
android:textColor="#fff"/>
</RelativeLayout>
集'機器人:scaleType =「fitXY」'的'ImageView' –