修复排行榜没有位置时依旧显示钻石图标的问题

This commit is contained in:
zlzw 2022-11-17 17:32:51 +08:00
parent a61a41a068
commit c949667b94
2 changed files with 16 additions and 3 deletions

View File

@ -203,6 +203,9 @@ public abstract class AbsMainListChildViewHolder extends AbsMainViewHolder imple
ImageView mLevel1; ImageView mLevel1;
ImageView mLevel2; ImageView mLevel2;
ImageView mLevel3; ImageView mLevel3;
ImageView diamond1;
ImageView diamond2;
ImageView diamond3;
MyRadioButton mBtnFollow1; MyRadioButton mBtnFollow1;
MyRadioButton mBtnFollow2; MyRadioButton mBtnFollow2;
MyRadioButton mBtnFollow3; MyRadioButton mBtnFollow3;
@ -232,6 +235,9 @@ public abstract class AbsMainListChildViewHolder extends AbsMainViewHolder imple
mLevel1 = (ImageView) itemView.findViewById(R.id.level_1); mLevel1 = (ImageView) itemView.findViewById(R.id.level_1);
mLevel2 = (ImageView) itemView.findViewById(R.id.level_2); mLevel2 = (ImageView) itemView.findViewById(R.id.level_2);
mLevel3 = (ImageView) itemView.findViewById(R.id.level_3); mLevel3 = (ImageView) itemView.findViewById(R.id.level_3);
diamond1 = (ImageView) itemView.findViewById(R.id.diamond1);
diamond2 = (ImageView) itemView.findViewById(R.id.diamond2);
diamond3 = (ImageView) itemView.findViewById(R.id.diamond3);
mBtnFollow1 = (MyRadioButton) itemView.findViewById(R.id.btn_follow_1); mBtnFollow1 = (MyRadioButton) itemView.findViewById(R.id.btn_follow_1);
mBtnFollow2 = (MyRadioButton) itemView.findViewById(R.id.btn_follow_2); mBtnFollow2 = (MyRadioButton) itemView.findViewById(R.id.btn_follow_2);
mBtnFollow3 = (MyRadioButton) itemView.findViewById(R.id.btn_follow_3); mBtnFollow3 = (MyRadioButton) itemView.findViewById(R.id.btn_follow_3);
@ -294,6 +300,7 @@ public abstract class AbsMainListChildViewHolder extends AbsMainViewHolder imple
getItem(position, mBtnFollow1, mBtnFollow2, mBtnFollow3).setVisibility(View.INVISIBLE); getItem(position, mBtnFollow1, mBtnFollow2, mBtnFollow3).setVisibility(View.INVISIBLE);
} }
getItem(position, mVotes1, mVotes2, mVotes3).setText(bean.getTotalCoinFormat()); getItem(position, mVotes1, mVotes2, mVotes3).setText(bean.getTotalCoinFormat());
getItem(position, diamond1, diamond2, diamond3).setVisibility(View.VISIBLE);
if (bean.isHide()) { if (bean.isHide()) {
getItem(position, mName1, mName2, mName3).setText(R.string.mystery_man); getItem(position, mName1, mName2, mName3).setText(R.string.mystery_man);
ImgLoader.display(mContext, R.mipmap.hide, getItem(position, mAvatar1, mAvatar2, mAvatar3)); ImgLoader.display(mContext, R.mipmap.hide, getItem(position, mAvatar1, mAvatar2, mAvatar3));

View File

@ -127,9 +127,11 @@
<ImageView <ImageView
android:id="@+id/diamond1"
android:layout_width="18dp" android:layout_width="18dp"
android:layout_height="15dp" android:layout_height="15dp"
android:src="@mipmap/diamond" /> android:src="@mipmap/diamond"
android:visibility="invisible" />
<TextView <TextView
android:id="@+id/votes_1" android:id="@+id/votes_1"
@ -259,9 +261,11 @@
<ImageView <ImageView
android:id="@+id/diamond2"
android:layout_width="18dp" android:layout_width="18dp"
android:layout_height="15dp" android:layout_height="15dp"
android:src="@mipmap/diamond" /> android:src="@mipmap/diamond"
android:visibility="invisible" />
<TextView <TextView
android:id="@+id/votes_2" android:id="@+id/votes_2"
@ -390,9 +394,11 @@
<ImageView <ImageView
android:id="@+id/diamond3"
android:layout_width="18dp" android:layout_width="18dp"
android:layout_height="16dp" android:layout_height="16dp"
android:src="@mipmap/diamond" /> android:src="@mipmap/diamond"
android:visibility="invisible" />
<TextView <TextView
android:id="@+id/votes_3" android:id="@+id/votes_3"