diff --git a/app/build.gradle b/app/build.gradle index 11d1f4dee..b23a63f19 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -24,4 +24,5 @@ dependencies { testCompile 'junit:junit:4.12' compile 'com.android.support:appcompat-v7:23.1.1' compile 'com.github.bumptech.glide:glide:3.7.0' + compile 'com.commit451:PhotoView:1.2.4' } diff --git a/app/src/main/java/gallery/simplemobiletools/com/adapters/MyPagerAdapter.java b/app/src/main/java/gallery/simplemobiletools/com/adapters/MyPagerAdapter.java index f22f4a7ab..a2916f131 100644 --- a/app/src/main/java/gallery/simplemobiletools/com/adapters/MyPagerAdapter.java +++ b/app/src/main/java/gallery/simplemobiletools/com/adapters/MyPagerAdapter.java @@ -12,6 +12,7 @@ import com.bumptech.glide.Glide; import java.util.List; import gallery.simplemobiletools.com.R; +import uk.co.senab.photoview.PhotoViewAttacher; public class MyPagerAdapter extends PagerAdapter { private final Context context; @@ -40,6 +41,7 @@ public class MyPagerAdapter extends PagerAdapter { final ImageView imageView = (ImageView) view.findViewById(R.id.photo); Glide.with(context).load(paths.get(position)).fitCenter().crossFade().into(imageView); container.addView(view); + new PhotoViewAttacher(imageView); return view; }