调整天梯赛大小

This commit is contained in:
zlzw 2022-11-17 17:12:41 +08:00
parent 1ee335abf2
commit 62ed0ae78e
4 changed files with 20 additions and 5 deletions

View File

@ -21,6 +21,8 @@ public class PkRankBean extends BaseModel {
public String pkTopImgUrl; public String pkTopImgUrl;
@SerializedName("link") @SerializedName("link")
public String clickUrl; public String clickUrl;
@SerializedName("vs_img")
public String vsImgUrl;
public int getId() { public int getId() {
return id; return id;
@ -84,6 +86,14 @@ public class PkRankBean extends BaseModel {
this.clickUrl = clickUrl; this.clickUrl = clickUrl;
} }
public String getVsImgUrl() {
return vsImgUrl;
}
public void setVsImgUrl(String vsImgUrl) {
this.vsImgUrl = vsImgUrl;
}
@Override @Override
public String toString() { public String toString() {
return "PkRankBean{" + return "PkRankBean{" +
@ -94,6 +104,7 @@ public class PkRankBean extends BaseModel {
", blueVal='" + blueVal + '\'' + ", blueVal='" + blueVal + '\'' +
", pkTopImgUrl='" + pkTopImgUrl + '\'' + ", pkTopImgUrl='" + pkTopImgUrl + '\'' +
", clickUrl='" + clickUrl + '\'' + ", clickUrl='" + clickUrl + '\'' +
", vsImgUrl='" + vsImgUrl + '\'' +
'}'; '}';
} }
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

View File

@ -1547,15 +1547,19 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
textParams.setMarginStart(DpUtil.dp2px(3)); textParams.setMarginStart(DpUtil.dp2px(3));
View hourView = LayoutInflater.from(mContext).inflate(R.layout.view_wish_list, null); 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); mPkRankIcon = hourView.findViewById(R.id.wish_pic);
mPkRankText = hourView.findViewById(R.id.wish_index); mPkRankText = hourView.findViewById(R.id.wish_index);
mPkRankText.setLayoutParams(textParams); mPkRankText.setLayoutParams(textParams);
mPkRankText.setGravity(Gravity.START); mPkRankText.setGravity(Gravity.START);
titleIcon.setImageResource(R.mipmap.icon_pk_rank); ImgLoader.display(mContext,bean.getVsImgUrl(),titleIcon);
titleIcon.setLayoutParams(new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT)); titleText.setText("PK天梯赛");
titleText.setLayoutParams(textParams);
titleIcon.setLayoutParams(params);
mPkRankIcon.setLayoutParams(params); mPkRankIcon.setLayoutParams(params);
pkRankVf.addView(titleIcon); pkRankVf.addView(titleView);
pkRankVf.addView(hourView); pkRankVf.addView(hourView);
pkRankVf.startFlipping(); pkRankVf.startFlipping();
pkRankVf.setOnClickListener(v -> { pkRankVf.setOnClickListener(v -> {

View File

@ -517,7 +517,7 @@
<LinearLayout <LinearLayout
android:id="@+id/live_rank_pk" android:id="@+id/live_rank_pk"
android:layout_width="80dp" android:layout_width="70dp"
android:layout_height="20dp" android:layout_height="20dp"
android:layout_alignTop="@id/hour_rank_layout" android:layout_alignTop="@id/hour_rank_layout"
android:layout_alignParentEnd="true" android:layout_alignParentEnd="true"