From 0cafd76035b8d964eb606ad23f3cdd699e241290 Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Fri, 16 Sep 2022 17:27:41 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E8=B4=A1=E7=8C=AE=E6=A6=9C?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=9A=90=E8=BA=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/activity/MainListActivity.java | 2 +- .../yunbao/main/adapter/MainListAdapter.java | 23 +++++++++++++++---- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/main/src/main/java/com/yunbao/main/activity/MainListActivity.java b/main/src/main/java/com/yunbao/main/activity/MainListActivity.java index 6840dd6af..32ba1d32a 100644 --- a/main/src/main/java/com/yunbao/main/activity/MainListActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/MainListActivity.java @@ -157,7 +157,7 @@ public class MainListActivity extends AbsActivity { public void onSuccess(NobleRankHideUserListModel data) { outRankHide = data.getOutRankHide(); if (mContributeViewHolder != null) { - mContributeViewHolder.setHide(data.getOutRankHide()); + mContributeViewHolder.setHide(outRankHide); } } diff --git a/main/src/main/java/com/yunbao/main/adapter/MainListAdapter.java b/main/src/main/java/com/yunbao/main/adapter/MainListAdapter.java index 6339f159f..61109b5df 100644 --- a/main/src/main/java/com/yunbao/main/adapter/MainListAdapter.java +++ b/main/src/main/java/com/yunbao/main/adapter/MainListAdapter.java @@ -332,6 +332,7 @@ public class MainListAdapter extends RefreshAdapter { } else { liveing1.setVisibility(View.INVISIBLE); } + mBtnFollow1.setVisibility(bean.isHide() ? View.GONE : View.VISIBLE); if (bean.getAttention() == 1) { mBtnFollow1.doChecked(true); mBtnFollow1.setText(mFollowing); @@ -377,8 +378,13 @@ public class MainListAdapter extends RefreshAdapter { if (payload == null) { mItem2.setVisibility(View.VISIBLE); mItem2.setTag(bean); - ImgLoader.display(mContext, bean.getAvatarThumb(), mAvatar2); - mName2.setText(bean.getUserNiceName()); + if (bean.isHide()) { + mName2.setText(R.string.mystery_man); + ImgLoader.display(mContext, R.mipmap.hide, mAvatar2); + } else { + ImgLoader.display(mContext, bean.getAvatarThumb(), mAvatar2); + mName2.setText(bean.getUserNiceName()); + } mVotes2.setText(bean.getTotalCoinFormat() + " "); mSex2.setImageResource(CommonIconUtil.getSexIcon(bean.getSex())); LevelBean levelBean = null; @@ -398,6 +404,7 @@ public class MainListAdapter extends RefreshAdapter { } else { liveing2.setVisibility(View.INVISIBLE); } + mBtnFollow2.setVisibility(bean.isHide() ? View.GONE : View.VISIBLE); if (bean.getAttention() == 1) { mBtnFollow2.doChecked(true); mBtnFollow2.setText(mFollowing); @@ -409,6 +416,7 @@ public class MainListAdapter extends RefreshAdapter { mBtnFollow2.setBackgroundResource(R.drawable.background_yellow); mBtnFollow2.setTextColor(Color.parseColor("#FFFFFF")); } + } if (topSize > 2) { ListBean bean = mTopList.get(2); @@ -443,8 +451,13 @@ public class MainListAdapter extends RefreshAdapter { if (payload == null) { mItem3.setVisibility(View.VISIBLE); mItem3.setTag(bean); - ImgLoader.display(mContext, bean.getAvatarThumb(), mAvatar3); - mName3.setText(bean.getUserNiceName()); + if (bean.isHide()) { + mName3.setText(R.string.mystery_man); + ImgLoader.display(mContext, R.mipmap.hide, mAvatar3); + } else { + ImgLoader.display(mContext, bean.getAvatarThumb(), mAvatar3); + mName3.setText(bean.getUserNiceName()); + } mVotes3.setText(bean.getTotalCoinFormat() + " "); mSex3.setImageResource(CommonIconUtil.getSexIcon(bean.getSex())); LevelBean levelBean = null; @@ -464,6 +477,7 @@ public class MainListAdapter extends RefreshAdapter { } else { liveing3.setVisibility(View.INVISIBLE); } + mBtnFollow3.setVisibility(bean.isHide() ? View.GONE : View.VISIBLE); if (bean.getAttention() == 1) { mBtnFollow3.doChecked(true); mBtnFollow3.setText(mFollowing); @@ -562,6 +576,7 @@ public class MainListAdapter extends RefreshAdapter { } else { liveing.setVisibility(View.INVISIBLE); } + mBtnFollow.setVisibility(bean.isHide() ? View.GONE : View.VISIBLE); mBtnFollow.setTag(position); if (bean.getAttention() == 1) { mBtnFollow.doChecked(true);