Commit 433f4cf215da031b83e8a8c89c9ba8315ba4da1f
Merge branch 'master' of http://bj.gitlab.cnlive.com/cnlive-team/newModuleStrike
Showing
1 changed file
with
9 additions
and
2 deletions
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,6 +27,7 @@ import com.cnlive.core.imageload.preview.router.PreviewRouters; | ||
| 27 | import com.cnlive.core.imageload.preview.widget.CustomTipDialog; | 27 | import com.cnlive.core.imageload.preview.widget.CustomTipDialog; |
| 28 | import com.cnlive.core.imageload.preview.widget.DownloadUtil; | 28 | import com.cnlive.core.imageload.preview.widget.DownloadUtil; |
| 29 | import com.cnlive.core.imageload.util.DownLoadImageService; | 29 | import com.cnlive.core.imageload.util.DownLoadImageService; |
| 30 | +import com.cnlive.core.imagepreview.listener.OnDragStatusListener; | ||
| 30 | import com.cnlive.core.imagepreview.listener.OnItemLongPressListener; | 31 | import com.cnlive.core.imagepreview.listener.OnItemLongPressListener; |
| 31 | import com.cnlive.core.libs.base.frame.view.BaseView; | 32 | import com.cnlive.core.libs.base.frame.view.BaseView; |
| 32 | import com.cnlive.core.libs.base.interfaces.OnPermissionResponseListener; | 33 | import com.cnlive.core.libs.base.interfaces.OnPermissionResponseListener; |
| @@ -84,8 +85,6 @@ public class PreViewImageView extends BaseView { | @@ -84,8 +85,6 @@ public class PreViewImageView extends BaseView { | ||
| 84 | if (TextUtils.isEmpty(activity.type)) { | 85 | if (TextUtils.isEmpty(activity.type)) { |
| 85 | showError(); | 86 | showError(); |
| 86 | } | 87 | } |
| 87 | - | ||
| 88 | - | ||
| 89 | if (activity.type.equals("1")) { | 88 | if (activity.type.equals("1")) { |
| 90 | preViewImgList = activity.data.getPicInfoList(); | 89 | preViewImgList = activity.data.getPicInfoList(); |
| 91 | if (preViewImgList.size() == 1) { | 90 | if (preViewImgList.size() == 1) { |
| @@ -111,6 +110,14 @@ public class PreViewImageView extends BaseView { | @@ -111,6 +110,14 @@ public class PreViewImageView extends BaseView { | ||
| 111 | activity.binding.imagePre.overlayStatusBar(false) | 110 | activity.binding.imagePre.overlayStatusBar(false) |
| 112 | .imageData(activity.picList) | 111 | .imageData(activity.picList) |
| 113 | .playExitAnim(false); | 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 | activity.binding.imagePre.watch(activity.position); | 121 | activity.binding.imagePre.watch(activity.position); |
| 115 | activity.binding.imagePre.setOnItemLongPressListener(new OnItemLongPressListener() { | 122 | activity.binding.imagePre.setOnItemLongPressListener(new OnItemLongPressListener() { |
| 116 | @Override | 123 | @Override |