All Projects → boycy815 → Pinchimageview

boycy815 / Pinchimageview

Licence: mit
体验非常好的Android图片手势控件。

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Pinchimageview

Zoomage
A simple pinch-to-zoom ImageView library for Android
Stars: ✭ 211 (-88.72%)
Mutual labels:  pinch-to-zoom, zoom, imageview
vue-inner-image-zoom
laurenashpole.github.io/vue-inner-image-zoom
Stars: ✭ 90 (-95.19%)
Mutual labels:  zoom-images, zoom
react-simple-image-zoom
Simple image zoom component for react
Stars: ✭ 12 (-99.36%)
Mutual labels:  zoom-images, zoomable-images
Zoom
Javascript library to do pinch zoom that preserves scale and rotation correctly.
Stars: ✭ 130 (-93.05%)
Mutual labels:  pinch-to-zoom, zoom
Pinchtozoom
Android's ImageView pinch-to-zoom made easy
Stars: ✭ 108 (-94.23%)
Mutual labels:  pinch-to-zoom, imageview
ZoomLayout
想要缩放、平移的 View,放在 ZoomLayout 中就可以实现了
Stars: ✭ 34 (-98.18%)
Mutual labels:  zoom-images, zoom
ngx-ionic-image-viewer
An Ionic 4 Angular component to view & zoom on images and photos without any additional dependencies.
Stars: ✭ 129 (-93.11%)
Mutual labels:  zoom, zoomable
Atgmediabrowser
Image slide-show viewer with multiple predefined transition styles, with ability to create new transitions with ease.
Stars: ✭ 186 (-90.06%)
Mutual labels:  pinch-to-zoom, zoom
Zoomlayout
2D zoom and pan behavior for View hierarchies, images, video streams, and much more, written in Kotlin for Android.
Stars: ✭ 688 (-63.23%)
Mutual labels:  pinch-to-zoom, imageview
Zoomy
Zoomy is an easy to use pinch-to-zoom Android library
Stars: ✭ 842 (-55%)
Mutual labels:  pinch-to-zoom, zoom
Stfalconimageviewer
A simple and customizable Android full-screen image viewer with shared image transition support, "pinch to zoom" and "swipe to dismiss" gestures
Stars: ✭ 1,734 (-7.32%)
Mutual labels:  pinch-to-zoom, zoom
FaceAware-Android
this helps to auto zoom for face on ImageView
Stars: ✭ 46 (-97.54%)
Mutual labels:  imageview, zoom
react-instagram-zoom-slider
🌄↔️ A slider component with pinch to zoom capabilities inspired by Instagram
Stars: ✭ 67 (-96.42%)
Mutual labels:  zoom, pinch-to-zoom
react-quick-pinch-zoom
A react component that providing multi-touch gestures for zooming and dragging on any DOM element.
Stars: ✭ 124 (-93.37%)
Mutual labels:  zoom, pinch-to-zoom
Photo view
📸 Easy to use yet very customizable zoomable image widget for Flutter, Photo View provides a gesture sensitive zoomable widget. Photo View is largely used to show interacive images and other stuff such as SVG.
Stars: ✭ 1,280 (-31.59%)
Mutual labels:  pinch-to-zoom, zoom
TNImageView-Android
Android Library for making scale-able and rotatable image views or giving this power to your own image view. This repo has been depreciated.
Stars: ✭ 18 (-99.04%)
Mutual labels:  imageview, pinch-to-zoom
Medium Zoom
🔎🖼 A JavaScript library for zooming images like Medium
Stars: ✭ 2,799 (+49.6%)
Mutual labels:  zoom, zoomable
React Native Zoomable View
A view component for react-native with pinch to zoom, tap to move and double tap to zoom capability.
Stars: ✭ 152 (-91.88%)
Mutual labels:  pinch-to-zoom, zoom
React Native Image View
Modal component to view images with zoom
Stars: ✭ 273 (-85.41%)
Mutual labels:  pinch-to-zoom, zoom
React Prismazoom
A pan and zoom component for React, using CSS transformations.
Stars: ✭ 29 (-98.45%)
Mutual labels:  pinch-to-zoom, zoom

PinchImageView

这是一个手势体验极棒但使用简单的ImageView控件,实现了手势放大缩小,平移等功能。PinchImageView继承于ImageView,可以在所有ImageView可以使用的情况下使用。全部的程序仅一个类文件,没有依赖任何特殊的外部库,非常易于集成。

QQ交流群:1011201647

Demo Video

demo

完整Demo视频:http://v.youku.com/v_show/id_XMTUyOTA0NzI3Ng==.html

APK下载:demo.apk

Demo说明

  1. 手势控件与ViewPlayer结合,当图片不在当前页时加载一张缩略图,切换到当前页后更新成大图。
  2. 点击缩略图切换到大图浏览使用放大动画过渡;当返回时从大图到缩略图使用动画过渡。无论大图到状态和小图的位置都保证过渡平滑。
  3. 浏览超大尺寸图片时使用分片加载策略保证不OOM。

Features

手势

  1. 单指滑动
  2. 单指滑动惯性
  3. 滑动触及边界停止
  4. 双击放大缩小
  5. 双击放大时双击点会尽量移动到控件中心
  6. 双手指手势放大缩小
  7. 缩放模式下可以移动图片
  8. 缩放模式下图片允许移动到边界之外
  9. 缩放模式下允许图片放大缩小超过边界尺寸
  10. 缩放模式下屏幕上有多于2个手指并且按照任意顺序抬起放下均不会引起错乱和不平滑
  11. 缩放模式下最后一个手指抬起如果图片处于边界之外或者尺寸过大过小会使用动画回弹到最接近的正确位置
  12. 回弹动画过程中允许立即通过手势进入缩放模式并且保持平滑

显示

  1. 允许显示任何ImageView能显示的内容,使用ImageView相同的api设置显示内容
  2. 允许任何情况下(包括手势进行中,动画进行中)替换显示内容(例如将低清图换成高清图),并且保持当前的缩放尺寸
  3. 允许设置矩形遮罩

扩展性

  1. 允许设置click,长按事件
  2. 允许设置图片大小位置变化的事件监听
  3. 允许获得图片当前变换过后的大小以及位置
  4. 允许获得PinchImageView当前的手势状态
  5. 允许通过api为图片执行缩放移动动画
  6. 允许通过api为图片遮罩执行移动缩放动画
  7. 允许通过override设置图片的最大放大尺寸
  8. 允许通过override设置图片双击之后要放大或缩小到的比例

Quick start

1) 将PinchImageView.java复制到项目中

2) 在布局文件中添加如下代码,它已经能显示一张资源中的图片了:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
    <com.boycy815.pinchimageview.PinchImageView
        android:id="@+id/pic"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:src="@drawable/my_pic"/>
</RelativeLayout>

2) 接下来你可以直接把它作为ImageView取出来使用:

//作为ImageView取出来
ImageView imageView = (ImageView)findViewById(R.id.pic);
//可以使用任何ImageView支持的方式设置图片
imageView.setImageResource(R.drawable.my_pic);
//or...
imageView.setImageBitmap(bitmap);
//or...
imageView.setImageDrawable(drawable);
//or 你还能使用第三方图片加载库加载图片,如ImageLoader
imageLoader.displayImage("http://host.com/my_pic.jpg", imageView);

end

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].