Definition of ImageView
<ImageView
android:id="@+id/cover_image"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:contentDescription="@string/desc_empty"
android:fitsSystemWindows="true"
android:scaleType="centerCrop" />
Java code using glide for loading
Glide.with(this)
.load(entry.getCover_photo())
.placeholder(R.drawable.default_image)
.error(R.drawable.error_image)
.centerCrop()
.diskCacheStrategy(DiskCacheStrategy.ALL)
.crossFade()
.into(ivCover);
The problem I have is in the rotation of the device:
vertical(bien) -> horizontal(se muestra aumentado) -> vertical(bien) -> horizontal(bien)
that is, the second time it is rotated, everything is displayed correctly. and continuously until you leave the activity