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);