我有一个Relative layout高度是固定的 -356 px宽度是包装内容。
我已经放置了一个Imageview带有背景的图像。
图像尺寸为496 px * 496 px。
该图像是一个正方形图像,但被缩放为一个矩形。
这是XML-
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/rlMain"
android:layout_width="wrap_content"
android:layout_height="356px" >
<ImageView
android:id="@+id/ivIcon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/outdoor_verygood_ring" />
</RelativeLayout>
这是原始图像的样子 -
这是它在相对布局中的外观 -

我想要的是 - 如果图像被缩放它应该get scaled in both X and Y。
我怎样才能做到这一点?