use of com.bumptech.glide.load.resource.bitmap.CenterInside in project Signal-Android by WhisperSystems.
the class BorderlessImageView method setSlide.
public void setSlide(@NonNull GlideRequests glideRequests, @NonNull Slide slide) {
boolean showControls = slide.asAttachment().getUri() == null;
if (slide.hasSticker()) {
image.setFit(new CenterInside());
image.setImageResource(glideRequests, slide, showControls, false);
} else {
image.setFit(new CenterCrop());
image.setImageResource(glideRequests, slide, showControls, false, slide.asAttachment().getWidth(), slide.asAttachment().getHeight());
}
missingShade.setVisibility(showControls ? View.VISIBLE : View.GONE);
}
use of com.bumptech.glide.load.resource.bitmap.CenterInside in project Signal-Android by signalapp.
the class BorderlessImageView method setSlide.
public void setSlide(@NonNull GlideRequests glideRequests, @NonNull Slide slide) {
boolean showControls = slide.asAttachment().getUri() == null;
if (slide.hasSticker()) {
image.setFit(new CenterInside());
image.setImageResource(glideRequests, slide, showControls, false);
} else {
image.setFit(new CenterCrop());
image.setImageResource(glideRequests, slide, showControls, false, slide.asAttachment().getWidth(), slide.asAttachment().getHeight());
}
missingShade.setVisibility(showControls ? View.VISIBLE : View.GONE);
}
Aggregations