fix pulltozommview

androidx
Ztiany 5 years ago
parent 448c722023
commit 5d45f22bc0
  1. 3
      lib_base/src/main/java/com/android/base/widget/pulltozoom/PullToZoomScrollView.java

@ -232,7 +232,8 @@ public class PullToZoomScrollView extends NestedScrollView {
float addOffset = (height - mOriginContainerViewHeight) * mZoomFactory / mOriginContainerViewHeight;
float scale = height * 1.0F / mOriginContainerViewHeight + addOffset;
Timber.d("scale = %f", scale);
if (!Float.isInfinite(scale)) {
if (!Float.isInfinite(scale) && !Float.isNaN(scale)) {
mZoomView.setScaleX(scale);
mZoomView.setScaleY(scale);
} else {

Loading…
Cancel
Save