Customizable Android full screen image viewer for Fresco library supporting "pinch to zoom" and "swipe to dismiss" gestures. Made by Stfalcon
Alternatives To Frescoimageviewer
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
5 years ago34Java
Customizable Android full screen image viewer for Fresco library supporting "pinch to zoom" and "swipe to dismiss" gestures. Made by Stfalcon
2 years ago53apache-2.0Kotlin
A simple and customizable Android full-screen image viewer with shared image transition support, "pinch to zoom" and "swipe to dismiss" gestures
5 years ago5January 03, 201916mitC#
Full screen image viewer(Xamarin.Forms) that includes "pinch to zoom" and "swipe to dismiss" gestures.
Android Xkcd Reader2
4 years agoKotlin
XKCD comic reader for Android using Swipe Cards
Alternatives To Frescoimageviewer
Select To Compare

Alternative Project Comparisons

This project is no longer supported. If you're able to switch from Fresco to any other library that works with the Android's ImageView, please migrate to the StfalconImageViewer which is a better version of the FrescoImageViewer. Otherwise, you can still use the latest version of this library. Anyway, PRs are welcome!


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 [email protected]. We develop software since 2009, and we're known experts in this field. Check out our portfolio and see more libraries from stfalcon-studio.


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

Demo Application

Get it on Google Play


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)

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>() {
            public String format(CustomImage customImage) {
                return customImage.getUrl();

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

Piece of cake! 🍰 😉


Don't forget to initialize Fresco in your Application class:


And if you expect to open really large images, use configuration below for better performance:

ImagePipelineConfig config = ImagePipelineConfig.newBuilder(this)
    .setProgressiveJpegConfig(new SimpleProgressiveJpegConfig())
Fresco.initialize(this, config);


You can also customize a viewer to fit your needs.


Use setBackgroundColorRes(colorRes) or setBackgroundColor(colorInt) to set color for fading background.

Custom overlay view

If you need some content over the image (e.g. sharing or download button, description, numeration etc.) you can set your custom view using setOverlayView(customView) and bind it with viewer through ImageViewer.OnImageChangeListener.

Custom drawee hierarchy

Of course, according to Fresco flexibility, you can use your custom GenericDraweeHierarchy. To do this you simply need to create GenericDraweeHierarchyBuilder and pass it into builder:

GenericDraweeHierarchyBuilder hierarchyBuilder = GenericDraweeHierarchyBuilder.newInstance(getResources())


❗️But there is a limitation: default ScaleType in hierarchy is ScaleType.FIT_CENTER, so custom value will be ignored

Custom image requests

For rare cases like post-processing or bitmap resizing you need to use your custom ImageRequestBuilder. Create it with ImageViewer.createImageRequestBuilder() and after configuration pass it to viewer through setCustomImageRequestBuilder(ImageRequestBuilder).

                    .setPostprocessor(new GrayscalePostprocessor()));

Image margin

Simply add margins between images with dimens with setImageMargin(context, dimen) or in px using setImageMarginPx(marginPx).

Container padding

Overlay image hides part of image? Set container padding with dimens using setContainerPadding(context, start, top, end, bottom) or setContainerPadding(context, dimean) for all sides at once. For setting padding in pixels, just use setContainerPaddingPx(...) method.

Status bar visibility

To show/hide status bar in view property you can set hideStatusBar(boolean) in builder. The default value is true.

Gestures disabling

If you need to disable some of gestures - do it using allowSwipeToDismiss(boolean) and allowZooming(boolean) accordingly.

Here is an example that sets all the possible options:

new ImageViewer.Builder<>(this, images)
        .setContainerPadding(this, dimen)
        //.setContainerPadding(this, dimenStart, dimenTop, dimenEnd, dimenBottom)
        //.setContainerPaddingPx(start, top, end, bottom)

With this possibilities you can achieve something like this:

alt tag

You can take a look at sample project for more information.


Download via Gradle:

compile 'com.github.stfalcon:frescoimageviewer:0.5.0'

or Maven:



See the changelog to be aware of latest improvements and fixes.


Copyright (C) 2017

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
See the License for the specific language governing permissions and
limitations under the License.

Popular Swipe Projects
Popular Fresco Projects
Popular User Interface Categories
Related Searches

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
Pinch To Zoom