TEST: Added a new transformation with glide to CenterCrop() images in ImageViews

This commit is contained in:
antonio 2022-08-27 15:57:31 +02:00
parent 4f5822eeca
commit 7e772eb6c0
20 changed files with 47 additions and 25 deletions

View file

@ -16,6 +16,7 @@ import androidx.media3.session.MediaBrowser;
import androidx.navigation.Navigation;
import androidx.recyclerview.widget.RecyclerView;
import com.bumptech.glide.load.resource.bitmap.CenterCrop;
import com.bumptech.glide.load.resource.bitmap.RoundedCorners;
import com.cappielloantonio.play.App;
import com.cappielloantonio.play.R;
@ -96,7 +97,7 @@ public class ArtistAdapter extends RecyclerView.Adapter<ArtistAdapter.ViewHolder
CustomGlideRequest.Builder
.from(context, artist.getId(), CustomGlideRequest.ARTIST_PIC, artist.getImageUrl())
.build()
.transform(new RoundedCorners(CustomGlideRequest.CORNER_RADIUS))
.transform(new CenterCrop(), new RoundedCorners(CustomGlideRequest.CORNER_RADIUS))
.into(cover);
artistRepository.getArtistFullInfo(artist.getId()).removeObserver(this);