LuckyJayce / LargeImage

Android 加载大图 可以高清显示10000*10000像素的图片,轻松实现微博长图功能
Apache License 2.0
2.33k stars 416 forks source link

是否可以禁止手势放大 #59

Open WZRRRRRR opened 5 years ago

WZRRRRRR commented 5 years ago

如题

Colcode commented 4 years ago

// 大图--禁止双指缩放功能

largeImageView.setCriticalScaleValueHook(new LargeImageView.CriticalScaleValueHook() {

   @Override
public float getMinScale(LargeImageView largeImageView, int imageWidth, 
        int imageHeight, float suggestMinScale) {
    return 1;// 最小缩放系数
}

@Override
public float getMaxScale(LargeImageView largeImageView, int imageWidth,
        int imageHeight, float suggestMaxScale) {
    return 1;// 最大缩放系数
}

});

WZRRRRRR commented 4 years ago

好的 十分感谢

woshiwangzeran

邮箱:woshiwangzeran@163.com |

Signature is customized by Netease Mail Master

在2020年05月25日 17:51,Colcode 写道:

// 大图--禁止双指缩放功能 largeImageView.setCriticalScaleValueHook(new LargeImageView.CriticalScaleValueHook() { @override public float getMinScale(LargeImageView largeImageView, int imageWidth, int imageHeight, float suggestMinScale) { return 1;// 最小缩放系数 }

@Override

public float getMaxScale(LargeImageView largeImageView, int imageWidth, int imageHeight, float suggestMaxScale) {

return 1;// 最大缩放系数

}

});

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.