Skip to content

Commit 94adc82

Browse files
committed
0.43版本 修复了图片放大到最大的时候崩溃的问题等
1 parent 691a324 commit 94adc82

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,10 @@ PhotoViewer
9090

9191
## 更新日志
9292

93+
### 0.43
94+
95+
修复了图片放大到最大点击退出崩溃的问题
96+
9397
### 0.42
9498

9599
增加了指示器样式的选择,`setIndicatorType(PhotoViewer.INDICATOR_TYPE_DOT/INDICATOR_TYPE_TEXT)`

photoviewer/src/main/java/com/wanglu/photoviewerlibrary/PhotoViewer.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ package com.wanglu.photoviewerlibrary
33
import android.animation.LayoutTransition
44
import android.animation.ObjectAnimator
55
import android.annotation.SuppressLint
6+
import android.app.Fragment
67
import android.graphics.Color
78
import android.os.Bundle
8-
import android.support.v4.app.Fragment
99
import android.support.v4.view.ViewPager
1010
import android.support.v7.app.AppCompatActivity
1111
import android.support.v7.widget.GridLayoutManager
@@ -286,7 +286,7 @@ object PhotoViewer {
286286
b.putIntArray("img_size", intArrayOf(getItemView().measuredWidth, getItemView().measuredHeight))
287287
b.putBoolean("in_anim", false)
288288
b.putIntArray("exit_location", getCurrentViewLocation())
289-
fragments[position].arguments = b
289+
fragments[currentPage].arguments = b
290290
}, 200)
291291

292292
}

photoviewer/src/main/java/com/wanglu/photoviewerlibrary/photoview/PhotoViewAttacher.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -539,9 +539,9 @@ public void setScale(float scale, boolean animate) {
539539
public void setScale(float scale, float focalX, float focalY,
540540
boolean animate) {
541541
// Check to see if the scale is within bounds
542-
if (scale > mMaxScale) {
543-
throw new IllegalArgumentException("Scale must be within the range of minScale and maxScale");
544-
}
542+
// if (scale > mMaxScale) {
543+
// throw new IllegalArgumentException("Scale must be within the range of minScale and maxScale");
544+
// }
545545

546546
if (animate) {
547547
mImageView.post(new AnimatedZoomRunnable(getScale(), scale,

0 commit comments

Comments
 (0)