use of com.stfalcon.imageviewer.StfalconImageViewer in project android-client by GenesisVision.
the class CreatePostActivity method showImageViewer.
@Override
public void showImageViewer(ImageView imageView, int position, List<NewPostImage> images) {
ImageViewerOverlayView overlayView = new ImageViewerOverlayView(this);
overlayView.setImagesCount(images.size());
StfalconImageViewer imageViewer = new StfalconImageViewer.Builder<>(this, images, (loadingImageView, image) -> Glide.with(this).load(ImageUtils.getImageUriById(image.getImage())).into(loadingImageView)).withStartPosition(position).withHiddenStatusBar(false).withTransitionFrom(imageView).withOverlayView(overlayView).withImageChangeListener(overlayView).show();
overlayView.setImageViewer(imageViewer);
}
use of com.stfalcon.imageviewer.StfalconImageViewer in project android-client by GenesisVision.
the class PostDetailsActivity method showImageViewer.
@Override
public void showImageViewer(ImageView imageView, int position, List<NewPostImage> images) {
ImageViewerOverlayView overlayView = new ImageViewerOverlayView(this);
overlayView.setImagesCount(images.size());
StfalconImageViewer imageViewer = new StfalconImageViewer.Builder<>(this, images, (loadingImageView, image) -> Glide.with(this).load(ImageUtils.getImageUriById(image.getImage())).into(loadingImageView)).withStartPosition(position).withHiddenStatusBar(false).withTransitionFrom(imageView).withOverlayView(overlayView).withImageChangeListener(overlayView).show();
overlayView.setImageViewer(imageViewer);
}
use of com.stfalcon.imageviewer.StfalconImageViewer in project android-client by GenesisVision.
the class SocialPostView method onPostImageClicked.
@Override
public void onPostImageClicked(ImageView imageView, String imageUrl, int position, UUID postId) {
if (post != null && post.getId().equals(postId)) {
ArrayList<String> images = new ArrayList<>();
for (PostImage image : post.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);
}
}
use of com.stfalcon.imageviewer.StfalconImageViewer 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