1.PhotoView的介绍:
PhotoView的github地址:
https://github.com/chrisbanes/PhotoView
PhotoView特性:
支持单点/多点触摸,即时缩放图片;
支持平滑滚动;
在滑动父控件下能够运行良好;(例如:ViewPager)
当用户的触点改变时可以触发通知。
PhotoView的详解,请参考PhotoView源码剖析
2.上Demo源码:
ViewPager的布局:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<include layout="@layout/toolbar_title"
android:id="@+id/toolbar_title"/>
<com.dgaotech.dgfw.widget.ImageViewPager
android:id="@+id/img_viewpager"
android:layout_below="@+id/toolbar_title"
android:layout_wid