调整排行榜图标大小,隐藏性别图标

This commit is contained in:
zlzw 2022-11-03 10:18:33 +08:00
parent 823075c0ad
commit 41fb743bda
4 changed files with 20 additions and 14 deletions

View File

@ -276,6 +276,7 @@ public class MainListAdapter extends RefreshAdapter<ListBean> {
mBtnFollow.setTextColor(Color.parseColor("#7BBAFF")); mBtnFollow.setTextColor(Color.parseColor("#7BBAFF"));
} }
} }
mSex.setVisibility(View.INVISIBLE);
} }
} }

View File

@ -80,7 +80,7 @@ public abstract class AbsMainListChildViewHolder extends AbsMainViewHolder imple
mRefreshView = (CommonRefreshView) findViewById(R.id.refreshView); mRefreshView = (CommonRefreshView) findViewById(R.id.refreshView);
mBackgroundLayout = findViewById(R.id.bg_layout); mBackgroundLayout = findViewById(R.id.bg_layout);
rootView = (AppBarLayout) findViewById(R.id.rootView); rootView = (AppBarLayout) findViewById(R.id.rootView);
toolbarLayout= (CollapsingToolbarLayout) findViewById(R.id.toolbar_layout); toolbarLayout = (CollapsingToolbarLayout) findViewById(R.id.toolbar_layout);
hv = new HeadView(rootView); hv = new HeadView(rootView);
mRefreshView.setEmptyLayoutId(R.layout.view_no_data_list); mRefreshView.setEmptyLayoutId(R.layout.view_no_data_list);
mRefreshView.setLayoutManager(new LinearLayoutManager(mContext, LinearLayoutManager.VERTICAL, false)); 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); toolbarLayout.setContentScrimColor(color);
} }
@ -279,10 +280,10 @@ public abstract class AbsMainListChildViewHolder extends AbsMainViewHolder imple
if (bean.getAttention() != 1) { if (bean.getAttention() != 1) {
getItem(position, mBtnFollow1, mBtnFollow2, mBtnFollow3).doChecked(true); getItem(position, mBtnFollow1, mBtnFollow2, mBtnFollow3).doChecked(true);
getItem(position, mBtnFollow1, mBtnFollow2, mBtnFollow3).setText("+" + WordUtil.getString(R.string.follow)); 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).setBackgroundResource(R.drawable.background_ffff79c2);
getItem(position, mBtnFollow1, mBtnFollow2, mBtnFollow3).setTextColor(Color.parseColor("#FFFFFF")); 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).setBackgroundResource(R.drawable.background_7bbaff);
getItem(position, mBtnFollow1, mBtnFollow2, mBtnFollow3).setTextColor(Color.parseColor("#FFFFFF")); 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, svga1, svga2, svga3).setVisibility(View.VISIBLE);
} }
getItem(position, mSex1, mSex2, mSex3).setImageResource(CommonIconUtil.getSexIcon(bean.getSex())); getItem(position, mSex1, mSex2, mSex3).setImageResource(CommonIconUtil.getSexIcon(bean.getSex()));
setVisibility(View.INVISIBLE, position, mSex1, mSex2, mSex3);
getItem(position, mBtnFollow1, mBtnFollow2, mBtnFollow3).setOnClickListener(v -> { getItem(position, mBtnFollow1, mBtnFollow2, mBtnFollow3).setOnClickListener(v -> {
CommonHttpUtil.setAttention(bean.getUid(), new CommonCallback<Integer>() { CommonHttpUtil.setAttention(bean.getUid(), new CommonCallback<Integer>() {
@Override @Override

View File

@ -127,8 +127,8 @@
<ImageView <ImageView
android:layout_width="10dp" android:layout_width="18dp"
android:layout_height="10dp" android:layout_height="15dp"
android:src="@mipmap/diamond" /> android:src="@mipmap/diamond" />
<TextView <TextView
@ -259,8 +259,8 @@
<ImageView <ImageView
android:layout_width="10dp" android:layout_width="18dp"
android:layout_height="10dp" android:layout_height="15dp"
android:src="@mipmap/diamond" /> android:src="@mipmap/diamond" />
<TextView <TextView
@ -390,8 +390,8 @@
<ImageView <ImageView
android:layout_width="10dp" android:layout_width="18dp"
android:layout_height="10dp" android:layout_height="16dp"
android:src="@mipmap/diamond" /> android:src="@mipmap/diamond" />
<TextView <TextView

View File

@ -115,18 +115,22 @@
<ImageView <ImageView
android:layout_width="12dp" android:layout_gravity="center"
android:layout_height="12dp" android:layout_width="25dp"
android:layout_height="25dp"
android:layout_marginTop="3dp"
android:scaleType="fitCenter"
android:src="@mipmap/home_me_diamonds" /> android:src="@mipmap/home_me_diamonds" />
<TextView <TextView
android:id="@+id/votes" android:id="@+id/votes"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_gravity="center"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="5dp" android:layout_marginLeft="5dp"
android:text="11111" android:text="11111"
android:textColor="#FF7F00" android:textColor="#FF7F00"
android:textSize="12sp" /> android:textSize="14sp" />
</LinearLayout> </LinearLayout>