Closed hu670014125 closed 6 years ago
谢谢,我试试
我想了一下 这个缩放比例 最好是,能让双击后, 展示的高度 等于 屏幕高度, 就完美了。 我在研究一下, 还有 fling 好像也有点问题。
这个是可以的
//图片在双击的时候放大的倍数,如果图片过长看不放大根本看不见
final float scale = viewState.width / viewState.height;
float maxScale = MAX_SCALE;
if (scale > 2.0f) {
maxScale = MAX_SCALE * scale / 2;
}
expectedScale = (maxScale - vsDefault.scaleX) * 0.4f + vsDefault.scaleX;
maxScale = MAX_SCALE * scale / 2;
不除2就等屏幕高度了,但是可能会模糊所以我测试的时候才除2的
已经把逻辑合到源码里,下次你可以pull 啊
横向超长图片双击无法看清楚的问题 比如:http://image.xcar.com.cn/attachments/a/day_20141126/2014112609_68d9843ed0c3e1d05735CObUWVqIy3rr.jpg 这个长图,双击根本看不清楚 修复代码: ImageWatcher.java->handleDoubleTapTouchResult()
if (vsCurrent.scaleY <= vsDefault.scaleY && vsCurrent.scaleX <= vsDefault.scaleX) {
希望可以请求合并