diff --git a/common/src/main/java/com/yunbao/common/bean/PkRankBean.java b/common/src/main/java/com/yunbao/common/bean/PkRankBean.java index ddca3a2ad..dcff7de27 100644 --- a/common/src/main/java/com/yunbao/common/bean/PkRankBean.java +++ b/common/src/main/java/com/yunbao/common/bean/PkRankBean.java @@ -21,6 +21,8 @@ public class PkRankBean extends BaseModel { public String pkTopImgUrl; @SerializedName("link") public String clickUrl; + @SerializedName("vs_img") + public String vsImgUrl; public int getId() { return id; @@ -84,6 +86,14 @@ public class PkRankBean extends BaseModel { this.clickUrl = clickUrl; } + public String getVsImgUrl() { + return vsImgUrl; + } + + public void setVsImgUrl(String vsImgUrl) { + this.vsImgUrl = vsImgUrl; + } + @Override public String toString() { return "PkRankBean{" + @@ -94,6 +104,7 @@ public class PkRankBean extends BaseModel { ", blueVal='" + blueVal + '\'' + ", pkTopImgUrl='" + pkTopImgUrl + '\'' + ", clickUrl='" + clickUrl + '\'' + + ", vsImgUrl='" + vsImgUrl + '\'' + '}'; } } diff --git a/common/src/main/res/mipmap-mdpi/icon_pk_rank.png b/common/src/main/res/mipmap-mdpi/icon_pk_rank.png deleted file mode 100644 index afb95207b..000000000 Binary files a/common/src/main/res/mipmap-mdpi/icon_pk_rank.png and /dev/null differ diff --git a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java index 0e560dd2f..79eee4c8b 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java @@ -1547,15 +1547,19 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis textParams.setMarginStart(DpUtil.dp2px(3)); View hourView = LayoutInflater.from(mContext).inflate(R.layout.view_wish_list, null); - ImageView titleIcon = new ImageView(mContext); + View titleView = LayoutInflater.from(mContext).inflate(R.layout.view_wish_list, null); + ImageView titleIcon =titleView.findViewById(R.id.wish_pic); + TextView titleText =titleView.findViewById(R.id.wish_index); mPkRankIcon = hourView.findViewById(R.id.wish_pic); mPkRankText = hourView.findViewById(R.id.wish_index); mPkRankText.setLayoutParams(textParams); mPkRankText.setGravity(Gravity.START); - titleIcon.setImageResource(R.mipmap.icon_pk_rank); - titleIcon.setLayoutParams(new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT)); + ImgLoader.display(mContext,bean.getVsImgUrl(),titleIcon); + titleText.setText("PK天梯赛"); + titleText.setLayoutParams(textParams); + titleIcon.setLayoutParams(params); mPkRankIcon.setLayoutParams(params); - pkRankVf.addView(titleIcon); + pkRankVf.addView(titleView); pkRankVf.addView(hourView); pkRankVf.startFlipping(); pkRankVf.setOnClickListener(v -> { diff --git a/live/src/main/res/layout/view_live_room.xml b/live/src/main/res/layout/view_live_room.xml index 4e6a6ef53..f6aa8df79 100644 --- a/live/src/main/res/layout/view_live_room.xml +++ b/live/src/main/res/layout/view_live_room.xml @@ -517,7 +517,7 @@