dependencies {
compile 'it.sephiroth.android.library.imagezoom:imagezoom:+'
}
private void initView() {
ImageView imageView = (ImageView) findViewById(R.id.image);
imageView.setImageDrawable(getResources().getDrawable(R.drawable.subwaymap));
}
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.pku.ipku.ui.setting.PkuMap">
<it.sephiroth.android.library.imagezoom.ImageViewTouch
android:id="@+id/image"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</RelativeLayout>