add PhotoView for pinch zooming fullscreen images
This commit is contained in:
parent
ef241a1c5d
commit
a32de3c5ca
2 changed files with 3 additions and 0 deletions
|
@ -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'
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue