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) {