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)); + } + }); } }