listview Recycleviewではimageview画像が不完全に表示されます
974 ワード
listview Recycleviewではimageview画像が不完全に表示されます
listview Recycleviewでは、imageviewピクチャのサイズが不明なため、ピクチャの表示が不完全になります.
imageviewにプロパティ
listview Recycleviewでは、imageviewピクチャのサイズが不明なため、ピクチャの表示が不完全になります.
imageviewにプロパティ
android:adjustViewBounds="true"
を追加するだけです.このプロパティは、画像のスケールを維持して、画像が引っ張られて変形しないようにするために使用されます.<ImageView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/colorAccent"
android:adjustViewBounds="true"/>