update:直播间UI调整:

1、小时榜数值居中显示
2、调整快捷语背景色
This commit is contained in:
zlzw 2022-08-30 15:51:04 +08:00
parent b84d830627
commit 39957a3e28
3 changed files with 9 additions and 5 deletions

View File

@ -11,6 +11,7 @@ import android.os.Message;
import android.os.SystemClock;
import android.text.TextUtils;
import android.util.Log;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@ -1076,6 +1077,8 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
protected void initHourRankList() {
ViewFlipper flipper = (ViewFlipper) findViewById(R.id.hour_rank_list);
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(DpUtil.dp2px(44), DpUtil.dp2px(16));
LinearLayout.LayoutParams textParams = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
textParams.leftMargin=DpUtil.dp2px(5);
API.get().pdLiveApi(mContext).getHourChartRank(mLiveUid)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
@ -1088,6 +1091,10 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
ImageView hourPic = hourView.findViewById(R.id.wish_pic);
mHotText = hotView.findViewById(R.id.wish_index);
mHourRank = hourView.findViewById(R.id.wish_index);
mHotText.setLayoutParams(textParams);
mHourRank.setLayoutParams(textParams);
mHotText.setGravity(Gravity.CENTER);
mHourRank.setGravity(Gravity.CENTER);
setHourRankData(info.get(0).getRank());
hotPic.setImageResource(R.drawable.live_tags_hot);

View File

@ -2,7 +2,7 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:width="112dp" android:height="25dp">
<shape android:shape="rectangle">
<solid android:color="#33000000" />
<solid android:color="#33FFFFFF" />
<corners android:radius="12dp" />
</shape>
</item>

View File

@ -257,7 +257,6 @@
layout="@layout/view_wish_list"
android:layout_width="14dp"
android:layout_height="14dp"
android:layout_weight="0.0"
android:src="@mipmap/live_icon_wishlist"
android:visibility="gone" />
@ -266,8 +265,7 @@
android:layout_width="wrap_content"
android:layout_height="20dp"
android:layout_marginStart="0dp"
android:layout_marginEnd="6dp"
android:layout_weight="2"
android:layout_marginEnd="4dp"
android:flipInterval="5000"
android:inAnimation="@anim/anim_marquee_in"
android:outAnimation="@anim/anim_marquee_out" />
@ -275,7 +273,6 @@
<ImageView
android:layout_width="4dp"
android:layout_height="8dp"
android:layout_gravity="center"
android:src="@drawable/live_icon_right_more" />