From f24744afe8090b13e3e3d79dbfd8d7c27da1fa7b Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Thu, 28 Mar 2024 09:50:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B5=8B=E8=AF=95=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/yunbao/live/bean/GuardUserModel.java | 11 +++++++++++ .../com/yunbao/live/views/NewGuardViewHolder.java | 10 +++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/live/src/main/java/com/yunbao/live/bean/GuardUserModel.java b/live/src/main/java/com/yunbao/live/bean/GuardUserModel.java index 798b29154..119181051 100644 --- a/live/src/main/java/com/yunbao/live/bean/GuardUserModel.java +++ b/live/src/main/java/com/yunbao/live/bean/GuardUserModel.java @@ -50,6 +50,17 @@ public class GuardUserModel extends BaseModel { private String guardName; @SerializedName("guard_img") private String guardImg; + @SerializedName("guard_level_card") + private String guardLevelCard; + + public String getGuardLevelCard() { + return guardLevelCard; + } + + public GuardUserModel setGuardLevelCard(String guardLevelCard) { + this.guardLevelCard = guardLevelCard; + return this; + } public int getId() { return id; diff --git a/live/src/main/java/com/yunbao/live/views/NewGuardViewHolder.java b/live/src/main/java/com/yunbao/live/views/NewGuardViewHolder.java index 16c03320c..5bada6b2d 100644 --- a/live/src/main/java/com/yunbao/live/views/NewGuardViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/NewGuardViewHolder.java @@ -1,5 +1,6 @@ package com.yunbao.live.views; +import android.text.TextUtils; import android.view.View; import android.widget.ImageView; import android.widget.TextView; @@ -52,7 +53,14 @@ public class NewGuardViewHolder extends RecyclerView.ViewHolder { user_nicename.setText(guardUserModel.getUserNicename()); userSex.setImageResource(CommonIconUtil.getSexIcon(guardUserModel.getSex())); guardLevel.setText(String.valueOf(guardUserModel.getGuardLevel())); - ImgLoader.display(itemView.getContext(), guardUserModel.getGuardImg(), tagKing); + contribution.setText(guardUserModel.getContribute()); + + if (TextUtils.equals(guardUserModel.getGuardLevelCard(),"0")){ + ImgLoader.display(itemView.getContext(), guardUserModel.getGuardImg(), tagKing); + }else { + ImgLoader.display(itemView.getContext(), guardUserModel.getGuardImg(), tagKing); + } + } }