【发布时间】:2013-05-09 10:26:31
【问题描述】:
我有一个显示行的 ListView
这是xml:
...
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="5dp"
android:layout_weight="1"
android:background="@color/white"
android:orientation="vertical" >
<FrameLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight=".30">
<ImageView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="@drawable/face"
android:scaleType="centerCrop" />
</FrameLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight=".70"
android:background="@color/white"
android:padding="4dp" >
// Other views...
</LinearLayout>
</LinearLayout>
…
并得到这个结果:
这是原图
需要的是没有缩放的图片,就像这样:
我用的是android:ScaleType = "centerCrop" 我用android测试过:adjustViewBounds = "true" 和许多其他参数,但从来没有成功
想法?
提前致谢
【问题讨论】: