ImageView를 장치 화면의 가장자리에 맞게 ListView 행에 맞추고 싶습니다.안드로이드 - ListView에 ImageView 맞추기
이 내 현재 레이아웃입니다 다음 custom_row.xml에서
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<ListView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:smoothScrollbar="true"
android:id="@android:id/list" />
</RelativeLayout>
: 나 이미지를로드 피카소 라이브러리를 사용하고
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
xmlns:android="http://schemas.android.com/apk/res/android">
<ImageView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/img_item"
android:adjustViewBounds="true"/>
</RelativeLayout>
. Picasa의 로더 옵션을 사용하여 .centerCrop, .centerInside 및 .fit를 사용하여 시도했습니다. 불운.
피카소 설정 :
Picasso.with(context) //
.load(iim.getResized()) //
.placeholder(R.drawable.placeholder) //
.error(R.drawable.error)
.fit().centerInside()
.into(vh.item_image);
사람은 어떻게이 문제를 해결하기 위해 알아? 지금은 XML에
android:scaleType="centerCrop"
ScaleType = "centerCrop"을 Picasso 대신 XML에 넣으려고 했습니까? 어쩌면 이것이 문제를 해결할 수도 있습니다. –