TouchImageView - 是图像缩放的



我在github(https://github.com/MikeOrtiz/TouchImageView)上使用Mike Ortiz项目的TouchImageView并且工作正常。现在我想检查图像是否放大了。解释:如果用户放大图像,我必须阻止某些选项,并且仅在用户返回到原始缩放时再次启用这些选项。有什么办法吗?关于我应该检查什么属性的一些想法?我正在尝试使用保存规模和模式执行此操作,但不起作用。

就这么简单:

public boolean isZoomedOut () {
    return (saveScale == minScale);
}

变量 saveScale 会随时显示您的比例(默认情况下在 1x 到 3x 之间)

P.D.:对于对这个类有"新问题"的新用户,看看:https://github.com/MikeOrtiz/TouchImageView/issues

您可能会在那里找到解决方案。

最新更新