Ich habe ein Layout mit Root-Relative-Layout und ImageView drin, wenn ich es Quelle festlegen das Bild passt nicht in Bild-Ansicht oberen und unteren Polsterung, die in der Vorschau ist aber nicht in XML definiert. Ich möchte wissen, wie man das Bild so streckt, dass es vollständig in ImageView passt.Bild nicht stretching innerhalb 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>
Set 'android: Scaletype = "fitXY"' für den 'ImageView' –