ImageViewZoom

Android ImageView widget with zoom and pan capabilities

Github星跟蹤圖

ImageViewTouch for Android

Badge

Build Status
Download

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

主要指標

概覽
名稱與所有者sephiroth74/ImageViewZoom
主編程語言Java
編程語言Java (語言數: 1)
平台
許可證Other
所有者活动
創建於2012-06-14 08:11:22
推送於2017-10-22 02:07:00
最后一次提交2017-07-01 01:04:08
發布數1
最新版本名稱version-2.2.5 (發布於 2016-03-21 04:29:31)
第一版名稱version-2.2.5 (發布於 2016-03-21 04:29:31)
用户参与
星數1.9k
關注者數110
派生數527
提交數120
已啟用問題?
問題數73
打開的問題數61
拉請求數13
打開的拉請求數13
關閉的拉請求數6
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?