使Fresco可以支持手势放大图片, 源码从Fresco的sample中提取的, 只是为了方便引入
ZoomableDraweeView draweeView = (ZoomableDraweeView) findViewById(R.id.zoomable_view);
draweeView.setAllowTouchInterceptionWhileZoomed(true);
DraweeController controller = Fresco.newDraweeControllerBuilder()
.setUri(imageUri)
.build();
draweeView.setController(controller);
To get a Git project into your build:
allprojects {
repositories {
...
maven { url "https://jitpack.io" }
}
}
dependencies {
compile 'com.github.XuDaojie:FrescoZoomable:v0.1.0'
compile 'com.facebook.fresco:fresco:0.14.1'
//compile('com.facebook.fresco:fresco:0.14.1', {
// exclude group: 'com.android.support'
//})
}