From 55ccb03b4a7b23e3f76b333acc5ad24c53659d11 Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Wed, 24 Aug 2022 17:10:50 +0800 Subject: [PATCH] =?UTF-8?q?add:=E5=B0=8F=E6=97=B6=E6=A6=9CUI=EF=BC=8C?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=9C=AA=E6=8E=A5=E5=85=A5=EF=BC=8C=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E6=9A=82=E6=9C=AA=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yunbao/live/views/LiveRoomViewHolder.java | 23 +++++- .../live/views/PortraitLiveManager.java | 1 + .../main/res/drawable/bg_hour_rank_list.xml | 9 +++ .../res/drawable/live_icon_right_more.png | Bin 0 -> 343 bytes live/src/main/res/drawable/live_tags_hot.png | Bin 0 -> 8582 bytes live/src/main/res/layout/view_live_room.xml | 72 ++++++++++++++---- 6 files changed, 89 insertions(+), 16 deletions(-) create mode 100644 live/src/main/res/drawable/bg_hour_rank_list.xml create mode 100644 live/src/main/res/drawable/live_icon_right_more.png create mode 100644 live/src/main/res/drawable/live_tags_hot.png 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 3399f1d06..cadd636bd 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java @@ -102,6 +102,7 @@ import java.net.URL; import java.util.ArrayList; import java.util.Arrays; import java.util.List; +import java.util.Random; import pl.droidsonroids.gif.GifImageView; @@ -834,8 +835,28 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis } wishListFlipper.startFlipping(); }); + } - + /** + * 初始化小时榜。 + * 等待接口 + * TextView得独立出来用来替换数字 + */ + protected void initHourRankList(){ + ((Activity)mContext).runOnUiThread(()->{ + ViewFlipper flipper= (ViewFlipper) findViewById(R.id.hour_rank_list); + for (int i = 0; i < 2; i++) { + LinearLayout.LayoutParams params=new LinearLayout.LayoutParams(DpUtil.dp2px(44),DpUtil.dp2px(16)); + View wish = LayoutInflater.from(mContext).inflate(R.layout.view_wish_list, null); + ImageView wishPic = wish.findViewById(R.id.wish_pic); + TextView wishIndex = wish.findViewById(R.id.wish_index); + wishPic.setImageResource(R.drawable.live_tags_hot); + wishPic.setLayoutParams(params); + wishIndex.setText(new Random().nextInt(5000)+""); + flipper.addView(wish); + } + flipper.startFlipping(); + }); } //点击头像 diff --git a/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java b/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java index d5a4a3b1a..107cbfe37 100644 --- a/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java +++ b/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java @@ -258,6 +258,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe enterRoom(); } }); + mLiveRoomViewHolder.initHourRankList(); } @Override diff --git a/live/src/main/res/drawable/bg_hour_rank_list.xml b/live/src/main/res/drawable/bg_hour_rank_list.xml new file mode 100644 index 000000000..1306ca2af --- /dev/null +++ b/live/src/main/res/drawable/bg_hour_rank_list.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/live/src/main/res/drawable/live_icon_right_more.png b/live/src/main/res/drawable/live_icon_right_more.png new file mode 100644 index 0000000000000000000000000000000000000000..b1f82a27ca6f346ec691f03903b1477112d9c3bf GIT binary patch literal 343 zcmV-d0jU0oP)Px$5lKWrR5(wq)S*j5Q547V?@urZ7O@H9|KPOPL~$@MYO$=D1dDYTY>L%nS(cJ?aWu>j zU=p|hHY2bF97^&h`~m{a0GGg0+8(eg>8ub0ngZ^Cg$Qg)I#2K4GK>^q7PtlGfH$Ba z>8cP!rse3-H1G_pmx4ewpdYL0=YU1vCcyRoEy;HNrfuh!)plxJ8o*Sc^2XV&HX63` phtGEYcvm_=m5=COE`dtd%sW~>gZ9>OGHw6>002ovPDHLkV1iutk=+0Q literal 0 HcmV?d00001 diff --git a/live/src/main/res/drawable/live_tags_hot.png b/live/src/main/res/drawable/live_tags_hot.png new file mode 100644 index 0000000000000000000000000000000000000000..572dd2a2c49ce08f396d02b19c12a7d969074091 GIT binary patch literal 8582 zcmV;1A$i`3P)zyo00001b5ch_0Itp) z=>PyA07*naRCr$PTnBU&)zDDPy#_h2}MGcC`||o2ndKinxaxv-b1nBk02tV zfQpJ(P(VeIqKGIF1QF>V9YZIOKms8l38W|Y=GK{ioilSLXC@Os#kc-{EwdKn=H8hz zXU_iix4*sjnJeI*pMO?>TLIzkS`Ar#&5He5%^<*rP7O{9!fVpsb*+EKy?HBe(*YqL z8Pf<}X%0MM54aHox0Ed0yR6sEoAN&+{hcdtQve}vx+es7xfujuChXE6_!ET#t|$nTR?k-EZUj>=;IX*ZQ2h zf3g+ z;Q7mdkhk?70zsaDAj@6wNr1-+l-2{>65s|hGTgXy)d!JXNf6X!kRgD)mLZeRC=is- zjKCqE%d!lCd@ffWPySZSz>J~*i5?Gie0DrNP90x8o}MKr6C>j?3__?JPkE(&#?UIr z-0?ifmFuz}nIDIZubV4(JQt*A5$PGcp`J5zt!W|-`e#Ag$L;8Mn2%KqkxOM zE<4uvJ{!+4zbfN%=keEPyu^G%cU^9d+PbN86huI@T41%4e>Ox#N1*4B+mU$x?GQw` zit%OV3d?ZdQ~%aL z&3(q^&x4x2$H2?xs#;E4pK8F*I~AJ)ImhP#0>f;0^u>Yb+$SEPp#jLvEuM2G^~&tN zqn10a1&luo2zlo{k3*IgLQq*jqg??IWgtHoI28_fB)}_T--ln@b zllR#TQ*S1-W{YGn0PjJ}SVlJDJzfKznNigPjmK1BDvm)k@EMuJz$jHfN|cN0Q~db4 z*Btn?b>N+YV>-f)6;2?oZ5{L;-Wh{NcSCl@)g!rir6UsteRifgQ2Zf4$UFMH00Hkp z5JY|0Cb2>W6$-flzy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5P z6r|>C5gT9a1RKE&PIhQF-<+WjC?5hZAXk+gy@j}@nRe68>r_3GH*{jvr%4^Uy;huY?&#~A<*aK~-Q8Ng2V#0At zTofW2gd;z*xDW!?h~+q z6}ngkq?Q5M5>U4u(5x{~Hwp+2&>ps}TvwGi`NdYhmPpy^tkfiw*UUKVJ0f|~<@{D# zME-MTe8ctlF||o?*JOaz3~roHCCC)x>Z%uNC94wjIzA-dr9r1n?nj;1HRq!`hua57 zxeJB)4v)v>IUX2j{V6Ck=)3HklESkkuK(T_m&&=5LQsxQunM;Uas)uWcS^KFkn + + + + + + + + + @@ -483,7 +525,7 @@ android:id="@+id/live_time" android:layout_width="wrap_content" android:layout_height="20dp" - android:layout_below="@id/btn_votes" + android:layout_below="@id/hour_rank_layout" android:layout_marginLeft="10dp" android:layout_marginTop="5dp" android:background="@drawable/bg_live_push_time" @@ -589,7 +631,7 @@ android:id="@+id/btn_red_pack" android:layout_width="40dp" android:layout_height="50dp" - android:layout_below="@id/btn_votes" + android:layout_below="@id/hour_rank_layout" android:layout_alignParentRight="true" android:layout_marginTop="80dp" android:layout_marginRight="10dp" @@ -706,7 +748,7 @@ android:id="@+id/title_container" android:layout_width="match_parent" android:layout_height="26dp" - android:layout_below="@id/btn_votes" + android:layout_below="@id/hour_rank_layout" android:layout_marginLeft="10dp" android:layout_marginTop="10dp" android:layout_marginRight="10dp" /> @@ -715,7 +757,7 @@ android:id="@+id/gif_gift_tip_group" android:layout_width="wrap_content" android:layout_height="26dp" - android:layout_below="@id/btn_votes" + android:layout_below="@id/hour_rank_layout" android:layout_marginLeft="10dp" android:layout_marginTop="10dp" android:layout_marginRight="10dp"