【发布时间】:2012-11-28 19:00:32
【问题描述】:
我想将900x150 的图像放入1280x800 的屏幕中而不会失真..任何帮助都将是 gr8 ..这是我的main.xml 文件
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<ScrollView
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<ImageView
android:id="@+id/imageView1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:scaleType="centerCrop"
android:contentDescription="@string/mypicture"
android:src="@drawable/MyImage"
/>
</RelativeLayout>
</ScrollView>
</LinearLayout>
【问题讨论】:
-
android:scaleType="fitXY" stackoverflow.com/a/9478320/1012284
-
请准确描述您想要的结果(有图就完美了)
标签: android android-layout android-imageview