Commit 595a51fb4dcc244a92523042745846ab514396c2

Authored by 韩亚云
1 parent 68504ce2

处理图片全屏预览拖拽监听事件

core/imageload/src/main/java/com/cnlive/core/ui/view/PreViewImageView.java
... ... @@ -27,6 +27,7 @@ import com.cnlive.core.imageload.preview.router.PreviewRouters;
27 27 import com.cnlive.core.imageload.preview.widget.CustomTipDialog;
28 28 import com.cnlive.core.imageload.preview.widget.DownloadUtil;
29 29 import com.cnlive.core.imageload.util.DownLoadImageService;
  30 +import com.cnlive.core.imagepreview.listener.OnDragStatusListener;
30 31 import com.cnlive.core.imagepreview.listener.OnItemLongPressListener;
31 32 import com.cnlive.core.libs.base.frame.view.BaseView;
32 33 import com.cnlive.core.libs.base.interfaces.OnPermissionResponseListener;
... ... @@ -84,8 +85,6 @@ public class PreViewImageView extends BaseView {
84 85 if (TextUtils.isEmpty(activity.type)) {
85 86 showError();
86 87 }
87   -
88   -
89 88 if (activity.type.equals("1")) {
90 89 preViewImgList = activity.data.getPicInfoList();
91 90 if (preViewImgList.size() == 1) {
... ... @@ -111,6 +110,14 @@ public class PreViewImageView extends BaseView {
111 110 activity.binding.imagePre.overlayStatusBar(false)
112 111 .imageData(activity.picList)
113 112 .playExitAnim(false);
  113 + activity.binding.imagePre.setOnDragStatusListener(new OnDragStatusListener() {
  114 + @Override
  115 + public void onDragStatusChanged(int status) {
  116 + if(status == 8){
  117 + activity.finish();
  118 + }
  119 + }
  120 + });
114 121 activity.binding.imagePre.watch(activity.position);
115 122 activity.binding.imagePre.setOnItemLongPressListener(new OnItemLongPressListener() {
116 123 @Override
... ...