热度加成和小时榜图标替换

This commit is contained in:
ningwenqiang 2024-10-11 14:50:40 +08:00
parent b3b127bd0b
commit 045a8708e0
2 changed files with 14 additions and 14 deletions

View File

@ -3570,15 +3570,15 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
ImageView hourPic = hourView.findViewById(R.id.wish_pic); ImageView hourPic = hourView.findViewById(R.id.wish_pic);
mHotText = hotView.findViewById(R.id.wish_index); mHotText = hotView.findViewById(R.id.wish_index);
mHourRank = hourView.findViewById(R.id.wish_index); mHourRank = hourView.findViewById(R.id.wish_index);
mHotText.setText("熱度加成"); mHotText.setText("0");
mHourRank.setText("0"); mHourRank.setText(mHourRank.getContext().getString(R.string.heat_add));
// mHotText.setLayoutParams(textParams); // mHotText.setLayoutParams(textParams);
// mHourRank.setLayoutParams(textParams); // mHourRank.setLayoutParams(textParams);
mHotText.setGravity(Gravity.CENTER); // mHotText.setGravity(Gravity.CENTER);
mHourRank.setGravity(Gravity.CENTER); // mHourRank.setGravity(Gravity.CENTER);
setHourRankData(Long.parseLong(model.getRank())); setHourRankData(Long.parseLong(model.getRank()));
hotPic.setImageResource(R.mipmap.ic_live_hour_rank); hotPic.setImageResource(R.mipmap.ic_live_hot_rank);
hourPic.setImageResource(R.mipmap.ic_live_hot_rank); hourPic.setImageResource(R.mipmap.ic_live_hour_rank);
// hotPic.setLayoutParams(params); // hotPic.setLayoutParams(params);
// hourPic.setLayoutParams(params); // hourPic.setLayoutParams(params);
flipper.addView(hotView); flipper.addView(hotView);
@ -3626,13 +3626,14 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
mHotText = hotView.findViewById(R.id.wish_index); mHotText = hotView.findViewById(R.id.wish_index);
mHourRank = hourView.findViewById(R.id.wish_index); mHourRank = hourView.findViewById(R.id.wish_index);
mHotText.setText("0"); mHotText.setText("0");
mHourRank.setText(mHourRank.getContext().getString(R.string.heat_add));
// mHotText.setLayoutParams(textParams); // mHotText.setLayoutParams(textParams);
// mHourRank.setLayoutParams(textParams); // mHourRank.setLayoutParams(textParams);
mHotText.setGravity(Gravity.CENTER); // mHotText.setGravity(Gravity.CENTER);
mHourRank.setGravity(Gravity.CENTER); // mHourRank.setGravity(Gravity.CENTER);
setHourRankData(info.get(0).getRank()); setHourRankData(info.get(0).getRank());
hotPic.setImageResource(R.mipmap.ic_live_hour_rank); hotPic.setImageResource(R.mipmap.ic_live_hot_rank);
hourPic.setImageResource(R.mipmap.ic_live_hot_rank); hourPic.setImageResource(R.mipmap.ic_live_hour_rank);
// hotPic.setLayoutParams(params); // hotPic.setLayoutParams(params);
// hourPic.setLayoutParams(params); // hourPic.setLayoutParams(params);
flipper.addView(hotView); flipper.addView(hotView);

View File

@ -1,12 +1,13 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
tools:layout_width="70dp"
android:layout_height="match_parent" android:layout_height="match_parent"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="@color/transparent" android:background="@color/transparent"
tools:background="@drawable/bg_live_item" tools:background="@drawable/bg_live_item"
tools:layout_height="23dp"> tools:layout_height="22.5dp">
<ImageView <ImageView
android:id="@+id/wish_pic" android:id="@+id/wish_pic"
@ -23,11 +24,9 @@
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@+id/wish_pic" app:layout_constraintStart_toEndOf="@+id/wish_pic"
android:layout_width="match_parent" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
tools:text="热度加成" tools:text="热度加成"
android:paddingBottom="1dp"
android:layout_marginStart="19dp"
android:ellipsize="marquee" android:ellipsize="marquee"
android:focusable="true" android:focusable="true"
android:gravity="center" android:gravity="center"