From 4269288754e1f49734f6ac049310b3e1553fa411 Mon Sep 17 00:00:00 2001 From: ningwenqiang Date: Wed, 30 Oct 2024 19:00:54 +0800 Subject: [PATCH] =?UTF-8?q?=E7=9B=B4=E6=92=AD=E7=9A=84UI=E5=85=88=E4=BF=9D?= =?UTF-8?q?=E5=AD=98=E4=B8=80=E4=B8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/res/drawable/bg_white_radius17.xml | 6 + live/src/main/res/mipmap-mdpi/ic_yola_cup.png | Bin 0 -> 677 bytes .../src/main/res/mipmap-mdpi/ic_yola_fire.png | Bin 0 -> 254 bytes .../res/mipmap-mdpi/ic_yola_search_small.png | Bin 0 -> 573 bytes .../src/main/res/mipmap-mdpi/ic_yola_vido.png | Bin 0 -> 1079 bytes .../main/res/mipmap-xxhdpi/ic_yola_cup.png | Bin 0 -> 2358 bytes .../main/res/mipmap-xxhdpi/ic_yola_fire.png | Bin 0 -> 750 bytes .../mipmap-xxhdpi/ic_yola_search_small.png | Bin 0 -> 2202 bytes .../main/res/mipmap-xxhdpi/ic_yola_vido.png | Bin 0 -> 6396 bytes .../main/res/mipmap-xxxhdpi/ic_yola_cup.png | Bin 0 -> 1955 bytes .../main/res/mipmap-xxxhdpi/ic_yola_fire.png | Bin 0 -> 788 bytes .../mipmap-xxxhdpi/ic_yola_search_small.png | Bin 0 -> 1536 bytes .../main/res/mipmap-xxxhdpi/ic_yola_vido.png | Bin 0 -> 9069 bytes .../yunbao/main/activity/MainActivity.java | 7 +- .../main/adapter/MainHomeComAdapter2.java | 7 + .../main/adapter/MainHomeLiveAdapter.java | 41 +- .../adapter/MainHomeLivesClassAdapter.java | 22 +- .../com/yunbao/main/views/LiveOptAgent.java | 29 + .../yunbao/main/views/LiveOptComAgent.java | 125 ++++ .../yunbao/main/views/LiveOptFollAgent.java | 130 ++++ .../main/views/MainHomeLiveViewHolder.java | 20 +- .../main/views/MainHomeNewViewHolder.java | 4 - .../views/MainHomeRecomLiveViewHolder.java | 4 - .../main/views/MainHomeViewHolder2.java | 683 ++++++++++++++++++ .../res/layout/item_main_live_com_class.xml | 35 + main/src/main/res/layout/view_main_home2.xml | 111 +++ 26 files changed, 1196 insertions(+), 28 deletions(-) create mode 100644 live/src/main/res/drawable/bg_white_radius17.xml create mode 100644 live/src/main/res/mipmap-mdpi/ic_yola_cup.png create mode 100644 live/src/main/res/mipmap-mdpi/ic_yola_fire.png create mode 100644 live/src/main/res/mipmap-mdpi/ic_yola_search_small.png create mode 100644 live/src/main/res/mipmap-mdpi/ic_yola_vido.png create mode 100644 live/src/main/res/mipmap-xxhdpi/ic_yola_cup.png create mode 100644 live/src/main/res/mipmap-xxhdpi/ic_yola_fire.png create mode 100644 live/src/main/res/mipmap-xxhdpi/ic_yola_search_small.png create mode 100644 live/src/main/res/mipmap-xxhdpi/ic_yola_vido.png create mode 100644 live/src/main/res/mipmap-xxxhdpi/ic_yola_cup.png create mode 100644 live/src/main/res/mipmap-xxxhdpi/ic_yola_fire.png create mode 100644 live/src/main/res/mipmap-xxxhdpi/ic_yola_search_small.png create mode 100644 live/src/main/res/mipmap-xxxhdpi/ic_yola_vido.png create mode 100644 main/src/main/java/com/yunbao/main/views/LiveOptAgent.java create mode 100644 main/src/main/java/com/yunbao/main/views/LiveOptComAgent.java create mode 100644 main/src/main/java/com/yunbao/main/views/LiveOptFollAgent.java create mode 100644 main/src/main/java/com/yunbao/main/views/MainHomeViewHolder2.java create mode 100644 main/src/main/res/layout/item_main_live_com_class.xml create mode 100644 main/src/main/res/layout/view_main_home2.xml diff --git a/live/src/main/res/drawable/bg_white_radius17.xml b/live/src/main/res/drawable/bg_white_radius17.xml new file mode 100644 index 000000000..fae1b862c --- /dev/null +++ b/live/src/main/res/drawable/bg_white_radius17.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/live/src/main/res/mipmap-mdpi/ic_yola_cup.png b/live/src/main/res/mipmap-mdpi/ic_yola_cup.png new file mode 100644 index 0000000000000000000000000000000000000000..9bc4970b2c6f22a5cc961e72599d66fd8bf26daa GIT binary patch literal 677 zcmV;W0$TlvP)Px%Ur9tkR7gw3l|M+9Q543X=anP}x#vQgG?Y}(CNyTyzeQ?@qNYlyP;n`OoFapW z8rn*Y2*Q?#YAC3oC`#NSnj$2mDF}l1T)#moy{GSrissQjDUasRv+YV*naR zw#FEbgb*Ij0iFWbuBux_X{m(gVjBy}@&^zBnvq2g} z279is`{}EKt$R|ewfwWRn;y4Y510|3g=uG$(sOfsp{F1fb{-MjPcyW#6tklE@OUS7u6E}Q-Fw^0C11hv91M8 z;|riuRfkvQfpczC`X7pBWl^967*^Hf%aXGy56afP@JFjhTt@Q;pL7~1EveYF00000 LNkvXXu0mjf3&Av% literal 0 HcmV?d00001 diff --git a/live/src/main/res/mipmap-mdpi/ic_yola_fire.png b/live/src/main/res/mipmap-mdpi/ic_yola_fire.png new file mode 100644 index 0000000000000000000000000000000000000000..3423d0bec00972734c80156ac79aa0f5a337da63 GIT binary patch literal 254 zcmVPx#xJg7oR47x8&@D~_Q4j#&Z^8*GY6uB}kRp*FIRSzLkksHfLem6+!;n-VQ8)ww zfkxIhbrpL7f})+aWFOhkrQykW-~5JuzWD7jvyYF6cxwK&!4a--84-^Kx4{Vx@rkol zQWX)iADEf@=;5`|@)>)p*y%US%r5S0c-(+IY)c^nh literal 0 HcmV?d00001 diff --git a/live/src/main/res/mipmap-mdpi/ic_yola_search_small.png b/live/src/main/res/mipmap-mdpi/ic_yola_search_small.png new file mode 100644 index 0000000000000000000000000000000000000000..608088fb90c8a0bef82e8abb5814693a6c198862 GIT binary patch literal 573 zcmV-D0>b@?P)Px$_en%SR5(wilQC-)Q51#GdBf)Cpx_ z;y(}n>~FPNPLd=yNL~SO3;;#s6M&^8N#=XK-uhtAZvfBp&RCZ9P(=2VTmkSJKnh?& zM9z`?k)~-F$MIqb*#ZPXa7sj80QjJkn(cPG?*}I}8jXXtZQlnlEh1NqF^}^5KEQR| zJ&xn70r+WI)>Nm{`Ldlf^?JQx+x9ZaG0U=HK@hwWk*~&>vwgtk`1k7&DyKvDA?zzoUNYPCAkZnwYx z^_dD=59Ln*FeW0K((q%JWly6hS_{MQqKGVzoXX?AEnqiRmNmZsE#Jox4nhwM00000 LNkvXXu0mjfOd9{R literal 0 HcmV?d00001 diff --git a/live/src/main/res/mipmap-mdpi/ic_yola_vido.png b/live/src/main/res/mipmap-mdpi/ic_yola_vido.png new file mode 100644 index 0000000000000000000000000000000000000000..681ce9139aef6971cc6535d73e603877b3867120 GIT binary patch literal 1079 zcmV-71jze|P)Px&@kvBMR7gw3mQQFLRUF5E@4cCMZ~m>hRPj(tup$*(F2_Uc<9NZ7f&J>6I|S;;wEX97H?vp=*dHgo1NM0%$q+?-kX^;`zI+u zsB@Z`-@M=F{eHji`|cvRPZzpR9OwfbK0HH*4g|AFoW3D9K?u3pyhAUpug`}AVqZ1y z&`UCQuMPKsj-QqiI6syoDF{h`Tqya2dXle^01zmfEs}Q#G(tc(j75`JFV||{ z`h$RK!RV=(A3Ix}X*ri9NkAx$%9^j)dEcEzA|;5KCYX$Vw(`sT#o~*xvFQg5gKyMo zwOC~usZ58y=jjV_b;l76N=O74g?R3?Gwug?Ice0PS7zT9s$M(Y}*9gq{BJrxeOHYu3cxTvia(26pXu8;y4D8rl9K@*tP|o>MWBAu5}#Z-01{HD9g|FTuIv0xh`!2s_@?ZRbPdyFK&Y09 z;iv@pzG_{n`rE6k-t)8VM`{+B5a|lwIPR_A8cQSPlh41N#9~eeF=QA9Pebugc3{in zp6B~^7zRDgu)Fo_+=`}2kSSe$`R0vlV=^{6K0QnTpF@Ct{&i`7QGv>pi7TB>@Q(bQ z$-J&GRpp=qm6x3?p*%>_G^IF7%}b4y>g=Ee8K_*ggjSl1m&*zFq# xh^B2AI{9*Kx%LqN3^dFC@6X9z4)9-M{{j{s-cC$__jUjP002ovPDHLkV1hO&1|a|d literal 0 HcmV?d00001 diff --git a/live/src/main/res/mipmap-xxhdpi/ic_yola_cup.png b/live/src/main/res/mipmap-xxhdpi/ic_yola_cup.png new file mode 100644 index 0000000000000000000000000000000000000000..0f409776784d8280ea22105c65d05a2fdabe1c52 GIT binary patch literal 2358 zcmV-63CZ?}P)Px-@JU2LRCr$Pn|+L2RTaR`xo>87Te>^%-kqjW&{n~iv|57!KT?&Hpz#AL){j(U zWKlvw)Cd|IwS~5#_!arkgntklH3W@{MPec!L8^#RBtZpAkm`!EQg`OwH`Cp1cRud% zoynW^?c151**9-?JDa)xb?4rD&i%b}&%O7YQ-pq7lmPbmEKZ;gsD*{}0rdfO=0y4y z)VH9%1$9QCZ$X{$>(mEfHk&=qT6+}{jUnP-XX+$2`oBbUKM`H$dEP$(fa1>F5g?`1 zej@rD0Gtt5fi91mLBwxptq;bP6C03H>f=Q8-ME66a~vXGskOc%j?7qqHf-2%MyXVK z9spDvp(`+^AcWYO&*xuQs_a;Rq?8{9fI|Q<5EA$}5#75~1(NQMh-mtZW8i!Mq^ z`5HugKM}nR0Jb9H2u~Oh3~WI?0H~&CpnnAsA0wh8*4o<(g~H#PfoclKb=}Jm@m2uH zw4~f4fSRm>uL66u*0(hJy&<5{(a~K*^s}g?G^O0zfCv%MT07=>-uI(xTmUGO$-F`c z@h1R~;m%?61OOX8!FptiO#?t05o;%JgO6VTfVUW9{yJ~nQDRccuL8j5BY!ViYxx9t zs9LT5E0s#^LB!AYn3MiysZ{!w<2WOZ<9rMNJ{5fd_?C1~Yki<8Af?m@5&a4P-W2X+ zjG1R?uIujit!8ebUa%nFVh(toH}~X_QnGL5cUsuTKH)p=9iHcTb00qpBAd;gS*=$2 zE|cQF^TMsQ*L$9KL%82+0L1IbWHNgk$N73_yOkZs*_6xW{?ibUQfeyzJXs&WfU4E% zxrIXE*eV5dj^jAbh1UxJuhv>W)ew;Dx^ERi90?JvI*#+QTrM}U8Ubaq*^R-DaY8%h zLeKMl(-6?e$jIwcsnj3B9$pA>cJz_ATDDjKXzl^aJEl^pyrEbu{;`<_Z4yF^hfOXz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5A literal 0 HcmV?d00001 diff --git a/live/src/main/res/mipmap-xxhdpi/ic_yola_search_small.png b/live/src/main/res/mipmap-xxhdpi/ic_yola_search_small.png new file mode 100644 index 0000000000000000000000000000000000000000..cf917d352262ea505e33bf3396dfa89549808a6f GIT binary patch literal 2202 zcmV;L2xa$)P)Px-R7pfZRA@u(S$~WiRUQ9+-8`ecA}Jem2-Y`KA(TO8HuI@ zJn)A(=i9v#URcxLh=2Qf z?sOc7RAE7$Jc;YNKSjiQZQK6)a=-`YSeErQ0Js|wSNJ#Vd9;@qW1DT;CY1~w4GEa0 z`NjD~$*{OT+cVOfQtF;|jI9|-(=PV?n`qae4#8O@Jgz6HoEbA%& zcoG2C)_{N1w(UCI!YvY7T9VF}60J&zEY~2_;~f=FOU>{f69Sz+g$&KPZGCk8{yRZ*MPO zy?S*H04(1gJe&Kz5MpOb1T4!UU;h4puw;xS3WdV>MMEA~IGs+flT!W;04@*wO{f1p zA;jbok5vmOnM`g}N<9GpD+Ax2k3=HZjf{*?*zd?lrBVk0;0qM+0_t>+ZQI{&NWikJ zBmmGAG7_W+tCad&p-_0JBgnl?cJAC6i^XEE`2@VUbEHzKd}e%n{M>m`K~SFGKZJ;% z_w|nmbaiz_hlYmcI!S=`GEK9fXz}VJV#1-w{6?s zxfBHY`}?odb^W~2k}FqA-JZ+keilj~l}fF3U6-=Rg%LKPlSC}bx@D3&CVzHR6djp1HoD33> zQeKnK=byV21k&mBDk&w!q#OJjkWxM%gviwMLUB#go+s_`ZJ<)AY%dmzlqGh2kW(p_ z%YOlYD*`sKO9+t&cKBGgb@2Wj(*XNUcnff@`D*U71wp|%IEV( zLJ3gxi$Dfqdv0DdncIv9VV}3DBRWX$~Nw?H3gu>m`QM2?C_fuIs*1lhRW@ zHW=*Y{a-y`n&!2Pu_u*MYXU%D)--KhE|;S=Nk>L9nam?%DscJ|5tFuUj|BmQ7BrS+ zJ;WIMtUp;Pr4VuNa=Q=hGEO8C?`4cpJxPGiPd6n%NnIoonF(ZpG-p=R zwCi)Z+>7l3YDd1Wudgc-i5#Jv$Dik^u`Ps1)vnd3CjJKJ{Hs0*Z;{`|w>&!7{-RMf~qb7ih{1|{u%(@6RZtf*F9<&#*UGZk(n0o zv?XGi<}SwAXt4W7zF$hYtxzZ&4O^^XU&ykoJH1BkVx!+1h@d`frme;K4D~@o><^xbr%tCCV;?wm>eN5#E#3;jOeV9k zTrLk8hA~jvCk22Lu~_V;p`oGke!p!3G$ENxjxxq}1&!J}9cnj@DWyh>#p0h^0qo0o zjkA749N?T^6>MF4GF8s`yPGAFO>ck}>+S6|R;^k!%os}ty95Ei|4~Xk%{kBOx_-D( z_rkKQk0RnHT-WVI#JBqW);i=52_eiz2h$P(e*x1p_aWj}!X7t*&qvj2^*N=~)O;`L zCD(Ol5HYTldKV&YpqxJJZJ+_j{qcBwUp>#)76IDCvaGF$_+`e}tu=8XXygm+cmK79 z?8pCw0rlP(sA!s{mU?hq&))V6A@(lIh{GmXmZbv#>F)!ab3OQO(2gAtI3g*f+#iWV z4$jWb&Qb|U4~DfQlv0V>G=lbO`vz(Onx^^bc@SA@11hE7!WdiPa%<(4QWOL!r=mFW zNKa4C-U9~?%=&Ux^Hp3cX%8xZHK#B(U6* cd%foU7bxPpUa7!|lK=n!07*qoM6N<$f+qGLV*mgE literal 0 HcmV?d00001 diff --git a/live/src/main/res/mipmap-xxhdpi/ic_yola_vido.png b/live/src/main/res/mipmap-xxhdpi/ic_yola_vido.png new file mode 100644 index 0000000000000000000000000000000000000000..d16d80ed9f98dc94651a5ef0a1dbed4854022b8b GIT binary patch literal 6396 zcmVPy2wn;=mRCr$PTn&sJS9Lyj?#z2{oj3^)Qb+@hP=lbTp|FY9_O6{Z@lPBF2V|vx zBuGV25fceiT2ZMg3TXu-{gn!Z64XSZ2?=RwVjMe$#M#(hX9E}o3Zyhcy78>B^ZbRr^uJG~UuSK4kvE>abI%dcy=3eiFI{fGy?giW z-cs*T)@)ozuJd8eCf#(`NSAwQ%i|S$Q!@Y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?8LYvXmd|Yd63<>+%x!JGmI3BT_p5A;>LCHIeF>f$LxlibO)OUC6-@p4O z_45W?_43v0AMjK1q*cTeOlNv3l$FJCM7MBZ@u(Hxveb(t- zP4@`dt~O2_?p|XdyB35c9=gF>*(?dMkO>}^k-zxh!M(Lt1r~>Je0)4xzI?f#nVBhu z9W?;l%E=8|OYa}R5K4TdvPuyAnwE}vNe&2|s<86lW6Gy>{bG?%=Etmg`yeX}fHZ%n zBnDL0ro+=o$_2WD_hdgS);&2h^V8#5+){rx0NnWaTbJ2p=P~EpWjb^dGAk3rP|t-P zLbRQr#fBcJbg{(rbdIS$JE9&Q$VF%q3JuWyi|&Dbq&YlFSxOkH^rr8QC81P`t}6c) zKvny)XZg z$ow3?l%~^)@=s(4>#B`tR%2dO*so8MS1*u+s3&jPOYbKDq(Wktm#tf9aL$kiM92`V z10CUh13=4Cc7?>+&$u!Fp+gTp{QRf@Eq2~eiwg&jkFP&BYndxbDnC$`?y|(#f)5lKV4n?`$@E|F&3G zJXIi%3*4zL{{Q*>Gr*0wyJvtq1KfxRjCk4^i#r3{hzN{$+W!F2ZhbjAe-StU0000< KMNUMnLSTYMCRHi` literal 0 HcmV?d00001 diff --git a/live/src/main/res/mipmap-xxxhdpi/ic_yola_cup.png b/live/src/main/res/mipmap-xxxhdpi/ic_yola_cup.png new file mode 100644 index 0000000000000000000000000000000000000000..c4db862d890152dc0fc8d617d7632d8cbdc629f2 GIT binary patch literal 1955 zcmV;U2VD4xP)Px+T}ebiRCr$PUE6isHW1}dNB+DikfmQ#1R(0{Y4R))5P17M}LscqZarfKFw2Ql^Yt^q;_k>~j}B3_0NIM$c|@KqAg_>{pb0R%n({E=nZiBBQ7 zXsjnhJZqZ98wp+sD9iH8uC4q&`J@R|RbBa76y69BLL39Y-@XLf=5Y=V4$hvRpC5h5 z=#7A~EWab-xeuYXeGCBjR#lZ38|RIHqA31S?fn37-?r_g&wXDzaX~4$Mm!P4+ z){S2jg>qq$9at$*NuX@QaeOIm>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*-iu`0wN<2dHSRQiGaumM4mor pKq4SA0+FXr8juKxj6me+{{_z@7@eV3MGOD{002ovPDHLkV1lD?g0BDo literal 0 HcmV?d00001 diff --git a/live/src/main/res/mipmap-xxxhdpi/ic_yola_fire.png b/live/src/main/res/mipmap-xxxhdpi/ic_yola_fire.png new file mode 100644 index 0000000000000000000000000000000000000000..a6fd3e6713d9e22aed178da526c45d01d0da7af2 GIT binary patch literal 788 zcmV+v1MB>WP)Px%&PhZ;R9HvtncGzxF%X7lI!HRe9fS@-1waLa3V;e?Dgal2sUW0+xPznvoC@L& zCj0M^e6(6!SF;;GMCb5gq|v9*Xl~1N;)73|kNyL;-jJFGMPyAxJ7(UsLb>ZT0e^IW zpF81eW`5LyoC6SSzli9XnfI-rnt*?Z=z{|UxQkXu6+jUI7y$jz45H76$fPI*N}`RKoNoF zpuyVl$joa85bJUEh(Lpp1r(99STqokDcS?Tp|ib@BI3UOperf?#3KMC?BzH_1a1Wz zOdTt;{*xo%jhU}qfhB-&!Z*x(?g38Ko)v@i41fMWlJRDLECIA>6as&r>owS(3j=#| zwP*h~xauSz><@0htlV^=>fZbY=-QWCV+#Ev!h#&2`%1reuk1=hYW-dfn4JrU4p(%@ z0lIbu)gw$*g{moZW=$U!qksWB!>Qbav|;a}rG0Xd0{j^<;v(rvlU6~%$^<}(B`D@0 z2DrpSC^^`61emBVN(5@p*@pn9CIH%SkT-TS3;DU?!-Oq- S7zO+Q0000Px)x=BPqRCr$Pn@v(1ITXhwH3e8~oD)oPg5VPbPB6m>Vis1r*aS|HaDq4+aLbF3 z6TqAxo)g43h;J~S4MkDVZ~9T{s*YQqZJBfeybS)6r z8UUQ}JkLKbyLM~{*dC1tVr2ls;qWB@d|t*_<_xJagtE}-= z248wZr_(uUDwd4_2qE4V1Nh);0E$_u?u@b7_V)IoI_Tr$JA{dq)U?O9F-1^qfd3N3Qn00HkS( z`#g$K?fDtTmxFLY*x1Sb5E~yS01Ry@r5NG0%6K0Lxb?c0f)juc;=9T90iZXT zOss@mE*RtgX_}%insSc=Ddm+>FC1cHoPAV#DW!KH6vI$c8%m?TsWf}}wV9N%*9d@V z_Ho^3S@vq3MuoO5gg7RIeAN9;MTy#&#JB`h6o$%Qdl+LFuLz>i3pnR5bit7kfXV&aI{OHr-|u%fH#bqVYbQ_uaHvb2wE*x8@9ypn zMMdZSubO0CJ}w;N9aEHuhbUQ=9WM8w1z_6yefHHDMy%3?MZ4xw%9?PS0BB=vO6jL8 z%W$2w_EF2=U)=z8I-mt$2`sEZMO&zt^h*~SYXO8b&=#Ys<4Du=5&$rJ{o&CGp$P!G zP)$iqTS?m>2q7>=(H)-DGDH&q&>1DAbmk6ifMLlJYvKDd0NsogM_<3R2Ut#wygfjh z0yD;19R!t=8AAjy3dHmI<>!~!22Io#x`e!wlv;! zL~c6}v7NECayx8tie&^~TLzTUt1Qb7+Til#7}Uuy#xJ$Uc8X<V1U&m+Ve}FdrKz(^n$Iet#6h) z`42^!eEJy1F8ATOwI+l(Z-|`$uv6P5i5k?SLvR`Idw<~t0F87NB^2*G8U*F`Sgc_x zqFOMA2~VNz?Ql09Xqjk|a4eKR-9#2v_^|2B4M# z7Dc*hbg;O26k8Wm?eTk$g3O>>>mUFD5b)K9O3s~~oh#phC7o9U7>*^h^G>JZT_A=1 z1p^3#K(Gv+F?LlHQ~d2){;ov#O_6tC#d&DaHI~`$`$BI703j$%z|xu8`MYC%&+wZ7 z^bkS_ejD&#QG)Xa{szA#!0k3d>8&?}#sEqqU4=?b#V*3{ydbO$pt2-B>TY8q7@}(e zJqUv@+>vb6qfQ7>08}!vJ^-Ln`xZHe@&2ZGAnBcbq m5DN4eKq#@_?fob30sjMA1RibBtiR literal 0 HcmV?d00001 diff --git a/live/src/main/res/mipmap-xxxhdpi/ic_yola_vido.png b/live/src/main/res/mipmap-xxxhdpi/ic_yola_vido.png new file mode 100644 index 0000000000000000000000000000000000000000..149901d8f714286c106f63985a6b328c00a48ce5 GIT binary patch literal 9069 zcmV-zBa+;SP)P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/main/java/com/yunbao/main/activity/MainActivity.java index cdcf77842..baf82436d 100644 --- a/main/src/main/java/com/yunbao/main/activity/MainActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/MainActivity.java @@ -135,7 +135,8 @@ import com.yunbao.main.views.MainHomeComViewHolder; import com.yunbao.main.views.MainHomeCommunityViewHolder; import com.yunbao.main.views.MainHomeGameViewHolder; import com.yunbao.main.views.MainHomeLiveViewHolder; -import com.yunbao.main.views.MainHomeViewHolder; + +import com.yunbao.main.views.MainHomeViewHolder2; import com.yunbao.main.views.MainMeViewHolder; import com.yunbao.main.views.MainMessageViewHolder; import com.yunbao.video.utils.VideoStorge; @@ -180,7 +181,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene private ViewPager mViewPager; private List mViewList; private MainHomeComViewHolder mainHomeComViewHolder; - private MainHomeViewHolder mainHomeViewHolder; + private MainHomeViewHolder2 mainHomeViewHolder; private MainHomeCommunityViewHolder mMainHomeCommunityViewHolder; private MainHomeGameViewHolder mainHomeGameLiveViewHolder; private MainMessageViewHolder mainMessageViewHolder; @@ -1302,7 +1303,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene //mainHomeComViewHolder = new MainHomeComViewHolder(mContext, MainActivity.this, parent); vh = mainHomeComViewHolder; } else if (position == 1) { - mainHomeViewHolder = new MainHomeViewHolder(mContext, parent); + mainHomeViewHolder = new MainHomeViewHolder2(mContext, parent); vh = mainHomeViewHolder; /* mMainHomeCommunityViewHolder = new MainHomeCommunityViewHolder(mContext, parent, this);//直播 vh = mMainHomeCommunityViewHolder;*/ diff --git a/main/src/main/java/com/yunbao/main/adapter/MainHomeComAdapter2.java b/main/src/main/java/com/yunbao/main/adapter/MainHomeComAdapter2.java index 84ad73bcc..0748666eb 100644 --- a/main/src/main/java/com/yunbao/main/adapter/MainHomeComAdapter2.java +++ b/main/src/main/java/com/yunbao/main/adapter/MainHomeComAdapter2.java @@ -29,6 +29,7 @@ import com.yunbao.common.glide.ImgLoader; import com.yunbao.common.http.CommonHttpUtil; import com.yunbao.common.http.HttpCallback; import com.yunbao.common.interfaces.CommonCallback; +import com.yunbao.common.utils.RouteUtil; import com.yunbao.common.utils.StringUtil; import com.yunbao.common.utils.ToastUtil; import com.yunbao.common.views.NineGridLayout; @@ -156,6 +157,12 @@ public class MainHomeComAdapter2 extends RefreshAdapter { attentionImg.setImageResource(R.mipmap.ic_yola_attention); } + author.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + RouteUtil.forwardUserHome(bean.getUser_id()); + } + }); // likeImg.setOnClickListener(new View.OnClickListener() { // @Override // public void onClick(View v) { diff --git a/main/src/main/java/com/yunbao/main/adapter/MainHomeLiveAdapter.java b/main/src/main/java/com/yunbao/main/adapter/MainHomeLiveAdapter.java index 4f58b217e..78e6ad58b 100644 --- a/main/src/main/java/com/yunbao/main/adapter/MainHomeLiveAdapter.java +++ b/main/src/main/java/com/yunbao/main/adapter/MainHomeLiveAdapter.java @@ -19,6 +19,7 @@ import android.widget.TextView; import androidx.annotation.NonNull; import androidx.recyclerview.widget.RecyclerView; +import com.blankj.utilcode.util.LogUtils; import com.opensource.svgaplayer.SVGADrawable; import com.opensource.svgaplayer.SVGAImageView; import com.opensource.svgaplayer.SVGAParser; @@ -52,13 +53,18 @@ public class MainHomeLiveAdapter extends RefreshAdapter { private Context context; private int Height; private int getWeekIntIndex = 0; + private boolean showBaner =true; + + public void setShowBaner(boolean showBaner) { + // this.showBaner = showBaner; + } public MainHomeLiveAdapter(Context context, int h) { super(context); this.context = context; this.Height = h; mHeadView = mInflater.inflate(R.layout.item_main_home_live_head, null, false); - mHeadView.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, DpUtil.dp2px(120))); + mHeadView.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, DpUtil.dp2px(85))); } public View getHeadView() { @@ -67,10 +73,25 @@ public class MainHomeLiveAdapter extends RefreshAdapter { @Override public int getItemViewType(int position) { - if (position == 0) { + if (!showBaner){ + if (position % 2 == 1) { + return RIGHT; + }else { + return LEFT; + } + } + if (position == 4) { return HEAD; - } else if (position > 0) { - LiveBean mode = mList.get(position - 1); + } else{ + LiveBean mode; + if(mList.size()<4){ + if(position>=mList.size()){ + return HEAD; + } + mode= mList.get(position); + }else { + mode = mList.get(position > 4 ? position - 1 : position); + } if (TextUtils.equals(mode.getIs_week(), "1")) { return WEEKLAYOUT; } else { @@ -114,8 +135,9 @@ public class MainHomeLiveAdapter extends RefreshAdapter { @Override public void onBindViewHolder(@NonNull RecyclerView.ViewHolder vh, int position) { + int nowPosition = position>4?position-1:position; if (vh instanceof MainHomeLiveWeekItemViewHolder) { - ((MainHomeLiveWeekItemViewHolder) vh).loadViewDate(mList.get(position - 1), position - 1, Height, new MainHomeLiveWeekItemViewHolder.OnItemClickListener() { + ((MainHomeLiveWeekItemViewHolder) vh).loadViewDate(mList.get(nowPosition), nowPosition, Height, new MainHomeLiveWeekItemViewHolder.OnItemClickListener() { @Override public void onItemClick(LiveBean bean, int position) { if (mOnItemClickListener != null) { @@ -124,7 +146,7 @@ public class MainHomeLiveAdapter extends RefreshAdapter { } }); } else if (vh instanceof MainHomeLiveItemViewHolder) { - ((MainHomeLiveItemViewHolder) vh).loadViewDate(mList.get(position - 1), position - 1, Height, new MainHomeLiveItemViewHolder.OnItemClickListener() { + ((MainHomeLiveItemViewHolder) vh).loadViewDate(mList.get(nowPosition), nowPosition, Height, new MainHomeLiveItemViewHolder.OnItemClickListener() { @Override public void onItemClick(LiveBean bean, int position) { if (mOnItemClickListener != null) { @@ -137,7 +159,12 @@ public class MainHomeLiveAdapter extends RefreshAdapter { @Override public int getItemCount() { - return super.getItemCount() + 1; + if (!showBaner) + return super.getItemCount(); + if(mList.isEmpty()){ + return 0; + } + return super.getItemCount()+1; } class HeadVh extends RecyclerView.ViewHolder { diff --git a/main/src/main/java/com/yunbao/main/adapter/MainHomeLivesClassAdapter.java b/main/src/main/java/com/yunbao/main/adapter/MainHomeLivesClassAdapter.java index c082df357..b85baf801 100644 --- a/main/src/main/java/com/yunbao/main/adapter/MainHomeLivesClassAdapter.java +++ b/main/src/main/java/com/yunbao/main/adapter/MainHomeLivesClassAdapter.java @@ -3,13 +3,17 @@ package com.yunbao.main.adapter; import android.annotation.SuppressLint; import android.content.Context; import android.graphics.Color; +import android.graphics.Typeface; import android.os.Build; +import android.util.TypedValue; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; +import android.widget.ImageView; import android.widget.TextView; import androidx.annotation.NonNull; +import androidx.core.content.ContextCompat; import androidx.recyclerview.widget.RecyclerView; import com.yunbao.common.bean.LiveClassBean; @@ -57,7 +61,7 @@ public class MainHomeLivesClassAdapter extends RecyclerView.Adapter { + + + abstract public CommonRefreshView.DataHelper getDataHelper(); + + + abstract public void loadData(); + + + abstract public void release(); + +} + diff --git a/main/src/main/java/com/yunbao/main/views/LiveOptComAgent.java b/main/src/main/java/com/yunbao/main/views/LiveOptComAgent.java new file mode 100644 index 000000000..024b3b197 --- /dev/null +++ b/main/src/main/java/com/yunbao/main/views/LiveOptComAgent.java @@ -0,0 +1,125 @@ +package com.yunbao.main.views; + +import android.content.Context; +import android.util.Log; + +import com.alibaba.fastjson.JSON; +import com.yunbao.common.CommonAppConfig; +import com.yunbao.common.Constants; +import com.yunbao.common.adapter.RefreshAdapter; +import com.yunbao.common.bean.AnchorRecommendModel; +import com.yunbao.common.bean.LiveBean; +import com.yunbao.common.custom.CommonRefreshView; +import com.yunbao.common.http.HttpCallback; +import com.yunbao.common.interfaces.OnItemClickListener; +import com.yunbao.common.utils.RouteUtil; +import com.yunbao.main.activity.MainActivity; +import com.yunbao.main.activity.WeekWebViewActivity; +import com.yunbao.main.adapter.MainHomeLiveAdapter; +import com.yunbao.main.adapter.MainHomeRemFollLiveAdapter; +import com.yunbao.main.http.MainHttpConsts; +import com.yunbao.main.http.MainHttpUtil; + +import org.greenrobot.eventbus.EventBus; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import io.agora.beautyapi.faceunity.agora.SWAuManager; + +public class LiveOptComAgent implements LiveOptAgent { + + + private MainHomeLiveAdapter mAdapter; + private Context mContext; + public void watchLive(LiveBean liveBean, String key, int position) { + ((MainActivity) mContext).watchLive(liveBean, key, position); + } + + public LiveOptComAgent(Context context,MainHomeLiveAdapter adapter) { + mContext = context; + mAdapter = adapter; + } + + public static int pp; + + @Override + public void onItemClick(LiveBean bean, int position) { + if ("1".equals(bean.getIslive())) { + watchLive(bean, Constants.LIVE_HOME, position); + } else if (bean.getIs_week() != null && bean.getIs_week().equals("1")) { + String url = CommonAppConfig.HOST + bean.getUrl() + "?a=1"; + WeekWebViewActivity.forward(mContext, url, true); + } else { + RouteUtil.forwardUserHome(mContext, bean.getUid(), 0); + } + } + + public CommonRefreshView.DataHelper getDataHelper() { + return new CommonRefreshView.DataHelper() { + @Override + public RefreshAdapter getAdapter() { +// if (mAdapter == null) { +// mAdapter = new MainHomeRemFollLiveAdapter(mContext, MainActivity.Height); +// mAdapter.setOnItemClickListener(LiveOptComAgent.this); +// } +// Log.i("MainHomeViewHolder2", "LiveOptComAgent.getAdapter" ); + return null; + } + + @Override + public void loadData(int p, HttpCallback callback) { + pp = p; + Log.i("MainHomeViewHolder2", "LiveOptComAgent.loadData" ); + MainHttpUtil.getRandom(p, callback); + } + + @Override + public List processData(String[] info) { + if(pp == 1){ + return JSON.parseArray(Arrays.toString(info), LiveBean.class); + }else{ + return null; + } + } + + @Override + public void onRefreshSuccess(List list, int count) { + SWAuManager.get().preloadChannel(list); + EventBus.getDefault().post(new AnchorRecommendModel()); + } + + @Override + public void onRefreshFailure() { + + } + + @Override + public void onLoadMoreSuccess(List loadItemList, int loadItemCount) { + + } + + @Override + public void onLoadMoreFailure() { + + } + }; + } + + + public void loadData() { + if (mAdapter != null) { + SWAuManager.get().preloadChannel(mAdapter.getList()); + } + } + + + public void release() { + MainHttpUtil.cancel(MainHttpConsts.GET_RANDOM); + + } + + +} + diff --git a/main/src/main/java/com/yunbao/main/views/LiveOptFollAgent.java b/main/src/main/java/com/yunbao/main/views/LiveOptFollAgent.java new file mode 100644 index 000000000..46126a586 --- /dev/null +++ b/main/src/main/java/com/yunbao/main/views/LiveOptFollAgent.java @@ -0,0 +1,130 @@ +package com.yunbao.main.views; + +import android.content.Context; +import android.util.Log; + +import com.alibaba.fastjson.JSON; +import com.yunbao.common.CommonAppConfig; +import com.yunbao.common.Constants; +import com.yunbao.common.adapter.RefreshAdapter; +import com.yunbao.common.bean.AnchorRecommendModel; +import com.yunbao.common.bean.LiveBean; +import com.yunbao.common.custom.CommonRefreshView; +import com.yunbao.common.http.HttpCallback; +import com.yunbao.common.interfaces.OnItemClickListener; +import com.yunbao.common.utils.RouteUtil; +import com.yunbao.main.activity.MainActivity; +import com.yunbao.main.activity.WeekWebViewActivity; +import com.yunbao.main.adapter.MainHomeLiveAdapter; +import com.yunbao.main.adapter.MainHomeRemFollLiveAdapter; +import com.yunbao.main.http.MainHttpConsts; +import com.yunbao.main.http.MainHttpUtil; + +import org.greenrobot.eventbus.EventBus; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import io.agora.beautyapi.faceunity.agora.SWAuManager; + +public class LiveOptFollAgent implements LiveOptAgent { + + private MainHomeLiveAdapter mAdapter; + + private Context mContext; + public void watchLive(LiveBean liveBean, String key, int position) { + ((MainActivity) mContext).watchLive(liveBean, key, position); + } + + public LiveOptFollAgent(Context context,MainHomeLiveAdapter adapter) { + Log.i("MainHomeViewHolder2", "LiveOptFollAgent.LiveOptFollAgent"); + mContext = context; + mAdapter = adapter; + } + + + @Override + public void onItemClick(LiveBean bean, int position) { + if ("1".equals(bean.getIslive())) { + watchLive(bean, Constants.LIVE_HOME, position); + } else if (bean.getIs_week() != null && bean.getIs_week().equals("1")) { + String url = CommonAppConfig.HOST + bean.getUrl() + "?a=1"; + WeekWebViewActivity.forward(mContext, url, true); + } else { + RouteUtil.forwardUserHome(mContext, bean.getUid(), 0); + } + + + } + + public CommonRefreshView.DataHelper getDataHelper() { + return new CommonRefreshView.DataHelper() { + @Override + public RefreshAdapter getAdapter() { +// if (mAdapter == null) { +// mAdapter = new MainHomeRemFollLiveAdapter(mContext, MainActivity.Height); +// mAdapter.setOnItemClickListener(LiveOptFollAgent.this); +// } +// Log.i("MainHomeViewHolder2", "LiveOptFollAgent.getAdapter" ); + return null; + } + + @Override + public void loadData(int p, HttpCallback callback) { + Log.i("t2", "aaa" + p); + MainHttpUtil.getHomeFollow(p, callback); + Log.i("MainHomeViewHolder2", "LiveOptFollAgent.loadData" ); + } + + @Override + public List processData(String[] info) { + return JSON.parseArray(Arrays.toString(info), LiveBean.class); + } + + @Override + public void onRefreshSuccess(List list, int count) { + SWAuManager.get().preloadChannel(list); + EventBus.getDefault().post(new AnchorRecommendModel()); + } + + @Override + public void onRefreshFailure() { + Log.i("MainHomeViewHolder2", "LiveOptFollAgent.onRefreshFailure" ); + } + + @Override + public void onLoadMoreSuccess(List loadItemList, int loadItemCount) { + List new_data = new ArrayList<>(); + for (int j = 0; j < loadItemList.size(); j++) { + if (loadItemList.get(j).getUserNiceName() != null) { + new_data.add(loadItemList.get(j)); + } + } + SWAuManager.get().preloadChannel(new_data); + mAdapter.insertList(new_data); + } + + @Override + public void onLoadMoreFailure() { + Log.i("MainHomeViewHolder2", "LiveOptFollAgent.onLoadMoreFailure" ); + } + }; + } + + + public void loadData() { + if (mAdapter != null) { + SWAuManager.get().preloadChannel(mAdapter.getList()); + } + } + + + public void release() { + MainHttpUtil.cancel(MainHttpConsts.GET_HOME_FOLLOW); + + } + + +} + diff --git a/main/src/main/java/com/yunbao/main/views/MainHomeLiveViewHolder.java b/main/src/main/java/com/yunbao/main/views/MainHomeLiveViewHolder.java index 1fe92a305..95d866d30 100644 --- a/main/src/main/java/com/yunbao/main/views/MainHomeLiveViewHolder.java +++ b/main/src/main/java/com/yunbao/main/views/MainHomeLiveViewHolder.java @@ -6,6 +6,8 @@ import android.app.Dialog; import android.content.Context; import android.graphics.Outline; import android.graphics.drawable.Drawable; +import android.os.Handler; +import android.os.Looper; import android.text.TextUtils; import android.util.Log; import android.view.View; @@ -163,14 +165,16 @@ public class MainHomeLiveViewHolder extends AbsMainHomeChildViewHolder implement gridLayoutManager.setSpanSizeLookup(new GridLayoutManager.SpanSizeLookup() { @Override public int getSpanSize(int position) { - if (position == 0) { + if (position == 4) { + return 2; + }else if(mAdapter.getList().size()<4&&position==mAdapter.getList().size()){ return 2; } return 1; } }); mRefreshView.setLayoutManager(gridLayoutManager); - ItemDecoration decoration = new ItemDecoration(mContext, 0x00000000, 5, 0); + ItemDecoration decoration = new ItemDecoration(mContext, 0x00000000, 7, 0); decoration.setOnlySetItemOffsetsButNoDraw(true); mRefreshView.setItemDecoration(decoration); mAdapter = new MainHomeLiveAdapter(mContext, MainActivity.Height); @@ -189,6 +193,7 @@ public class MainHomeLiveViewHolder extends AbsMainHomeChildViewHolder implement Log.i("t2", "aaa" + p); if (TextUtils.equals(typeHot, "Hot") || TextUtils.equals(typeHot, "hot") || TextUtils.equals(typeHot, "熱門")) { pp = 1; +// MainHttpUtil.getHot(p, callback); LiveHttpUtil.getAnchorLastWeekList(new HttpCallback() { @Override public void onSuccess(int code, String msg, String[] info) { @@ -226,7 +231,7 @@ public class MainHomeLiveViewHolder extends AbsMainHomeChildViewHolder implement if (info.length > 0) { JSONObject obj = JSON.parseObject(info[0]); - mBannerList = JSON.parseArray(obj.getString("slide"), BannerBean.class); + mBannerList = JSON.parseArray(obj.getString("slide_pic"), BannerBean.class); if (!obj.containsKey("list")) { return new_data; } @@ -330,9 +335,14 @@ public class MainHomeLiveViewHolder extends AbsMainHomeChildViewHolder implement if (!canClick()) { return; } + // mRefreshView.getRefreshView().scrollToPosition(0); + mAdapter.clearData(); select = bean.getId(); typeHot = bean.getEnglish(); - mRefreshView.initData(); + new Handler(Looper.getMainLooper()) + .postDelayed(() -> { + mRefreshView.initData(); + }, 100); topAdapter.choice = position; topAdapter.notifyDataSetChanged(); @@ -348,7 +358,7 @@ public class MainHomeLiveViewHolder extends AbsMainHomeChildViewHolder implement mBanner.setOutlineProvider(new ViewOutlineProvider() { @Override public void getOutline(View view, Outline outline) { - outline.setRoundRect(0, 0, view.getWidth(), view.getHeight(), 10); + outline.setRoundRect(0, 0, view.getWidth(), view.getHeight(), 30); } }); mBanner.setClipToOutline(true); diff --git a/main/src/main/java/com/yunbao/main/views/MainHomeNewViewHolder.java b/main/src/main/java/com/yunbao/main/views/MainHomeNewViewHolder.java index 6c4215c9a..7dda1f333 100644 --- a/main/src/main/java/com/yunbao/main/views/MainHomeNewViewHolder.java +++ b/main/src/main/java/com/yunbao/main/views/MainHomeNewViewHolder.java @@ -13,22 +13,18 @@ import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; import com.alibaba.fastjson.JSON; -import com.google.gson.Gson; import com.yunbao.common.CommonAppConfig; import com.yunbao.common.Constants; import com.yunbao.common.adapter.RefreshAdapter; import com.yunbao.common.bean.ActiveBean; import com.yunbao.common.bean.NewCommunityType; import com.yunbao.common.custom.CommonRefreshView; -import com.yunbao.common.custom.CommonRefreshWaterfallView; import com.yunbao.common.http.CommonHttpUtil; import com.yunbao.common.http.HttpCallback; import com.yunbao.common.interfaces.OnItemClickListener; -import com.yunbao.common.manager.CommunityTypeManager; import com.yunbao.common.manager.OpenAdManager; import com.yunbao.common.utils.DialogUitl; import com.yunbao.common.utils.RouteUtil; -import com.yunbao.common.utils.StringUtil; import com.yunbao.main.R; import com.yunbao.main.adapter.MainHomeComAdapter2; import com.yunbao.main.adapter.MainHomeComClassAdapter; diff --git a/main/src/main/java/com/yunbao/main/views/MainHomeRecomLiveViewHolder.java b/main/src/main/java/com/yunbao/main/views/MainHomeRecomLiveViewHolder.java index ec5025544..12b2b3fb7 100644 --- a/main/src/main/java/com/yunbao/main/views/MainHomeRecomLiveViewHolder.java +++ b/main/src/main/java/com/yunbao/main/views/MainHomeRecomLiveViewHolder.java @@ -125,7 +125,6 @@ public class MainHomeRecomLiveViewHolder extends AbsMainHomeChildViewHolder impl } }); - mRefreshView.initData(); @@ -149,9 +148,6 @@ public class MainHomeRecomLiveViewHolder extends AbsMainHomeChildViewHolder impl @Override public void loadData() { -// if (mRefreshView != null) { -// mRefreshView.initData(); -// } if (mAdapter != null) { SWAuManager.get().preloadChannel(mAdapter.getList()); } diff --git a/main/src/main/java/com/yunbao/main/views/MainHomeViewHolder2.java b/main/src/main/java/com/yunbao/main/views/MainHomeViewHolder2.java new file mode 100644 index 000000000..297585b55 --- /dev/null +++ b/main/src/main/java/com/yunbao/main/views/MainHomeViewHolder2.java @@ -0,0 +1,683 @@ +package com.yunbao.main.views; + +import android.animation.ObjectAnimator; +import android.app.Activity; +import android.app.Dialog; +import android.content.Context; + +import android.graphics.Outline; +import android.graphics.drawable.Drawable; +import android.os.Handler; +import android.os.Looper; +import android.text.TextUtils; +import android.util.Log; +import android.view.View; +import android.view.ViewGroup; +import android.view.ViewOutlineProvider; +import android.widget.ImageView; + + +import androidx.annotation.Nullable; +import androidx.core.app.ActivityCompat; +import androidx.recyclerview.widget.GridLayoutManager; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +import com.bumptech.glide.Glide; +import com.bumptech.glide.load.DataSource; +import com.bumptech.glide.load.engine.GlideException; +import com.bumptech.glide.request.RequestListener; +import com.bumptech.glide.request.target.DrawableImageViewTarget; +import com.bumptech.glide.request.target.Target; +import com.ms.banner.Banner; +import com.ms.banner.listener.OnBannerClickListener; +import com.yunbao.common.CommonAppConfig; +import com.yunbao.common.Constants; +import com.yunbao.common.activity.WebViewActivity; +import com.yunbao.common.adapter.RefreshAdapter; +import com.yunbao.common.bean.AnchorRecommendModel; +import com.yunbao.common.bean.BannerBean; +import com.yunbao.common.bean.LiveBean; +import com.yunbao.common.bean.LiveClassBean; +import com.yunbao.common.bean.WeekListBean; +import com.yunbao.common.custom.CommonRefreshView; +import com.yunbao.common.custom.ItemDecoration; +import com.yunbao.common.dialog.GiftWallDialog; +import com.yunbao.common.event.LiveRoomChangeEvent; +import com.yunbao.common.http.HttpCallback; +import com.yunbao.common.http.LiveHttpUtil; +import com.yunbao.common.interfaces.OnItemClickListener; +import com.yunbao.common.manager.IMLoginManager; +import com.yunbao.common.manager.LiveClassManager; +import com.yunbao.common.utils.DialogUitl; +import com.yunbao.common.utils.LiveRoomCheckLivePresenter; +import com.yunbao.common.utils.MicStatusManager; +import com.yunbao.common.utils.MobclickAgent; +import com.yunbao.common.utils.RouteUtil; +import com.yunbao.common.utils.StringUtil; +import com.yunbao.common.utils.ToastUtil; +import com.yunbao.common.views.CustomViewHolder; +import com.yunbao.live.utils.LiveStorge; +import com.yunbao.live.views.LiveRoomViewHolder; +import com.yunbao.main.R; +import com.yunbao.main.activity.MainActivity; +import com.yunbao.main.adapter.MainHomeLiveAdapter; +import com.yunbao.main.adapter.MainHomeLivesClassAdapter; +import com.yunbao.main.http.MainHttpConsts; +import com.yunbao.main.http.MainHttpUtil; + +import org.greenrobot.eventbus.EventBus; +import org.greenrobot.eventbus.Subscribe; +import org.greenrobot.eventbus.ThreadMode; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import io.agora.beautyapi.faceunity.agora.SWAuManager; + + +/** + * Created by cxf on 2018/9/22. + * MainActivity 新的直播首页 + */ + +public class MainHomeViewHolder2 extends AbsMainHomeChildViewHolder implements OnItemClickListener, LiveOptAgent { + + + private View mShadow; + private View mBtnDismiss; + public static CommonRefreshView mRefreshView; + private RecyclerView mClassRecyclerViewTop; + private MainHomeLiveAdapter mAdapter; + private ObjectAnimator mShowAnimator; + private ObjectAnimator mHideAnimator; + private Banner mBanner; + private boolean mBannerShowed; + private List mBannerList; + private List mWeekListBean; + public static ImageView btnUseIco; + private int select = 0; + //是否是首頁 + private int intoIndex = 0; + private List new_data; + private boolean isHave = false; + private Map gotoRoomKey = new HashMap<>(); + private Dialog mShowLoadingDialog; + private String typeHot; + + + private LiveOptAgent mLiveOptFollAgent, mLiveOptComAgent; + private LiveOptAgent nowLiveOptAgent = this; + + public MainHomeViewHolder2(Context context, ViewGroup parentView) { + super(context, parentView); + + } + + @Override + protected int getLayoutId() { + return R.layout.view_main_home2; + } + + public static int pp; + + //显示顶部商城tab时,显示底部tabGroup + @Subscribe(threadMode = ThreadMode.MAIN) + public void onUpdata(String str) { + if ("Updata".equals(str)) { + if (mRefreshView != null) { + mRefreshView.showRefreshBar(); + mRefreshView.mRecyclerView.scrollToPosition(0); + } + } else if ("blacklist".equals(str)) { + if (mRefreshView != null) { + mRefreshView.showRefreshBar(); + } + } + } + + @Override + public void init() { + List list = new LiveClassManager(mContext).getLiveClass(); + if (list != null && !list.isEmpty()) { + typeHot = list.get(0).getEnglish(); + select = list.get(0).getId(); + } + list.add(0, getAttentionLiveClass()); + if (list.size() > 2) { + list.add(2, getCoLiveClass()); + } else { + list.add(getCoLiveClass()); + } + + + mShadow = findViewById(R.id.shadow); + mBtnDismiss = findViewById(R.id.btn_dismiss); + mBtnDismiss.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + if (canClick()) { + if (mShowAnimator != null) { + mShowAnimator.cancel(); + } + if (mHideAnimator != null) { + mHideAnimator.start(); + } + } + } + }); + mRefreshView = (CommonRefreshView) findViewById(R.id.refreshView); + btnUseIco = (ImageView) findViewById(R.id.btn_use_ico); + mRefreshView.setEmptyLayoutId(R.layout.view_no_data_live); + EventBus.getDefault().register(this); + + GridLayoutManager gridLayoutManager = new GridLayoutManager(mContext, 2, GridLayoutManager.VERTICAL, false); + gridLayoutManager.setSpanSizeLookup(new GridLayoutManager.SpanSizeLookup() { + @Override + public int getSpanSize(int position) { +// if (nowLiveOptAgent!= MainHomeViewHolder2.this) +// return 1; + + if (position == 4) { + return 2; + } else if (mAdapter.getList().size() < 4 && position == mAdapter.getList().size()) { + return 2; + } + return 1; + } + }); + mRefreshView.setLayoutManager(gridLayoutManager); + ItemDecoration decoration = new ItemDecoration(mContext, 0x00000000, 5, 0); + decoration.setOnlySetItemOffsetsButNoDraw(true); + mRefreshView.setItemDecoration(decoration); + mAdapter = new MainHomeLiveAdapter(mContext, MainActivity.Height); + mAdapter.setOnItemClickListener(MainHomeViewHolder2.this); + mLiveOptFollAgent = new LiveOptFollAgent(mContext,mAdapter); + mLiveOptComAgent = new LiveOptComAgent(mContext,mAdapter); + mAdapter.setHasStableIds(true);// + mRefreshView.setLoadMoreEnable(true); + mRefreshView.setRecyclerViewAdapter(mAdapter); + mRefreshView.setDataHelper(getDataHelper()); + mClassRecyclerViewTop = (RecyclerView) findViewById(R.id.topTitleRecyclerView); + mClassRecyclerViewTop.setHasFixedSize(true); + mClassRecyclerViewTop.setLayoutManager(new LinearLayoutManager(mContext, LinearLayoutManager.HORIZONTAL, false)); + + if (list != null && list.size() > 0) { + List targetList = new ArrayList<>(); + if (list.size() <= 6) { + targetList.addAll(list); + } else { + targetList.addAll(list); + } + final MainHomeLivesClassAdapter topAdapter = new MainHomeLivesClassAdapter(mContext, targetList, false); + topAdapter.choice = 1; + topAdapter.setOnItemClickListener(new OnItemClickListener() { + @Override + public void onItemClick(LiveClassBean bean, int position) { + switch (bean.getEnglish()) { + case "Hot": + MobclickAgent.onEvent(mContext, "home_page_recommend_hot", "热门"); + break; + case "New": + MobclickAgent.onEvent(mContext, "home_page_recommend_new", "新秀"); + break; + case "Pretty": + MobclickAgent.onEvent(mContext, "home_page_recommend_pretty", "颜值"); + break; + case "Dance": + MobclickAgent.onEvent(mContext, "home_page_recommend_dance", "舞蹈"); + break; + case "Mr.Right": + MobclickAgent.onEvent(mContext, "home_page_recommend_mr.right", "男神"); + break; + case "Music": + MobclickAgent.onEvent(mContext, "home_page_recommend_music", "音乐"); + break; + default: + MobclickAgent.onEvent(mContext, "home_page_recommend_other", "其他"); + break; + } + if (!canClick()) { + return; + } + mAdapter.clearData(); + select = bean.getId(); + boolean flag = false; + if (position == 0) { + Log.i("MainHomeViewHolder2", "mLiveOptFollAgent:"); + flag= changeLiveOptAgent(mLiveOptFollAgent); + } else if (position == 2) { + Log.i("MainHomeViewHolder2", "mLiveOptComAgent:"); + flag= changeLiveOptAgent(mLiveOptComAgent); + } else { + Log.i("MainHomeViewHolder2", "MainHomeViewHolder2:"); + flag= changeLiveOptAgent(MainHomeViewHolder2.this); + } + typeHot = bean.getEnglish(); + if (!flag){ + new Handler(Looper.getMainLooper()) + .postDelayed(() -> { + mRefreshView.initData(); + }, 100); + } + topAdapter.choice = position; + topAdapter.notifyDataSetChanged(); + + } + }); + if (mClassRecyclerViewTop != null) { + mClassRecyclerViewTop.setAdapter(topAdapter); + } + } + View headView = mAdapter.getHeadView(); + mBanner = (Banner) headView.findViewById(R.id.banner); + mRefreshView.initData(); + mBanner.setOutlineProvider(new ViewOutlineProvider() { + @Override + public void getOutline(View view, Outline outline) { + outline.setRoundRect(0, 0, view.getWidth(), view.getHeight(), 10); + } + }); + mBanner.setClipToOutline(true); + String adUrl = ((Activity) mContext).getIntent().getStringExtra("ad_url"); + ImageView ad = headView.findViewById(R.id.ad_img); + if (StringUtil.isEmpty(adUrl)) { + ActivityCompat.startPostponedEnterTransition((Activity) mContext); + ad.setVisibility(View.GONE); + } else { + //ImgLoader.display(mContext, adUrl, ad); + + Glide.with(mContext) + .load(adUrl) + .listener(new RequestListener() { + @Override + public boolean onLoadFailed(@Nullable GlideException e, Object model, Target target, boolean isFirstResource) { + ActivityCompat.startPostponedEnterTransition((Activity) mContext); + return false; + } + + @Override + public boolean onResourceReady(Drawable resource, Object model, Target target, DataSource dataSource, boolean isFirstResource) { + ActivityCompat.startPostponedEnterTransition((Activity) mContext); + return false; + } + }) + /* .addListener(new RequestListener() { + @Override + public boolean onLoadFailed(@Nullable GlideException e, Object model, Target target, boolean isFirstResource) { + ActivityCompat.startPostponedEnterTransition((Activity) mContext); + return false; + } + + @Override + public boolean onResourceReady(Drawable resource, Object model, Target target, DataSource dataSource, boolean isFirstResource) { + ActivityCompat.startPostponedEnterTransition((Activity) mContext); + return false; + } + })*/ + .error(R.mipmap.ic_launcher) + .into(new DrawableImageViewTarget(ad)); + + } + } + + private boolean changeLiveOptAgent(LiveOptAgent liveOptAgent) { + if (nowLiveOptAgent == liveOptAgent) { + return false; + } + + nowLiveOptAgent= liveOptAgent; + if (liveOptAgent==this){ + // mRefreshView.setRecyclerViewAdapter(mAdapter); + mRefreshView.setDataHelper(getDataHelper()); + mAdapter.setOnItemClickListener(this); + mAdapter.setShowBaner(true); + }else { + // mRefreshView.setRecyclerViewAdapter(liveOptAgent.getDataHelper().getAdapter()); + mRefreshView.setDataHelper(liveOptAgent.getDataHelper()); + mAdapter.setOnItemClickListener(liveOptAgent); + mAdapter.setShowBaner(false); + } + new Handler(Looper.getMainLooper()) + .postDelayed(() -> { + mRefreshView.initData(); + }, 100); + return true; + } + + + private void gotoLive(final String live_id) { + LiveHttpUtil.getLiveInfo(live_id, new HttpCallback() { + @Override + public void onSuccess(int code, String msg, String[] info) { + if (code == 0 && info.length > 0) { + LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class); + if (liveBean == null) { + return; + } + intoIndex = 1; + if (gotoRoomKey != null && gotoRoomKey.isEmpty()) { + gotoRoomKey = null; + } + liveBean.setParams(gotoRoomKey); + new LiveRoomCheckLivePresenter(mContext, liveBean.getUid(), liveBean.getStream(), new LiveRoomCheckLivePresenter.NewActionListener() { + @Override + public void onLiveRoomChanged(String liveUid, String stream, int liveType, String liveTypeVal, String liveSdk, boolean isSw) { + RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveSdk), Integer.parseInt(liveTypeVal), isSw); + } + + @Override + public void onCheckError(String contextError) { + + } + }); + + } else { + intoIndex = 1; + RouteUtil.forwardUserHome(mContext, live_id, 0); + } + } + }); + } + + private void showBanner() { + if (mBannerList == null || mBannerList.size() == 0 || mBanner == null) { + return; + } + if (mBannerShowed) { + return; + } + mBannerShowed = true; + mBanner.setAutoPlay(true) + .setPages(mBannerList, new CustomViewHolder()) + .setDelayTime(3000) + .setOnBannerClickListener(new OnBannerClickListener() { + @Override + public void onBannerClick(List datas, int p) { + if (mBannerList != null) { + if (p >= 0 && p < mBannerList.size()) { + BannerBean bean = mBannerList.get(p); + if (bean != null) { + String link = bean.getLink(); + if (bean.getType() == 2) { + if (bean.getLink().isEmpty()) { + ToastUtil.show("暫無法簽到,請稍後再試"); + return; + } else { + if (gotoRoomKey == null) { + gotoRoomKey = new HashMap<>(); + } + gotoRoomKey.put("OPEN", "NEWUSER"); + } + } + showLoadingDialog(); + + Map map_ekv = new HashMap(); + map_ekv.put("link", link); + MobclickAgent.onEvent(mContext, "home_page_recommend_banner", map_ekv); + + if (link.contains("http")) { + WebViewActivity.forward(mContext, link, true, false); + } else if ("home_page_banner_battle".equals(link)) { + RouteUtil.forwardBattlePass(); + } else if ("home_page_banner_giftwall".equals(link)) { + if (mShowLoadingDialog != null && mShowLoadingDialog.isShowing()) { + mShowLoadingDialog.dismiss(); + } + new GiftWallDialog(mContext, IMLoginManager.get(mContext).getUserInfo().getId() + "", + IMLoginManager.get(mContext).getUserInfo().getUserNicename(), null + , false).setFullWindows(true).setTab2(true).showDialog(); + } else { + gotoLive(link); + } + } + } + } + } + }) + .start(); + } + + /** + * Banner双击可能会导致进入两次直播间,点击Banner后需要展示加载中动画 + */ + private void showLoadingDialog() { + mShowLoadingDialog = DialogUitl.loadingDialog(mContext); + mShowLoadingDialog.show(); + } + + @Override + public void onItemClick(LiveBean bean, int position) { + if ("1".equals(bean.getIslive())) { + intoIndex = 1; + watchLive(bean, Constants.LIVE_HOME, position); + } else if (bean.getIs_week() != null && bean.getIs_week().equals("1")) { + String url = CommonAppConfig.HOST + bean.getUrl() + "?a=1"; + LiveHttpUtil.getLiveInfo(bean.getUid(), new HttpCallback() { + @Override + public void onSuccess(int code, String msg, String[] info) { + if (code == 0 && info.length > 0) { + LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class); + + if (liveBean == null) { + return; + } + new LiveRoomCheckLivePresenter(mContext, liveBean.getUid(), liveBean.getStream(), new LiveRoomCheckLivePresenter.NewActionListener() { + @Override + public void onLiveRoomChanged(String liveUid, String stream, int liveType, String liveTypeVal, String liveSdk, boolean isSw) { + + if (LiveRoomViewHolder.mHandler != null) { + LiveRoomViewHolder.mHandler.removeCallbacksAndMessages(null); + } + if (!"".endsWith(Constants.mStream)) { + if (MicStatusManager.getInstance().isMic(liveUid)) { + MicStatusManager.getInstance().showDownMicDialog(mContext); + return; + } + EventBus.getDefault().post(new LiveRoomChangeEvent(liveBean, liveType, Integer.parseInt(liveTypeVal))); + } else { + RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveTypeVal), Integer.parseInt(liveSdk), isSw); + } + } + + @Override + public void onCheckError(String contextError) { + + } + }); + + } else { + ToastUtil.show(msg); + } + } + }); + } else { + intoIndex = 1; + RouteUtil.forwardUserHome(mContext, bean.getUid(), 0); + } + } + + + @Override + public CommonRefreshView.DataHelper getDataHelper() { + return new CommonRefreshView.DataHelper() { + @Override + public RefreshAdapter getAdapter() { + return null; + } + + @Override + public void loadData(int p, HttpCallback callback) { + Log.i("t2", "aaa" + p); + if (TextUtils.equals(typeHot, "Hot") || TextUtils.equals(typeHot, "hot") || TextUtils.equals(typeHot, "熱門")) { + pp = 1; + LiveHttpUtil.getAnchorLastWeekList(new HttpCallback() { + @Override + public void onSuccess(int code, String msg, String[] info) { + if (mWeekListBean != null) { + mWeekListBean.clear(); + } + if (code == 0 && info.length > 0) { + mWeekListBean = JSON.parseArray(Arrays.toString(info), WeekListBean.class); + } else { + mWeekListBean = null; + } + if (mWeekListBean != null && mWeekListBean.size() > 0) { + mAdapter.setWeekList(mWeekListBean); + isHave = true; + } else { + mAdapter.moveWeekList(); + isHave = false; + } + Constants.getWeekIntIndex = Constants.getWeekIntIndex + 1; + MainHttpUtil.getHot(p, callback); + } + }); + } else { + pp = 0; +// if (select == 0) { +// select = list.get(0).getId(); +// } + MainHttpUtil.getClassLive(select, p, callback); + } + } + + @Override + public List processData(String[] info) { + new_data = new ArrayList<>(); + if (info.length > 0) { + JSONObject obj = JSON.parseObject(info[0]); + + mBannerList = JSON.parseArray(obj.getString("slide"), BannerBean.class); + if (!obj.containsKey("list")) { + return new_data; + } + List old_data = JSON.parseArray(obj.getString("list"), LiveBean.class); + LiveBean liveModel = null; + if (old_data == null) { + return new_data; + } + for (LiveBean model : old_data) { + //判断周星榜数据 + if (TextUtils.equals(model.getIs_week(), "1")) { + if (mWeekListBean != null && mWeekListBean.size() > 0) { + model.setmWeekList(mWeekListBean); + } else { + liveModel = model; + } + } + } + //满足有周星榜字段但是没有周星榜数据的删掉 + if (liveModel != null) { + old_data.remove(liveModel); + } + SWAuManager.get().preloadChannel(old_data); + new_data.addAll(old_data); + + } + return new_data; + } + + @Override + public void onRefreshSuccess(List list, int count) { + if (CommonAppConfig.LIVE_ROOM_SCROLL) { + LiveStorge.getInstance().put(Constants.LIVE_HOME, list); + } + showBanner(); + EventBus.getDefault().post(new AnchorRecommendModel()); + } + + @Override + public void onRefreshFailure() { + + } + + @Override + public void onLoadMoreSuccess(List loadItemList, int loadItemCount) { + new_data = new ArrayList<>(); + for (int j = 0; j < loadItemList.size(); j++) { + if (loadItemList.get(j).getUserNiceName() != null) { + new_data.add(loadItemList.get(j)); + } + } + if (loadItemList.size() > 0) { + SWAuManager.get().preloadChannel(new_data); + mAdapter.insertList(new_data); + } + } + + @Override + public void onLoadMoreFailure() { + + } + }; + } + + @Override + public void loadData() { + if (nowLiveOptAgent != this) { + nowLiveOptAgent.loadData(); + } else { + if (mAdapter != null) { + SWAuManager.get().preloadChannel(mAdapter.getList()); + } + } + } + + @Override + public void release() { + MainHttpUtil.cancel(MainHttpConsts.GET_HOT); + if (mHideAnimator != null) { + mHideAnimator.cancel(); + } + if (mShowAnimator != null) { + mShowAnimator.cancel(); + } + if (mAdapter != null) { + mAdapter.clearAnimator(); + } + mShowAnimator = null; + mHideAnimator = null; + mLiveOptFollAgent.release(); + mLiveOptComAgent.release(); + } + + @Override + public void onDestroy() { + super.onDestroy(); + release(); + } + + @Override + public void onResume() { + super.onResume(); + } + + @Override + public void onPause() { + super.onPause(); + if (mShowLoadingDialog != null) { + mShowLoadingDialog.dismiss(); + mShowLoadingDialog = null; + } + } + + //获取关注的 + private LiveClassBean getAttentionLiveClass() { + LiveClassBean liveClassBean = new LiveClassBean("關注", "Follow"); + liveClassBean.setId(Integer.MAX_VALUE); + return liveClassBean; + } + + //获取推荐的 + private LiveClassBean getCoLiveClass() { + LiveClassBean liveClassBean = new LiveClassBean("推薦", "Recommend"); + liveClassBean.setId(Integer.MAX_VALUE); + return liveClassBean; + } +} diff --git a/main/src/main/res/layout/item_main_live_com_class.xml b/main/src/main/res/layout/item_main_live_com_class.xml new file mode 100644 index 000000000..540247ced --- /dev/null +++ b/main/src/main/res/layout/item_main_live_com_class.xml @@ -0,0 +1,35 @@ + + + + + + + + + \ No newline at end of file diff --git a/main/src/main/res/layout/view_main_home2.xml b/main/src/main/res/layout/view_main_home2.xml new file mode 100644 index 000000000..a1fa19e54 --- /dev/null +++ b/main/src/main/res/layout/view_main_home2.xml @@ -0,0 +1,111 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file