From e69be60d43c870136aa39d4cb2a5e5dcb11a3d60 Mon Sep 17 00:00:00 2001 From: hch <16607480311@163.com> Date: Tue, 26 Mar 2024 17:53:10 +0800 Subject: [PATCH] =?UTF-8?q?add=20[=E6=96=B0=E5=A2=9E-=E4=B8=AA=E4=BA=BA?= =?UTF-8?q?=E4=B8=BB=E9=A1=B5-=E7=82=B9=E5=87=BB=E5=9B=BE=E7=89=87?= =?UTF-8?q?=E5=B1=95=E7=A4=BA1]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/activity/UserHomeActivity.java | 26 ++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/main/src/main/java/com/yunbao/main/activity/UserHomeActivity.java b/main/src/main/java/com/yunbao/main/activity/UserHomeActivity.java index 172771662..432696150 100644 --- a/main/src/main/java/com/yunbao/main/activity/UserHomeActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/UserHomeActivity.java @@ -45,6 +45,7 @@ import com.yunbao.common.bean.HomeUserExhibitInfoBean; import com.yunbao.common.bean.HomeUserInfoBean; import com.yunbao.common.bean.LabelBean; import com.yunbao.common.bean.UserHomeImgBean; +import com.yunbao.common.dialog.ImagePreviewDialog; import com.yunbao.common.glide.ImgLoader; import com.yunbao.common.http.CommonHttpUtil; import com.yunbao.common.http.base.HttpCallback; @@ -61,6 +62,7 @@ import com.yunbao.common.utils.StringUtil; import com.yunbao.common.utils.ToastUtil; import com.yunbao.common.utils.WordUtil; import com.yunbao.common.views.UserHomeImgsViewHolder; +import com.yunbao.live.views.ShowBigPhoto; import java.io.File; import java.util.ArrayList; @@ -140,6 +142,8 @@ public class UserHomeActivity extends AbsActivity { private UploadQnImpl mUploadStrategy; private List videoList = new ArrayList<>(); + private UserHomeImgsViewHolder userHomeImgsViewHolder; + @Override protected int getLayoutId() { return R.layout.activity_user_home; @@ -359,7 +363,27 @@ public class UserHomeActivity extends AbsActivity { }); } }); - mBanner.setAutoPlay(false).setPages(bannerImgList, new UserHomeImgsViewHolder()).setOnPageChangeListener(new ViewPager.OnPageChangeListener() { + + userHomeImgsViewHolder = new UserHomeImgsViewHolder(); + userHomeImgsViewHolder.setOnCLickListener(new UserHomeImgsViewHolder.onCLickListener() { + @Override + public void OnClick(int position) { + ImagePreviewDialog dialog = new ImagePreviewDialog(); + dialog.setImageInfo(bannerImgList.size(), position, false, new ImagePreviewDialog.ActionListener() { + @Override + public void loadImage(ImageView imageView, int position) { + ImgLoader.display(mContext, (String) (bannerImgList.get(position)), imageView); + } + + @Override + public void onDeleteClick(int position) { + + } + }); + dialog.show(((AbsActivity) mContext).getSupportFragmentManager(), "ImagePreviewDialog"); + } + }); + mBanner.setAutoPlay(false).setPages(bannerImgList, userHomeImgsViewHolder).setOnPageChangeListener(new ViewPager.OnPageChangeListener() { @Override public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {