Skip to content

Commit

Permalink
修改bug 修改方法
Browse files Browse the repository at this point in the history
  • Loading branch information
yangchaojiang committed Mar 30, 2021
1 parent 751412e commit e45614c
Show file tree
Hide file tree
Showing 11 changed files with 82 additions and 8 deletions.
Binary file modified .idea/caches/build_file_checksums.ser
Binary file not shown.
3 changes: 3 additions & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

45 changes: 45 additions & 0 deletions .idea/jarRepositories.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ImagePreview/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ publish {
repoName = "yangjiang" //仓库名
groupId = 'com.ycjiang'
artifactId = 'ImagePreview'
publishVersion = '2.3.5'
publishVersion = '2.3.7'
desc = 'The project by the Google official demo Zooming a View inspired to achieve a click on the thumbnail zoom to full screen preview, \' +\n' +
' \'exit the full screen to restore the original location of the two processes of the animation transition.\' +\n' +
' \' Common application scenes such as WeChat friends circle photo Jiugongge and WeChat chat picture preview, some mobile phone system album, \' +\n' +
Expand Down
24 changes: 24 additions & 0 deletions ImagePreview/src/main/java/com/previewlibrary/GPreviewBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ public GPreviewBuilder setType(@NonNull IndicatorType indicatorType) {
}

/***
* @deprecated use {@link #isDisableDrag(boolean) }
* 设置图片禁用拖拽返回
* @param isDrag true 可以 false 默认 true
* @return GPreviewBuilder
Expand All @@ -134,12 +135,35 @@ public GPreviewBuilder setDrag(boolean isDrag) {
intent.putExtra("isDrag", isDrag);
return this;
}
/***
* 设置图片禁用拖拽返回
* @param isDrag true 可以 false 默认 true
* @return GPreviewBuilder
* **/
public GPreviewBuilder isDisableDrag(boolean isDrag) {
intent.putExtra("isDrag", isDrag);
return this;
}

/***
* 设置图片禁用拖拽返回
* @param isDrag true 可以 false 默认 true
* @param sensitivity sensitivity MAX_TRANS_SCALE 的值来控制灵敏度。
* @return GPreviewBuilder
* **/
public GPreviewBuilder isDisableDrag(boolean isDrag, float sensitivity) {
intent.putExtra("isDrag", isDrag);
intent.putExtra("sensitivity", sensitivity);
return this;
}

/***
* @deprecated use {@link #isDisableDrag(boolean,float) }
* 设置图片禁用拖拽返回
* @param isDrag true 可以 false 默认 true
* @param sensitivity sensitivity MAX_TRANS_SCALE 的值来控制灵敏度。
* @return GPreviewBuilder
*
* **/
public GPreviewBuilder setDrag(boolean isDrag, float sensitivity) {
intent.putExtra("isDrag", isDrag);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ public static int getColorWithAlpha(float alpha, int baseColor) {
}

public void transformIn() {
assert imageView != null;
imageView.transformIn(new SmoothImageView.onTransformListener() {
@Override
public void onTransformCompleted(SmoothImageView.Status status) {
Expand All @@ -269,6 +270,7 @@ public void onTransformCompleted(SmoothImageView.Status status) {
}

public void transformOut(SmoothImageView.onTransformListener listener) {
assert imageView != null;
imageView.transformOut(listener);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ public PhotoViewAttacher(ImageView imageView, boolean zoomable) {
// forward long click listener
@Override
public void onLongPress(MotionEvent e) {
if (null != mLongClickListener&&getImageView().getY()==0&& getImageView().getX()==0) {
if (null!=getImageView()&&null != mLongClickListener&&getImageView().getY()==0&& getImageView().getX()==0) {
mLongClickListener.onLongClick(getImageView());
}
}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
通过Gradle抓取:

```grade
compile 'com.ycjiang:ImagePreview:2.3.5'
compile 'com.ycjiang:ImagePreview:2.3.7'
```

### 1.本项目类库依赖第三库,()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public void onItemClick(AdapterView<?> parent, View view, int position, long id)
.setUserFragment(UserFragment.class)
.setCurrentIndex(position)
.setSingleFling(false)
.setDrag(false)
.isDisableDrag(false)
.setType(GPreviewBuilder.IndicatorType.Dot)
.start();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public void onItemClick(AdapterView<?> parent, View view, int position, long id)
GPreviewBuilder.from(ListView2Activity.this)
.setData(mThumbViewInfoList)
.setCurrentIndex(position)
.setDrag(true,0.6f)
.isDisableDrag(true,0.6f)
.setType(GPreviewBuilder.IndicatorType.Number)
.start();
}
Expand Down

0 comments on commit e45614c

Please sign in to comment.