百科.dev
全部条目AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
I

ImageViewZoom

> 编程语言
开源

具有缩放和平移功能的 Android ImageView 小组件

1.9K stars0 点赞0 次浏览
访问官网GitHub

工具介绍

具有缩放和平移功能的 Android ImageView 小组件

ImageViewTouch for Android === [ ](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)

GitHub Issues· 0 开放

在 GitHub 查看全部

暂无开放 Issues,或尚未同步最近议题。

核心特点

  • •setImageBitmap( final Bitmap bitmap, Matrix matrix );
  • •setImageBitmap( final Bitmap bitmap, Matrix matrix, float minZoom, float maxZoom );
  • •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.

> 标签

Java

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言