use of io.swagger.client.model.PostImage in project android-client by GenesisVision.
the class SocialCommentView method onPostImageClicked.
@Override
public void onPostImageClicked(ImageView imageView, String imageUrl, int position, UUID postId) {
if (comment != null && comment.getId().equals(postId)) {
ArrayList<String> images = new ArrayList<>();
for (PostImage image : comment.getImages()) {
for (PostImageResize resize : image.getResizes()) {
if (resize.getQuality().equals(ImageQuality.ORIGINAL)) {
images.add(resize.getLogoUrl());
break;
}
}
}
ImageViewerOverlayView overlayView = new ImageViewerOverlayView(getContext());
overlayView.setImagesCount(images.size());
StfalconImageViewer imageViewer = new StfalconImageViewer.Builder<>(getContext(), images, (loadingImageView, image) -> Glide.with(getContext()).load(image).into(loadingImageView)).withStartPosition(position).withHiddenStatusBar(false).withTransitionFrom(imageView).withOverlayView(overlayView).withImageChangeListener(overlayView).show();
overlayView.setImageViewer(imageViewer);
}
}
Aggregations