From 3225cf5d5f38409a136be179587325a77f542891 Mon Sep 17 00:00:00 2001 From: 18142669586 <1669783059@qq.com> Date: Fri, 16 Sep 2022 14:21:21 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E7=9A=87=E5=B8=9D=E6=8E=A8?= =?UTF-8?q?=E8=8D=90=E8=BE=B9=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/yunbao/live/bean/LiveBean.java | 9 +++++++++ .../adapter/MainHomeRemFollLiveAdapter.java | 15 ++++++++++++++- .../yunbao/main/adapter/MainListAdapter.java | 1 + .../main/views/MainHomeLiveItemViewHolder.java | 15 ++++++++++++++- .../main/res/layout/item_main_home_lives.xml | 16 +++++++++++++++- .../mipmap-xxhdpi/emperor_recommendation.png | Bin 0 -> 4081 bytes .../superemperor_recommendation.png | Bin 0 -> 4402 bytes 7 files changed, 53 insertions(+), 3 deletions(-) create mode 100644 main/src/main/res/mipmap-xxhdpi/emperor_recommendation.png create mode 100644 main/src/main/res/mipmap-xxhdpi/superemperor_recommendation.png diff --git a/live/src/main/java/com/yunbao/live/bean/LiveBean.java b/live/src/main/java/com/yunbao/live/bean/LiveBean.java index c47c04d95..de2b4b989 100644 --- a/live/src/main/java/com/yunbao/live/bean/LiveBean.java +++ b/live/src/main/java/com/yunbao/live/bean/LiveBean.java @@ -50,6 +50,15 @@ public class LiveBean implements Parcelable { private int is_rong; //是否關注 1,關注 2,未關注 private String isattention = ""; + private String recommendCardtype = ""; + + public String getRecommendcardtype() { + return recommendCardtype; + } + + public void setRecommendcardtype(String recommendcardtype) { + this.recommendCardtype = recommendcardtype; + } public String getIsattention() { return isattention; diff --git a/main/src/main/java/com/yunbao/main/adapter/MainHomeRemFollLiveAdapter.java b/main/src/main/java/com/yunbao/main/adapter/MainHomeRemFollLiveAdapter.java index d500b999a..1a43e9696 100644 --- a/main/src/main/java/com/yunbao/main/adapter/MainHomeRemFollLiveAdapter.java +++ b/main/src/main/java/com/yunbao/main/adapter/MainHomeRemFollLiveAdapter.java @@ -71,7 +71,7 @@ public class MainHomeRemFollLiveAdapter extends RefreshAdapter { TextView mNum; ImageView mType; ImageView live_type; - + ImageView viewBg; ImageView mLiveIco; TextView mLiveState; MarqueeView mRvRankingList; @@ -98,6 +98,7 @@ public class MainHomeRemFollLiveAdapter extends RefreshAdapter { live_type = (ImageView) itemView.findViewById(R.id.live_type); views = itemView.findViewById(R.id.views); bgs = itemView.findViewById(R.id.bgs); + viewBg = (ImageView) itemView.findViewById(R.id.view_bg); RxView.clicks(itemView) .throttleFirst(2, TimeUnit.SECONDS) // 才发送 2s内第1次点击按钮的事件 .subscribe(new Observer() { @@ -137,6 +138,18 @@ public class MainHomeRemFollLiveAdapter extends RefreshAdapter { mRvRankingList.setVisibility(View.VISIBLE); live_info_view.setVisibility(View.VISIBLE); live_type.setImageDrawable(null); + viewBg.setVisibility(View.GONE); + //皇帝 + if(bean.getRecommendcardtype().equals("1")){ + viewBg.setImageResource(R.mipmap.emperor_recommendation); + viewBg.setVisibility(View.VISIBLE); + //超皇 + }else if(bean.getRecommendcardtype().equals("2")){ + viewBg.setImageResource(R.mipmap.superemperor_recommendation); + viewBg.setVisibility(View.VISIBLE); + }else{ + viewBg.setVisibility(View.GONE); + } if (bean.getContent_pic_size_two() != null && !bean.getContent_pic_size_two().equals("") && Height <= 1920) { Log.e("t1", position + "嗯" + Height + "111啊" + bean.getContent_pic_size_two()); diff --git a/main/src/main/java/com/yunbao/main/adapter/MainListAdapter.java b/main/src/main/java/com/yunbao/main/adapter/MainListAdapter.java index 026336a26..6d4f58960 100644 --- a/main/src/main/java/com/yunbao/main/adapter/MainListAdapter.java +++ b/main/src/main/java/com/yunbao/main/adapter/MainListAdapter.java @@ -54,6 +54,7 @@ public class MainListAdapter extends RefreshAdapter { private HeadVh mHeadVh; private int mType; + public MainListAdapter(Context context, int type) { super(context); mType = type; diff --git a/main/src/main/java/com/yunbao/main/views/MainHomeLiveItemViewHolder.java b/main/src/main/java/com/yunbao/main/views/MainHomeLiveItemViewHolder.java index 0af5096e6..5939f0ba8 100644 --- a/main/src/main/java/com/yunbao/main/views/MainHomeLiveItemViewHolder.java +++ b/main/src/main/java/com/yunbao/main/views/MainHomeLiveItemViewHolder.java @@ -28,7 +28,7 @@ import kotlin.Unit; * 直播页面布局 */ public class MainHomeLiveItemViewHolder extends RecyclerView.ViewHolder { - private ImageView mCover, liveType, mLiveIco, mType, pkico, drPkIco, pkAvatar; + private ImageView mCover, liveType, mLiveIco, mType, pkico, drPkIco, pkAvatar,viewBg; private RatioRoundImageView bgs; private View views; private TextView mLiveState, mTitle, mName, mNum; @@ -51,6 +51,7 @@ public class MainHomeLiveItemViewHolder extends RecyclerView.ViewHolder { pkico = (ImageView) itemView.findViewById(R.id.pk_ico); drPkIco = (ImageView) itemView.findViewById(R.id.dr_pk_ico); pkAvatar = (ImageView) itemView.findViewById(R.id.pk_avatar); + viewBg = (ImageView) itemView.findViewById(R.id.view_bg); } /** @@ -63,6 +64,18 @@ public class MainHomeLiveItemViewHolder extends RecyclerView.ViewHolder { Context mContext = itemView.getContext(); itemView.setTag(position); liveType.setImageDrawable(null); + viewBg.setVisibility(View.GONE); + //皇帝 + if(bean.getRecommendcardtype().equals("1")){ + viewBg.setImageResource(R.mipmap.emperor_recommendation); + viewBg.setVisibility(View.VISIBLE); + //超皇 + }else if(bean.getRecommendcardtype().equals("2")){ + viewBg.setImageResource(R.mipmap.superemperor_recommendation); + viewBg.setVisibility(View.VISIBLE); + }else{ + viewBg.setVisibility(View.GONE); + } if (bean.getContent_pic_size_two() != null && !bean.getContent_pic_size_two().equals("") && height <= 1920) { Picasso.with(mContext) .load(bean.getContent_pic_size_two()) diff --git a/main/src/main/res/layout/item_main_home_lives.xml b/main/src/main/res/layout/item_main_home_lives.xml index cb54ba095..a9649e8ac 100644 --- a/main/src/main/res/layout/item_main_home_lives.xml +++ b/main/src/main/res/layout/item_main_home_lives.xml @@ -6,6 +6,11 @@ android:gravity="center" android:orientation="vertical"> + + + + + + - + + \ No newline at end of file diff --git a/main/src/main/res/mipmap-xxhdpi/emperor_recommendation.png b/main/src/main/res/mipmap-xxhdpi/emperor_recommendation.png new file mode 100644 index 0000000000000000000000000000000000000000..6b4127d3db0bd2ee62501f44874b21bc56021ece GIT binary patch literal 4081 zcmbVP2~<;88orb&ZAU?&Xcd$UI##OLAOsQ#A#9eZ2vs5m~jCr36I`$PRM@!~tZ~Y0k^ZyZ`=u_y6yEN$}se ze*Sw)-va>5_xad!697g%`tLh)p`={XoCtrGNWAEh&4MtAlp#U@jV)jzC?6gp9NC00 z*wK-{AT9tHM{xq^61wjOGE2b2F!VMU8BYkk0dS$pgbWrJk)W7JIEPQM?J88;qBv}d zZIGic&R6JxZ0CF|7a^PF8v|H!E{nvrrMjYAWMmkChe#MG883n_Cd(+c<8jIGUN6Sl zqQ*@mT#D^PQFLE_l!rispokb8nuWs=QBEWbo=9+VbXbeB$JyhtID0JK5sk-_9qq|@ z2h`-p7G@K%!^oRFy(e?Q6~%VDL?R?(u~MlNBXz(CMB!LGiA2)Ju(wA;3$!?zFJZ{g zeDMlH1W!cF5^;nQj)0HSM`SPsQ4)$RtaJhbPw4CWA~0V(Nfe|ED`N<;cnl899dW-@1%5(qdJf^%?& zc-hWOG=azEZ%QrX1=h3hQp7fd&De=@O4X< znV)>1YPwvrD!(9jhi7_HO&qU+7IUtrl~#P{Gs^?{4^E%Xx4g6M=AO6@TvnENEGpOP z*kQL;4c+ccuPiLQM0K_4|2(=`+I;wzhxOsDPM7xRs)FwAh{@iqdXm_CoLXK_g6-E!zkWb8ryvh<+4MEBbvgk2Zjaq2^R6EJf zLEfs1Dn&$EOlTUdO8cOcbv(O6`v?@()i+-5lR4hZxSSGqV}+((Wx6g0s*_ILvHn$zF~!tLNIy}lUqVw$knJ9g6u89YZL@cmZfWI!L`OE+KQEh z4dS3i?wX&6C4pTf>sGb`VdcfseNH?|WB1i#}Kh{&f4!hP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