From 41fb743bda22090eb209413dd82bc17ae57aad08 Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Thu, 3 Nov 2022 10:18:33 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=8E=92=E8=A1=8C=E6=A6=9C?= =?UTF-8?q?=E5=9B=BE=E6=A0=87=E5=A4=A7=E5=B0=8F=EF=BC=8C=E9=9A=90=E8=97=8F?= =?UTF-8?q?=E6=80=A7=E5=88=AB=E5=9B=BE=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/yunbao/main/adapter/MainListAdapter.java | 1 + .../main/views/AbsMainListChildViewHolder.java | 11 ++++++----- main/src/main/res/layout/activity_main_list.xml | 12 ++++++------ main/src/main/res/layout/item_main_list.xml | 10 +++++++--- 4 files changed, 20 insertions(+), 14 deletions(-) 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 27c9fec66..7c77761ef 100644 --- a/main/src/main/java/com/yunbao/main/adapter/MainListAdapter.java +++ b/main/src/main/java/com/yunbao/main/adapter/MainListAdapter.java @@ -276,6 +276,7 @@ public class MainListAdapter extends RefreshAdapter { mBtnFollow.setTextColor(Color.parseColor("#7BBAFF")); } } + mSex.setVisibility(View.INVISIBLE); } } diff --git a/main/src/main/java/com/yunbao/main/views/AbsMainListChildViewHolder.java b/main/src/main/java/com/yunbao/main/views/AbsMainListChildViewHolder.java index d5052d116..8fa592ad5 100644 --- a/main/src/main/java/com/yunbao/main/views/AbsMainListChildViewHolder.java +++ b/main/src/main/java/com/yunbao/main/views/AbsMainListChildViewHolder.java @@ -80,7 +80,7 @@ public abstract class AbsMainListChildViewHolder extends AbsMainViewHolder imple mRefreshView = (CommonRefreshView) findViewById(R.id.refreshView); mBackgroundLayout = findViewById(R.id.bg_layout); rootView = (AppBarLayout) findViewById(R.id.rootView); - toolbarLayout= (CollapsingToolbarLayout) findViewById(R.id.toolbar_layout); + toolbarLayout = (CollapsingToolbarLayout) findViewById(R.id.toolbar_layout); hv = new HeadView(rootView); mRefreshView.setEmptyLayoutId(R.layout.view_no_data_list); mRefreshView.setLayoutManager(new LinearLayoutManager(mContext, LinearLayoutManager.VERTICAL, false)); @@ -103,7 +103,8 @@ public abstract class AbsMainListChildViewHolder extends AbsMainViewHolder imple } }); } - public void setAppbarColor(int color){ + + public void setAppbarColor(int color) { toolbarLayout.setContentScrimColor(color); } @@ -279,10 +280,10 @@ public abstract class AbsMainListChildViewHolder extends AbsMainViewHolder imple if (bean.getAttention() != 1) { getItem(position, mBtnFollow1, mBtnFollow2, mBtnFollow3).doChecked(true); getItem(position, mBtnFollow1, mBtnFollow2, mBtnFollow3).setText("+" + WordUtil.getString(R.string.follow)); - if(isRankOne) { + if (isRankOne) { getItem(position, mBtnFollow1, mBtnFollow2, mBtnFollow3).setBackgroundResource(R.drawable.background_ffff79c2); getItem(position, mBtnFollow1, mBtnFollow2, mBtnFollow3).setTextColor(Color.parseColor("#FFFFFF")); - }else{ + } else { getItem(position, mBtnFollow1, mBtnFollow2, mBtnFollow3).setBackgroundResource(R.drawable.background_7bbaff); getItem(position, mBtnFollow1, mBtnFollow2, mBtnFollow3).setTextColor(Color.parseColor("#FFFFFF")); } @@ -303,7 +304,7 @@ public abstract class AbsMainListChildViewHolder extends AbsMainViewHolder imple getItem(position, svga1, svga2, svga3).setVisibility(View.VISIBLE); } getItem(position, mSex1, mSex2, mSex3).setImageResource(CommonIconUtil.getSexIcon(bean.getSex())); - + setVisibility(View.INVISIBLE, position, mSex1, mSex2, mSex3); getItem(position, mBtnFollow1, mBtnFollow2, mBtnFollow3).setOnClickListener(v -> { CommonHttpUtil.setAttention(bean.getUid(), new CommonCallback() { @Override diff --git a/main/src/main/res/layout/activity_main_list.xml b/main/src/main/res/layout/activity_main_list.xml index 2aa278255..e27612d1c 100644 --- a/main/src/main/res/layout/activity_main_list.xml +++ b/main/src/main/res/layout/activity_main_list.xml @@ -127,8 +127,8 @@ + android:textSize="14sp" />