Skip to content

Commit

Permalink
Fix bug: about photoview
Browse files Browse the repository at this point in the history
  • Loading branch information
Hitomis committed Jun 22, 2017
1 parent 66eb2bb commit f1a0407
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,12 @@ private void initBase() {
}

mFromInfo = null;

if (imgh > imgw * 3) { // 判定是否为竖长图
mAnimaMatrix.postTranslate(0, -mImgRect.top);
mTranslateY -= mImgRect.top;
executeTranslate();
}
}

private void initCenter() {
Expand Down Expand Up @@ -684,6 +690,10 @@ public boolean onScale(ScaleGestureDetector detector) {
return false;

mScale *= scaleFactor;
if (mScale > 1.0f)
isZoonUp = true;
else
isZoonUp = false;
// mScaleCenter.set(detector.getFocusX(), detector.getFocusY());
mAnimaMatrix.postScale(scaleFactor, scaleFactor, detector.getFocusX(), detector.getFocusY());
executeTranslate();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class GlideNoThumActivity extends BaseActivity {
sourceImageList.add("http://t2.27270.com/uploads/tu/201612/562/lua4uwojfds.jpg");
sourceImageList.add("http://t2.27270.com/uploads/tu/201612/562/4hp4d1fcocu.jpg");
sourceImageList.add("http://t2.27270.com/uploads/tu/201612/562/d2madqozild.jpg");
sourceImageList.add("http://t2.27270.com/uploads/tu/201603/250/gl55chlleh1.jpg");
sourceImageList.add("http://ww1.sinaimg.cn/large/9be2329dgw1etlyb1yu49j20c82p6qc1.jpg");

}

Expand Down

0 comments on commit f1a0407

Please sign in to comment.