From 04b720311cc4430cd0249522b5161e8865ac136c Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Mon, 8 Aug 2022 10:33:57 +0800 Subject: [PATCH] =?UTF-8?q?=E7=8C=9C=E4=BD=A0=E5=96=9C=E6=AC=A2=E8=B7=B3?= =?UTF-8?q?=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/SearchRecommendBodyItemViewHolder.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/main/src/main/java/com/yunbao/main/views/SearchRecommendBodyItemViewHolder.java b/main/src/main/java/com/yunbao/main/views/SearchRecommendBodyItemViewHolder.java index bbc4b60ce..5080bb66b 100644 --- a/main/src/main/java/com/yunbao/main/views/SearchRecommendBodyItemViewHolder.java +++ b/main/src/main/java/com/yunbao/main/views/SearchRecommendBodyItemViewHolder.java @@ -12,10 +12,13 @@ import androidx.recyclerview.widget.RecyclerView; import com.squareup.picasso.Picasso; import com.yunbao.common.Constants; import com.yunbao.common.bean.AnchorRecommendItemModel; +import com.yunbao.common.bean.SearchModel; import com.yunbao.common.custom.RatioRoundImageView; import com.yunbao.common.glide.ImgLoader; +import com.yunbao.common.utils.Bus; import com.yunbao.common.utils.formatBigNum; import com.yunbao.main.R; +import com.yunbao.main.event.JumpUserHomeEvent; import com.yunbao.main.utils.MainIconUtil; public class SearchRecommendBodyItemViewHolder extends RecyclerView.ViewHolder { @@ -43,6 +46,7 @@ public class SearchRecommendBodyItemViewHolder extends RecyclerView.ViewHolder { drPkIco = (ImageView) itemView.findViewById(R.id.dr_pk_ico); pkAvatar = (ImageView) itemView.findViewById(R.id.pk_avatar); + } public void showData(AnchorRecommendItemModel model, int height) { @@ -102,5 +106,13 @@ public class SearchRecommendBodyItemViewHolder extends RecyclerView.ViewHolder { liveType.setVisibility(View.GONE); mNum.setVisibility(View.GONE); } + mCover.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + SearchModel searchModel = new SearchModel(); + searchModel.setId(model.getUid()); + Bus.get().post(new JumpUserHomeEvent(searchModel)); + } + }); } }