GestureViews: pan, zoom and animated image transitions for Android
ImageView and FrameLayout with gestures control and position animation
At a glance
- What is it?
- GestureViews is an Apache-2.0 Android library that adds pan, zoom, rotation and position animation to ImageView and FrameLayout. It is aimed at gallery-style screens where a thumbnail has to grow into a full image view.
- Who is it for?
- Adopt GestureViews if you are building an Android gallery where a thumbnail must animate into a full image view and panning has to hand off cleanly to a ViewPager. Do not adopt it for map rendering, canvas drawing or non-touch UI work; it manipulates view position, zoom and rotation, not arbitrary content.
- Can I use it commercially?
- Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 126 days ago.
- What is it written in?
- Mainly Java, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on September 30, 2026, and from our analysis. They are not legal advice.
Editorial analysis
The problem GestureViews solves on Android
Android ships ImageView with no gesture handling at all. Pinch-to-zoom, double-tap-to-zoom, fling dismissal and the transition where a small thumbnail expands into a full-screen image are all left to the developer, and each one has edge cases: multi-touch pointer tracking, bounds clamping, and the moment where a horizontal pan inside a zoomed image should stop moving the image and start flipping a ViewPager instead.
GestureViews packages that work into two ready-made widgets. The README describes the project as an "ImageView and FrameLayout with gestures control and position animation", and states that the main goal is to make images viewing process as smooth as possible and to make it easier for developers to integrate it into their apps. The intended audience is an Android developer building a photo viewer, a product gallery or any screen where an image opens into a larger view. It is not a general-purpose touch framework and it does not render images itself; it wraps views you already have.
How the gesture and animation layers fit together
The library is organized as two view classes plus a settings and listener layer. GestureImageView extends ImageView and GestureFrameLayout extends FrameLayout, so either can be dropped into an existing layout without changing how the image is loaded. The README also notes support for custom views, which means the gesture logic is separable from those two concrete classes.
The feature list names the gesture vocabulary directly: pan, zoom, quick scale, fling, double tap and rotation. Position animation is the second half of the design. The README separates basic animations, described as useful to animate into full image view mode, from advanced animation from RecyclerView or ListView into ViewPager. That split matters: the basic case animates one view's position, while the advanced case has to coordinate two different scrolling containers during a single transition.
The ViewPager integration is described as seamless, with panning smoothly turning into ViewPager flipping and the reverse. Exit from full image mode is handled by scroll and scale gestures rather than a dedicated close button. Two further capabilities sit on top: rounded images with animation support, and image cropping that the README says supports rotation. A gestures listener exposes down, up, single tap, double tap and long press callbacks, and there is a custom state animation API for animating position, zoom and rotation.
Installing GestureViews and opening an image for the first time
The README gives a single dependency line for the Gradle build file. Add it to the module that contains your image screen, then sync the project.
implementation 'com.alexvasilkov:gesture-views:2.10.0'The README does not list a minimum SDK version, a Kotlin or Java language requirement, or any repository block, so the artifact is expected to resolve from the default Maven Central configuration. After syncing, the two view classes are available for use in XML layouts in place of the standard widgets.
The README points to the project wiki for the actual usage instructions rather than reproducing them, so the first real step after adding the dependency is to open the Usage page linked from the README. It also links to Javadoc and to the sample app sources under the sample directory, which is the fastest way to see a working layout and activity. The sample module ships its own build.gradle.kts and a debug keystore, so it can be built and run directly from the repository.
Where GestureViews is the wrong choice
The library manipulates the position, zoom and rotation of a view. It is not a general transform engine for arbitrary content, and it is not a replacement for a map SDK or a canvas drawing surface. If your screen needs to pan and zoom a map, a PDF page with selectable text, or a custom-drawn diagram, the view-level animation model here does not map onto that content.
The documentation is also concentrated in the wiki rather than the README. The README states the feature list and gives the dependency line, but it does not document rollback behaviour, does not describe how to undo an animation, and does not cover what happens when a gesture is interrupted by an incoming call or a configuration change. Anything beyond the feature list and the linked wiki pages has to be read from the sample sources or the Javadoc. Teams that need a documented, self-contained API reference in the repository itself will find this structure inconvenient.
There is a third constraint worth naming. The library is written in Java and the repository is a Gradle project with checkstyle.xml at the top level, so contributing means matching that style configuration. That is a reasonable setup, but it is not a Kotlin-first codebase and it does not offer a Compose API.
How GestureViews differs from a plain ImageView plus a zoom library
The common alternative is to keep the stock ImageView and add a separate zoom-and-pan helper, then write the open and close transitions by hand. That approach gives you full control over the transition curve and lets you reuse the same helper across other view types, but it leaves the hard part to you: coordinating a zoomed image's pan with a parent ViewPager so the two do not fight over the same horizontal drag.
GestureViews takes the opposite position. The ViewPager handoff is built in and described as bidirectional, and the advanced animation path is designed specifically for the RecyclerView or ListView to ViewPager case. The trade-off is that you adopt the library's view classes and its settings model rather than composing independent pieces. If your gallery is not built around a ViewPager, or if your transitions are highly custom, the built-in animation path is less relevant and you are mainly buying the gesture layer.
A second difference is scope. A generic zoom helper typically handles pan and scale only. GestureViews also covers rotation, rounded image corners with animation, and cropping with rotation support, which are separate concerns that would otherwise be three more dependencies.
Maintenance status, upgrades and the Apache-2.0 licence
The repository is not archived, and the last push was on 2026-05-27, the same date as the v2.10.0 release. The release history shows a long gap before that: v2.8.3 was released on 2022-01-06, and v2.9.0 followed on 2026-01-07. So the project is maintained, but the cadence is irregular and there were roughly four years between v2.8.3 and v2.9.0. Anyone pinning a version should assume that a fix may wait.
Upgrade cost is low in the normal case, since the dependency is a single Maven coordinate and the version string is the only thing that changes in build.gradle. The risk sits in the major-version boundary: if a future release changes the view class names or the settings API, every layout that references GestureImageView or GestureFrameLayout is affected. The README does not publish a migration guide, so the release notes for each version are the place to check.
The licence is Apache-2.0. The README reproduces the standard Apache text, including the clause that the software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND. Apache-2.0 permits commercial and closed-source use and requires that the licence and notices be preserved. This is a description of the licence text, not legal advice; confirm your own obligations with the LICENSE.txt file in the repository.
Editorial conclusion
Adopt GestureViews if you are building an Android gallery where a thumbnail must animate into a full image view and panning has to hand off cleanly to a ViewPager. Do not adopt it for map rendering, canvas drawing or non-touch UI work; it manipulates view position, zoom and rotation, not arbitrary content. Before committing, verify one thing first: whether the wiki's ViewPager integration recipe still matches your support library version, since the README links to the wiki rather than documenting the setup inline.
Frequently asked questions
What is GestureViews in Android?
It is a library providing an ImageView and a FrameLayout with gesture control and position animation. The README lists pan, zoom, quick scale, fling, double tap and rotation as the supported gestures, and describes the main goal as making the images viewing process smooth and easier to integrate.
How do I add GestureViews to a Gradle project?
Add the dependency line com.alexvasilkov:gesture-views:2.10.0 to your build.gradle file, as shown in the README's Usage section. The README does not list a repository block or a minimum SDK version.
Does GestureViews work with ViewPager?
Yes. The README describes seamless integration with ViewPager, where panning smoothly turns into ViewPager flipping and vice versa, and links to a wiki page on that setup. It also documents an advanced animation path from RecyclerView or ListView into ViewPager.
What licence does GestureViews use?
Apache-2.0. The README reproduces the standard Apache License text, including the disclaimer that the software is distributed on an AS IS basis without warranties or conditions of any kind.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/alexvasilkov-gestureviews)