여러개의 imageview를 넣어서 화면을 구성 하는 중입니다.
imageView 에 표시될 이미지가 imageview 보다 큰것도 있고 작은것도 있어서
imageview의 틀에 맞게 이미지를 확대해서 중간을 보여주기 위해서 scaleType의
center_Crop 옵션을 주었습니다. 그런데 이미지가 큰경우에는 imageView 가 이미지와 함께 늘어 납니다..ㅠㅠ
화면 구성은 weight 로 구성하였습니다. 부모 레이아웃에 height의 값을 주어도 imageView
가 늘어 납니다 ㅠㅠ scaleType 을 fitXY로 지정해도 imageView의 크기가 늘어납니다 ㅠㅠ
imageView가 안늘어나고 center_crop 옵션이 적용 되게 하려면 어떻게 해야 되나요??ㅠㅠㅠ
고수님들 도와주세요 ㅠㅠ
ImageView imv = (ImageView) convertView
.findViewById(resourceID[i]);
imv.setScaleType(ScaleType.CENTER_CROP);
imageLoad.setImageView(imv);
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/white"
android:orientation="vertical"
android:paddingLeft="6dip"
android:paddingRight="6dip"
android:weightSum="10" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="3"
android:orientation="vertical"
android:paddingBottom="6dip"
android:paddingTop="3dip" >
<ImageView
android:id="@+id/image_pattern01"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/icon" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="4.5"
android:orientation="horizontal"
android:paddingBottom="6dip"
android:weightSum="10" >
<LinearLayout
android:layout_width="0dip"
android:layout_height="match_parent"
android:layout_weight="5"
android:orientation="vertical"
android:paddingRight="3dip"
android:weightSum="10" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="2"
android:orientation="horizontal"
android:paddingBottom="6dip"
android:weightSum="10" >
<LinearLayout
android:layout_width="0dip"
android:layout_height="match_parent"
android:layout_weight="5"
android:paddingRight="3dip" >
<ImageView
android:id="@+id/image_pattern02"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/icon" />
</LinearLayout>