Customizable Android full screen image viewer for Fresco library supporting "pinch to zoom" and "swipe to dismiss" gestures

Min SDK   15
Latest Commit   2017-07-19 08:38:22
License   

Github   https://github.com/stfalcon-studio/FrescoImageViewer

         

标签

使用APP客户端扫描二维码运行Demo


         

类似的还有....
ImageViewZoom Android ImageView widget with zoom and pan capabilities
FlipImageView DEPRECATED. Use API14+ and make your animations easier! Small android lib allowing you to make a flip imageview easily, by extending FlipImageView.
TextDrawable This light-weight library provides images with letter/text like the Gmail app. It extends the Drawable class thus can be used with existing/custom/network ImageView classes. Also included is a fluent interface for creati
README

README.md

FrescoImageViewer

codebeat badge Download

Simple customizable full screen image viewer for Fresco library that includes "pinch to zoom" and "swipe to dismiss" gestures. Based on PhotoDraweeView by ongakuer.

alt tag

Who we are

Need iOS and Android apps, MVP development or prototyping? Contact us via info@stfalcon.com. We develop software since 2009, and we're known experts in this field. Check out our portfolio and see more libraries from stfalcon-studio.

Requirements

  • Fresco v.0.12.0 and higher
  • SDK 14 and and higher

Demo Application

Get it on Google Play

Usage

Simple usage

All you need to show a viewer is pass the context, start position and List or String[] into builder and call show().

new ImageViewer.Builder(context, list)
        .setStartPosition(startPosition)
        .show();

Custom objects

But what if in your application images are represented not only with urls? For example, you have object with url and description? You'll have to convert it to list of Strings and only then pass it to viewer, right? No, it's unnecessary! With ImageViewer.Formatter you can pass list of your custom images to viewer and simply write a rule for url extracting:

List<CustomImage> images = getImages();
new ImageViewer.Builder<>(this, images)
        .setFormatter(new ImageViewer.Formatter<CustomImage>() {
            @Override
            public String format(CustomImage customImage) {
                return customImage.getUrl();
            }
        })
        .show();

If formatter isn't passed, Object.toString() will be used for image formatting as default behavior.

Piece of cake!