alashow/GestureViews


ImageView and FrameLayout with gestures control and position animation

Download


Step 1. Add the JitPack repository to your build file

Add it in your root settings.gradle at the end of repositories:

	dependencyResolutionManagement {
		repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
		repositories {
			mavenCentral()
			maven { url 'https://jitpack.io' }
		}
	}

Add it in your settings.gradle.kts at the end of repositories:

	dependencyResolutionManagement {
		repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
		repositories {
			mavenCentral()
			maven { url = uri("https://jitpack.io") }
		}
	}

Add to pom.xml

	<repositories>
		<repository>
		    <id>jitpack.io</id>
		    <url>https://jitpack.io</url>
		</repository>
	</repositories>

Add it in your build.sbt at the end of resolvers:

 
    resolvers += "jitpack" at "https://jitpack.io"
        
    

Add it in your project.clj at the end of repositories:

 
    :repositories [["jitpack" "https://jitpack.io"]]
        
    

Step 2. Add the dependency

	dependencies {
		implementation 'com.github.alashow:GestureViews:2.3.1'
	}
	dependencies {
		implementation("com.github.alashow:GestureViews:2.3.1")
	}
	<dependency>
	    <groupId>com.github.alashow</groupId>
	    <artifactId>GestureViews</artifactId>
	    <version>2.3.1</version>
	</dependency>

                            
    libraryDependencies += "com.github.alashow" % "GestureViews" % "2.3.1"
        
        

                            
    :dependencies [[com.github.alashow/GestureViews "2.3.1"]]
        
        

Readme


GestureViews

Maven Central Size

ImageView and FrameLayout with gestures control and position animation.

Main goal of this library is to make images viewing process as smooth as possible and to make it easier for developers to integrate it into their apps.

Features

  • Gestures support: pan, zoom, quick scale, fling, double tap, rotation.
  • Seamless integration with ViewPager (panning smoothly turns into ViewPager flipping and vise versa).
  • View position animation ("opening" animation). Useful to animate into full image view mode.
  • Advanced animation from RecyclerView (or ListView) into ViewPager.
  • Exit full image mode by scroll and scale gestures.
  • Rounded images with animations support.
  • Image cropping (supports rotation).
  • Lots of settings.
  • Gestures listener: down (touch), up (touch), single tap, double tap, long press.
  • Custom state animation (animating position, zoom, rotation).
  • Supports both ImageView and FrameLayout out of the box, also supports custom views.

Sample app

<a href="http://play.google.com/store/apps/details?id=com.alexvasilkov.gestures.sample"> <img alt="Get it on Google Play" src="https://play.google.com/intl/en_us/badges/images/apps/en-play-badge-border.png" height="64" /> </a>

Demo video

YouTube

Demo video

Usage

Add dependency to your build.gradle file:

compile 'com.alexvasilkov:gesture-views:2.3.1'

Note: min SDK version for library is 9, but it was tested mainly on 15+.

Usage wiki

Javadoc

Sample app sources

License

Copyright 2014 Alex Vasilkov

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

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.