Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sephiroth74/ImageViewZoom
Android ImageView widget with zoom and pan capabilities
https://github.com/sephiroth74/ImageViewZoom
Last synced: about 1 month ago
JSON representation
Android ImageView widget with zoom and pan capabilities
- Host: GitHub
- URL: https://github.com/sephiroth74/ImageViewZoom
- Owner: sephiroth74
- License: other
- Created: 2012-06-14T00:11:22.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2017-10-21T18:07:00.000Z (about 7 years ago)
- Last Synced: 2024-10-29T17:42:01.824Z (about 1 month ago)
- Language: Java
- Size: 587 KB
- Stars: 1,895
- Watchers: 114
- Forks: 533
- Open Issues: 74
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-github-android-ui - ImageViewZoom - 支持超大图片流畅缩放 (图片)
- awesome-android-ui - https://github.com/sephiroth74/ImageViewZoom
- awesome-android-ui - https://github.com/sephiroth74/ImageViewZoom
README
ImageViewTouch for Android
===
[![Badge](http://www.libtastic.com/static/osbadges/241.png)](http://www.libtastic.com/technology/241/)[![Build Status](https://travis-ci.org/sephiroth74/ImageViewZoom.svg?branch=master)](https://travis-ci.org/sephiroth74/ImageViewZoom)
[ ![Download](https://api.bintray.com/packages/bintray/jcenter/it.sephiroth.android.library.imagezoom%3Aimagezoom/images/download.svg) ](https://bintray.com/bintray/jcenter/it.sephiroth.android.library.imagezoom%3Aimagezoom/_latestVersion)ImageViewTouch is an android `ImageView` widget with zoom and pan capabilities.
This is an implementation of the ImageView widget used in the Gallery app of the Android opensource project.Checkout the repository and run the **ImageViewTouchTest** project to see how it works.
Beside the superclass **setImageBitmap** method it offers the following methods:* `setImageBitmap( final Bitmap bitmap, Matrix matrix );`
* `setImageBitmap( final Bitmap bitmap, Matrix matrix, float minZoom, float maxZoom );`If you want to load a new Bitmap with a particular zoom/pan state (let's say the same from another ImageView ), you can call:
Matrix matrix = mImageView1.getDisplayMatrix();
mImageView2.setImageBitmap( bitmap, matrix );## Tweaks
The initial display state can be set, using `public void setDisplayType( DisplayType type )`, as:
* `DisplayType.FIT_TO_SCREEN`: The image loaded will always fit the current view's bounds.
* `DisplayType.NONE`: The image will be presented with its current dimensions if smaller than the image bounds, otherwise it will be scaled to fit its contents inside the screen.
* `DisplayType.FIT_HEIGHT`: The image loaded will always fit the height of the current view.
* `DisplayType.FIT_WIDTH`: The image loaded will always fit the width of the current view.The default display state is `DisplayState.NONE'.
##Usage (Maven)
it.sephiroth.android.library.imagezoom
imagezoom
2.3.0
##Usage (Gradle)
dependencies {
compile 'it.sephiroth.android.library.imagezoom:imagezoom:+'
}##LICENSE
This software is provided under the MIT license:
http://opensource.org/licenses/mit-license.php##Author
[Alessandro Crugnola](http://blog.sephiroth.it)