use of org.thoughtcrime.securesms.components.ZoomingImageView in project Signal-Android by WhisperSystems.
the class ImageMediaPreviewFragment method onCreateView.
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
ZoomingImageView zoomingImageView = (ZoomingImageView) inflater.inflate(R.layout.media_preview_image_fragment, container, false);
GlideRequests glideRequests = GlideApp.with(requireActivity());
Bundle arguments = requireArguments();
Uri uri = arguments.getParcelable(DATA_URI);
String contentType = arguments.getString(DATA_CONTENT_TYPE);
if (!MediaUtil.isImageType(contentType)) {
throw new AssertionError("This fragment can only display images");
}
// noinspection ConstantConditions
zoomingImageView.setImageUri(glideRequests, uri, contentType);
zoomingImageView.setOnClickListener(v -> events.singleTapOnMedia());
return zoomingImageView;
}
use of org.thoughtcrime.securesms.components.ZoomingImageView in project Signal-Android by signalapp.
the class ImageMediaPreviewFragment method onCreateView.
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
ZoomingImageView zoomingImageView = (ZoomingImageView) inflater.inflate(R.layout.media_preview_image_fragment, container, false);
GlideRequests glideRequests = GlideApp.with(requireActivity());
Bundle arguments = requireArguments();
Uri uri = arguments.getParcelable(DATA_URI);
String contentType = arguments.getString(DATA_CONTENT_TYPE);
if (!MediaUtil.isImageType(contentType)) {
throw new AssertionError("This fragment can only display images");
}
// noinspection ConstantConditions
zoomingImageView.setImageUri(glideRequests, uri, contentType);
zoomingImageView.setOnClickListener(v -> events.singleTapOnMedia());
return zoomingImageView;
}
Aggregations