From 39957a3e28a71c400608442c935ccf25fd4ad998 Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Tue, 30 Aug 2022 15:51:04 +0800 Subject: [PATCH] =?UTF-8?q?update:=E7=9B=B4=E6=92=AD=E9=97=B4UI=E8=B0=83?= =?UTF-8?q?=E6=95=B4=EF=BC=9A=201=E3=80=81=E5=B0=8F=E6=97=B6=E6=A6=9C?= =?UTF-8?q?=E6=95=B0=E5=80=BC=E5=B1=85=E4=B8=AD=E6=98=BE=E7=A4=BA=202?= =?UTF-8?q?=E3=80=81=E8=B0=83=E6=95=B4=E5=BF=AB=E6=8D=B7=E8=AF=AD=E8=83=8C?= =?UTF-8?q?=E6=99=AF=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/yunbao/live/views/LiveRoomViewHolder.java | 7 +++++++ live/src/main/res/drawable/bg_fast_meg.xml | 2 +- live/src/main/res/layout/view_live_room.xml | 5 +---- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java index 550687531..934b9c697 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java @@ -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); diff --git a/live/src/main/res/drawable/bg_fast_meg.xml b/live/src/main/res/drawable/bg_fast_meg.xml index 4b8c2a6db..b3dbc1af6 100644 --- a/live/src/main/res/drawable/bg_fast_meg.xml +++ b/live/src/main/res/drawable/bg_fast_meg.xml @@ -2,7 +2,7 @@ - + diff --git a/live/src/main/res/layout/view_live_room.xml b/live/src/main/res/layout/view_live_room.xml index d4e398523..237e89d32 100644 --- a/live/src/main/res/layout/view_live_room.xml +++ b/live/src/main/res/layout/view_live_room.xml @@ -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 @@