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

Hierarchical

> 编程语言
开源

使用层次可导航小世界图进行近似最近邻搜索的 Java 库

200 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

使用层次可导航小世界图进行近似最近邻搜索的 Java 库

PinchImageView

English | 简体中文

A gesture-friendly and easy-to-use image pinch-zoom control. It extends ImageView, is contained in a single class file, has no external dependencies, and is lightweight and easy to integrate.

Demo

Demo Description

  1. Integrated with ViewPlayer, preloads thumbnail images when the image is not on the current page, and switches to high-definition images when the page is in view.
  2. Transition animations between thumbnail and full-size image viewing modes.
  3. Loads extremely large images in segments.

Features

Gestures

  1. Single-finger swipe
  2. Single-finger swipe inertia
  3. Swipe stops at the boundary
  4. Double-tap to zoom in and out
  5. When double-tapping to zoom in, the tap point is centered as much as possible
  6. Pinch-zoom with two fingers to enter zoom mode
  7. In zoom mode, the image can be moved
  8. In zoom mode, the image can be moved beyond the boundaries
  9. In zoom mode, the image can be zoomed in or out beyond the boundary size
  10. Exit zoom mode (all fingers lifted), and the image rebounds to the nearest appropriate position

Display

  1. Compatible with ImageView API
  2. Supports image resolution switching
  3. Rectangular mask overlay

Extensibility

  1. Click and long-press events
  2. Listeners for image size and position changes
  3. Get current size and position
  4. Get current gesture state
  5. API to perform image zoom and move animations
  6. API to perform mask move and zoom animations
  7. Override to set the maximum zoom size for images
  8. Override to set the scale for zooming in or out after double-tap

Quick Start

1) Copy PinchImageView.java into your project.

2) Add the following code to your layout file; it can already display an image from resources:

3) Use it directly as an ImageView:

// Retrieve it as an ImageView
ImageView imageView = (ImageView) findViewById(R.id.pic);
// You can set the image using any method supported by ImageView
imageView.setImageResource(R.drawable.my_pic);
// or...
imageView.setImageBitmap(bitmap);
// or...
imageView.setImageDrawable(drawable);
// or you can even use third-party image loading libraries, like ImageLoader
imageLoader.displayImage("http://host.com/my_pic.jpg", imageView);

Issues· 0 开放

查看全部 Issues在 GitHub 打开

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

> 标签

Java

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

> 工具信息

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

> 相关工具

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