Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
H

Hierarchical

> 编程语言
Open source

Java library for approximate nearest neighbors search using Hierarchical Navigable Small World graphs

200 stars0 likes1 views
WebsiteGitHub

About

Java library for approximate nearest neighbors search using Hierarchical Navigable Small World graphs

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 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Java

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category编程语言
PricingOpen source

> Related tools

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