From ef4c37799058beef880fbef2a26cea72ab529286 Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Wed, 9 Nov 2022 09:47:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BE=A7=E8=BE=B9=E6=A0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/build.gradle | 2 + .../java/com/yunbao/common/Constants.java | 1 + .../adapter/CustomDrawerPopupAdapter.java | 29 +++ .../common/bean/CustomSidebarChildModel.java | 94 ++++++++ .../common/bean/CustomSidebarInfoModel.java | 99 +++++++++ .../com/yunbao/common/http/PDLiveApi.java | 10 +- .../common/http/live/LiveNetManager.java | 22 +- .../common/views/CustomDrawerPopupView.java | 57 +++++ .../views/DrawerRecommendViewHolder.java | 15 ++ .../common/views/DrawerTaskViewHolder.java | 15 ++ .../backgroud_custom_drawer_popup.xml | 7 + .../main/res/layout/custom_drawer_popup.xml | 168 ++++++++++++++ .../live_more_icon_connect_new.png | Bin 0 -> 2987 bytes .../live_more_icon_fenestrule_new.png | Bin 0 -> 2441 bytes .../res/mipmap-xxhdpi/live_more_icon_hd.png | Bin 0 -> 2091 bytes .../res/mipmap-xxhdpi/live_more_icon_more.png | Bin 0 -> 817 bytes .../live_more_icon_sliding_new.png | Bin 0 -> 4599 bytes .../live_more_icon_special_new.png | Bin 0 -> 2970 bytes config.gradle | 4 +- .../live/activity/LiveAudienceActivity.java | 103 ++++++--- .../yunbao/live/adapter/LiveChatAdapter.java | 4 + .../com/yunbao/live/bean/LiveChatBean.java | 5 +- .../live/dialog/SidebarLiveAudience.java | 206 +----------------- .../yunbao/live/socket/SocketRyClient.java | 19 +- .../live/views/PortraitLiveManager.java | 8 +- .../main/res/layout/activity_live_detail.xml | 11 +- .../res/layout/view_sidebar_live_audience.xml | 106 +-------- 27 files changed, 633 insertions(+), 352 deletions(-) create mode 100644 common/src/main/java/com/yunbao/common/adapter/CustomDrawerPopupAdapter.java create mode 100644 common/src/main/java/com/yunbao/common/bean/CustomSidebarChildModel.java create mode 100644 common/src/main/java/com/yunbao/common/bean/CustomSidebarInfoModel.java create mode 100644 common/src/main/java/com/yunbao/common/views/CustomDrawerPopupView.java create mode 100644 common/src/main/java/com/yunbao/common/views/DrawerRecommendViewHolder.java create mode 100644 common/src/main/java/com/yunbao/common/views/DrawerTaskViewHolder.java create mode 100644 common/src/main/res/drawable/backgroud_custom_drawer_popup.xml create mode 100644 common/src/main/res/layout/custom_drawer_popup.xml create mode 100644 common/src/main/res/mipmap-xxhdpi/live_more_icon_connect_new.png create mode 100644 common/src/main/res/mipmap-xxhdpi/live_more_icon_fenestrule_new.png create mode 100644 common/src/main/res/mipmap-xxhdpi/live_more_icon_hd.png create mode 100644 common/src/main/res/mipmap-xxhdpi/live_more_icon_more.png create mode 100644 common/src/main/res/mipmap-xxhdpi/live_more_icon_sliding_new.png create mode 100644 common/src/main/res/mipmap-xxhdpi/live_more_icon_special_new.png diff --git a/common/build.gradle b/common/build.gradle index 88851178a..a0649a127 100644 --- a/common/build.gradle +++ b/common/build.gradle @@ -188,4 +188,6 @@ dependencies { api 'com.github.princekin-f:EasyFloat:2.0.4' api files('libs/Msc.jar') + api 'com.github.li-xiaojun:XPopup:2.9.1' + } diff --git a/common/src/main/java/com/yunbao/common/Constants.java b/common/src/main/java/com/yunbao/common/Constants.java index 07f931213..6625e23cc 100644 --- a/common/src/main/java/com/yunbao/common/Constants.java +++ b/common/src/main/java/com/yunbao/common/Constants.java @@ -168,6 +168,7 @@ public class Constants { public static final String STAR_CHALLENGE_UPDATE = "starChallengeUpdate";//星级助力 public static final String AI_AUTOMATIC_SPEECH = "aiAutomaticSpeech";//机器人助手 public static final String STAR_CHALLENGE_UPGRADE_NOTIFY = "starChallengeUpgradeNotify";//星级挑战成功 + public static final String SUPER_VISION = "supervision";//超级发言警告 //游戏socket public static final String SOCKET_GAME_ZJH = "startGame";//炸金花 diff --git a/common/src/main/java/com/yunbao/common/adapter/CustomDrawerPopupAdapter.java b/common/src/main/java/com/yunbao/common/adapter/CustomDrawerPopupAdapter.java new file mode 100644 index 000000000..32fe68918 --- /dev/null +++ b/common/src/main/java/com/yunbao/common/adapter/CustomDrawerPopupAdapter.java @@ -0,0 +1,29 @@ +package com.yunbao.common.adapter; + +import android.view.ViewGroup; + +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.RecyclerView; + +/** + * 新侧边栏适配器 + */ +public class CustomDrawerPopupAdapter extends RecyclerView.Adapter { + + + @NonNull + @Override + public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { + return null; + } + + @Override + public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) { + + } + + @Override + public int getItemCount() { + return 0; + } +} diff --git a/common/src/main/java/com/yunbao/common/bean/CustomSidebarChildModel.java b/common/src/main/java/com/yunbao/common/bean/CustomSidebarChildModel.java new file mode 100644 index 000000000..41156f452 --- /dev/null +++ b/common/src/main/java/com/yunbao/common/bean/CustomSidebarChildModel.java @@ -0,0 +1,94 @@ +package com.yunbao.common.bean; + +import com.google.gson.annotations.SerializedName; + +public class CustomSidebarChildModel extends BaseModel { + @SerializedName("id") + private String id; + @SerializedName("parent_id") + private String parentId; + @SerializedName("title") + private String title; + @SerializedName("subtitle") + private String subtitle; + @SerializedName("icon") + private String icon; + @SerializedName("src") + private String src; + @SerializedName("show_type") + private String showType; + @SerializedName("sort") + private String sort; + + public String getId() { + return id; + } + + public CustomSidebarChildModel setId(String id) { + this.id = id; + return this; + } + + public String getParentId() { + return parentId; + } + + public CustomSidebarChildModel setParentId(String parentId) { + this.parentId = parentId; + return this; + } + + public String getTitle() { + return title; + } + + public CustomSidebarChildModel setTitle(String title) { + this.title = title; + return this; + } + + public String getSubtitle() { + return subtitle; + } + + public CustomSidebarChildModel setSubtitle(String subtitle) { + this.subtitle = subtitle; + return this; + } + + public String getIcon() { + return icon; + } + + public CustomSidebarChildModel setIcon(String icon) { + this.icon = icon; + return this; + } + + public String getSrc() { + return src; + } + + public CustomSidebarChildModel setSrc(String src) { + this.src = src; + return this; + } + + public String getShowType() { + return showType; + } + + public CustomSidebarChildModel setShowType(String showType) { + this.showType = showType; + return this; + } + + public String getSort() { + return sort; + } + + public CustomSidebarChildModel setSort(String sort) { + this.sort = sort; + return this; + } +} diff --git a/common/src/main/java/com/yunbao/common/bean/CustomSidebarInfoModel.java b/common/src/main/java/com/yunbao/common/bean/CustomSidebarInfoModel.java new file mode 100644 index 000000000..9d3c85547 --- /dev/null +++ b/common/src/main/java/com/yunbao/common/bean/CustomSidebarInfoModel.java @@ -0,0 +1,99 @@ +package com.yunbao.common.bean; + +import com.google.gson.annotations.SerializedName; + +import java.util.List; + +/** + * 新版自定义侧边栏 + */ +public class CustomSidebarInfoModel extends BaseModel { + @SerializedName("id") + private String id; + @SerializedName("title") + private String title; + @SerializedName("subtitle") + private String subtitle; + @SerializedName("sort") + private String sort; + @SerializedName("show_type") + private String showType; + @SerializedName("src") + private String src; + @SerializedName("type") + private String type; + @SerializedName("child") + private List child; + + public String getId() { + return id; + } + + public CustomSidebarInfoModel setId(String id) { + this.id = id; + return this; + } + + public String getTitle() { + return title; + } + + public CustomSidebarInfoModel setTitle(String title) { + this.title = title; + return this; + } + + public String getSubtitle() { + return subtitle; + } + + public CustomSidebarInfoModel setSubtitle(String subtitle) { + this.subtitle = subtitle; + return this; + } + + public String getSort() { + return sort; + } + + public CustomSidebarInfoModel setSort(String sort) { + this.sort = sort; + return this; + } + + public String getShowType() { + return showType; + } + + public CustomSidebarInfoModel setShowType(String showType) { + this.showType = showType; + return this; + } + + public String getSrc() { + return src; + } + + public CustomSidebarInfoModel setSrc(String src) { + this.src = src; + return this; + } + + public String getType() { + return type; + } + + public CustomSidebarInfoModel setType(String type) { + this.type = type; + return this; + } + + public List getChild() { + return child; + } + + public CustomSidebarInfoModel setChild(List child) { + this.child = child; + return this; + } +} diff --git a/common/src/main/java/com/yunbao/common/http/PDLiveApi.java b/common/src/main/java/com/yunbao/common/http/PDLiveApi.java index c3bddf6e6..5e71880e0 100644 --- a/common/src/main/java/com/yunbao/common/http/PDLiveApi.java +++ b/common/src/main/java/com/yunbao/common/http/PDLiveApi.java @@ -4,6 +4,7 @@ import com.yunbao.common.bean.ActiveModel; import com.yunbao.common.bean.AnchorRecommendModel; import com.yunbao.common.bean.BaseModel; import com.yunbao.common.bean.ContributeModel; +import com.yunbao.common.bean.CustomSidebarInfoModel; import com.yunbao.common.bean.FaceBookUpModel; import com.yunbao.common.bean.HourRank; import com.yunbao.common.bean.IMLoginModel; @@ -236,7 +237,8 @@ public interface PDLiveApi { Observable> getNobleRankHideUserList(); /** - *获取当前星级 + * 获取当前星级 + * * @param liveUid * @return */ @@ -248,4 +250,10 @@ public interface PDLiveApi { */ @GET("/api/public/?service=Live.getLiveRoomActivtyBanner") Observable>> getLiveRoomActivityBanner(); + + /** + * 新侧边栏请求 + */ + @GET("/api/public/?service=Live.getCustomSidebarInfo") + Observable>> getCustomSidebarInfo(); } diff --git a/common/src/main/java/com/yunbao/common/http/live/LiveNetManager.java b/common/src/main/java/com/yunbao/common/http/live/LiveNetManager.java index a84922559..bc4913516 100644 --- a/common/src/main/java/com/yunbao/common/http/live/LiveNetManager.java +++ b/common/src/main/java/com/yunbao/common/http/live/LiveNetManager.java @@ -6,6 +6,7 @@ import android.text.TextUtils; import com.yunbao.common.R; import com.yunbao.common.bean.ActiveModel; import com.yunbao.common.bean.BaseModel; +import com.yunbao.common.bean.CustomSidebarInfoModel; import com.yunbao.common.bean.LiveInfoModel; import com.yunbao.common.bean.LiveRoomActivityBanner; import com.yunbao.common.bean.NobleRankHideUserListModel; @@ -14,7 +15,6 @@ import com.yunbao.common.bean.SetAttentsModel; import com.yunbao.common.bean.StarChallengeStatusModel; import com.yunbao.common.bean.VipModel; import com.yunbao.common.http.API; -import com.yunbao.common.http.ResponseModel; import com.yunbao.common.http.base.HttpCallback; import java.util.List; @@ -63,6 +63,7 @@ public class LiveNetManager { if (callback != null) callback.onError(throwable.getMessage()); }).isDisposed(); + } /** @@ -237,7 +238,6 @@ public class LiveNetManager { /** * 获取 【新人特惠】【趣味游戏】【幸运天使】 - * */ public void getLiveRoomActivityBanner(HttpCallback> callback) { API.get().pdLiveApi(mContext) @@ -253,4 +253,22 @@ public class LiveNetManager { throwable.printStackTrace(); }).isDisposed(); } + + /** + * 获取新侧边数据 + * + * @param callback + */ + public void getCustomSidebarInfo(HttpCallback> callback) { + API.get().pdLiveApi(mContext) + .getCustomSidebarInfo() + .subscribeOn(Schedulers.io()) + .observeOn(AndroidSchedulers.mainThread()) + .subscribe(listResponseModel -> callback.onSuccess(listResponseModel.getData().getInfo()), throwable -> { + if (callback != null) { + callback.onError(throwable.getMessage()); + } + throwable.printStackTrace(); + }).isDisposed(); + } } diff --git a/common/src/main/java/com/yunbao/common/views/CustomDrawerPopupView.java b/common/src/main/java/com/yunbao/common/views/CustomDrawerPopupView.java new file mode 100644 index 000000000..1ddfedce5 --- /dev/null +++ b/common/src/main/java/com/yunbao/common/views/CustomDrawerPopupView.java @@ -0,0 +1,57 @@ +package com.yunbao.common.views; + +import android.content.Context; + +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.RecyclerView; + +import com.lxj.xpopup.core.DrawerPopupView; +import com.yunbao.common.R; +import com.yunbao.common.bean.CustomSidebarInfoModel; +import com.yunbao.common.http.live.LiveNetManager; + +import java.util.List; + +public class CustomDrawerPopupView extends DrawerPopupView { + private Context mContext; + + private RecyclerView drawerList; + + public CustomDrawerPopupView(@NonNull Context context) { + super(context); + mContext = context; + } + + @Override + protected int getImplLayoutId() { + return R.layout.custom_drawer_popup; + } + + @Override + protected void onCreate() { + super.onCreate(); + + initView(); + initData(); + + } + + private void initView() { + drawerList = findViewById(R.id.drawerList); + } + + private void initData() { + LiveNetManager.get(mContext) + .getCustomSidebarInfo(new com.yunbao.common.http.base.HttpCallback>() { + @Override + public void onSuccess(List data) { + + } + + @Override + public void onError(String error) { + + } + }); + } +} \ No newline at end of file diff --git a/common/src/main/java/com/yunbao/common/views/DrawerRecommendViewHolder.java b/common/src/main/java/com/yunbao/common/views/DrawerRecommendViewHolder.java new file mode 100644 index 000000000..876bac123 --- /dev/null +++ b/common/src/main/java/com/yunbao/common/views/DrawerRecommendViewHolder.java @@ -0,0 +1,15 @@ +package com.yunbao.common.views; + +import android.view.View; + +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.RecyclerView; + +/** + * 侧边栏推荐布局 任务 + */ +public class DrawerRecommendViewHolder extends RecyclerView.ViewHolder { + public DrawerRecommendViewHolder(@NonNull View itemView) { + super(itemView); + } +} diff --git a/common/src/main/java/com/yunbao/common/views/DrawerTaskViewHolder.java b/common/src/main/java/com/yunbao/common/views/DrawerTaskViewHolder.java new file mode 100644 index 000000000..0ac077cdb --- /dev/null +++ b/common/src/main/java/com/yunbao/common/views/DrawerTaskViewHolder.java @@ -0,0 +1,15 @@ +package com.yunbao.common.views; + +import android.view.View; + +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.RecyclerView; + +/** + * 侧边栏任务布局 + */ +public class DrawerTaskViewHolder extends RecyclerView.ViewHolder { + public DrawerTaskViewHolder(@NonNull View itemView) { + super(itemView); + } +} diff --git a/common/src/main/res/drawable/backgroud_custom_drawer_popup.xml b/common/src/main/res/drawable/backgroud_custom_drawer_popup.xml new file mode 100644 index 000000000..18e7accd9 --- /dev/null +++ b/common/src/main/res/drawable/backgroud_custom_drawer_popup.xml @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file diff --git a/common/src/main/res/layout/custom_drawer_popup.xml b/common/src/main/res/layout/custom_drawer_popup.xml new file mode 100644 index 000000000..aec92c644 --- /dev/null +++ b/common/src/main/res/layout/custom_drawer_popup.xml @@ -0,0 +1,168 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/common/src/main/res/mipmap-xxhdpi/live_more_icon_connect_new.png b/common/src/main/res/mipmap-xxhdpi/live_more_icon_connect_new.png new file mode 100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literal 0 HcmV?d00001 diff --git a/common/src/main/res/mipmap-xxhdpi/live_more_icon_more.png b/common/src/main/res/mipmap-xxhdpi/live_more_icon_more.png new file mode 100644 index 0000000000000000000000000000000000000000..2b0398a85b910f91481f7b262e844688f902e9c0 GIT binary patch literal 817 zcmeAS@N?(olHy`uVBq!ia0vp^86eET1|(%=wk`xxjKx9jP7LeL$-HD>V0!K8;uum9 z_jb-kUlvCmS6fR?q1+2hOBDhc6hj4q7=)HyV9Hg9b+UV*!j$(uZDM-v>&3N8Dss

5*%dwJG*nc-QDEs57Rc|H zZBZy>dh~W zPgI|EPZu~MXg*D?@Q7@FL5$Ej)yx>7zS_dGb{iL$p8Y0!(xsX+XP-(1x6pg#1_k-` zpE6jcDt{Msnb03zY0`9R;%_dc6USHENI5<|QOhd$AMqd;3A;^#&1FP-VMomc{`L%;wt|eK0g+7CrR%@ z`GK3?Tw=tEj}x@FHO8osXS8aN%t$g zlcKs(j;;&RPb*|hi@8|Lp~Yky&E~lIN!L8*0KpeGjW}khhJTT1>T)SW2VtRX3ec>dv8~J zLj3C8U>}x-1ui=TR|<+a8XB@U2|aXM;ugSi^oR_HSBvySDMvvO;bH|1!915N7S{lu fGmX?$T*LhT8eheiIm{ivJiy@T>gTe~DWM4fu%%xV literal 0 HcmV?d00001 diff --git a/common/src/main/res/mipmap-xxhdpi/live_more_icon_sliding_new.png b/common/src/main/res/mipmap-xxhdpi/live_more_icon_sliding_new.png new file mode 100644 index 0000000000000000000000000000000000000000..f2abfe924213bdd2423ad90b6558eedc8c07a298 GIT binary patch literal 4599 zcmVPx`u}MThRCr$Pod>XdOHs!A6BPsI2nNh3U{;KXs02|K85F}^Ok}N90fT*a?fQp~>yUbp9&-TomvuFSNzkA4g%Y=O>hv{L125vfjwL9LBkFL+cOUA*>VpWb`aQ}abVAud(g0h!1jy- zd$!zzh8+a9XB^nGCO+aj}T_+KBl4h~U5fB_iG(5wDZ<&+}*5&k;_P zh800wIwGzS5ua0G=|>{sB@yuiN&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A&z$cdu$c_pb@zk7cFpmb^Bn{>lYzVL heh}EMIX-i~{{!XxV8iyAtAhXl002ovPDHLkV1mE*vgiN+ literal 0 HcmV?d00001 diff --git a/common/src/main/res/mipmap-xxhdpi/live_more_icon_special_new.png b/common/src/main/res/mipmap-xxhdpi/live_more_icon_special_new.png new file mode 100644 index 0000000000000000000000000000000000000000..57d08e40e49e1678f92850aa1f98e55fdfa2c2ef GIT binary patch literal 2970 zcmV;L3uW|)P)Px=R7pfZRCr$Pod>LKMHPns--5l18oLp@#1eaniXALbF)D(B0TBdLp3*@DL=*&( zE@CG_009BfAgCk+>?p;cqNpe;V!?`vzxjD{bieJM-OfI<=iIkfa&uqaotZPUzB9Ae ztXZ=*G09SCfJ@cesk4}XE!me~0yY6#G7T(Qce9yclGY*lk0sMz^6riXOwug?JP*Lr z0XzV}Edl%szz+d@1Hd^Xf0tY%nSbCYz$C2?;B5fbtM_XDsYfM?CIY!0cjzX8~d3RUY)wB+rOxLee9{tb0n&C36TR zf1KpWLo_sR8!3Su9+@q>ll)%OKqTD>!1Ke;U7N~x{QGqP>}83ydlkuTI<~ox;z@u> zvN3T|Wbd^ZNgE5TB((K}FzX)Os?zF0HrIa%;1}WNzyBurXBUvPLDZlUwsh|>)MkC2!KMOc>(EwWSu-7M!cL5UboySy)~(y#^!Z=n6ewL-Gv^(0}J9QvkE4!ZWNab6JR;N7|x- zq=y1HprYs%B;VSiiG>$Q0nE=XKf}s$3CUd-KEe(kAj$i?Ju9kwhvZ%znp#-V6u`XC zdUeGJe5Q5e!baAkVM)&c@Ro|IUnO~9k0uANk^E!^nsOZq? zBtM)(M;8iA(sKdq5EIXYXhXiCLlH6~b_GQUtgFh&+ut|OwfJa40IO^#gB(KbhROpN(Z<>7q zP?qgT`inNY3=PZ%h7FA>abV~^B)>WOs3RSaQ9NgvsaE`tG+WMA9sYetlv zqqo@Ca4>4eZvlHLd4;T7e4BEIE{@YYLu zu;cdttP@d)m%x2LVU~S_WYT^lFYKbEoXR%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AudienceActivity extends LiveActivity { private void initView() { // 竖直滑动 ViewPager verticalViewPager = findViewById(R.id.view_pager); + titleLine = findViewById(R.id.title_line); voicePress = findViewById(R.id.voice_press); verticalViewPager.setEnableScroll(IMLoginManager.get(mContext).isSlide()); //判断是否有直播悬浮窗,有直接关闭 @@ -688,23 +694,51 @@ public class LiveAudienceActivity extends LiveActivity { IMLoginModel userInfo = IMLoginManager.get(mContext).getUserInfo(); switch (event.getType()) { case SIDEBAR: - int userIndex = -1; - for (int i = 0; i < list.size(); i++) { - if (TextUtils.equals(list.get(i).getUid(), PortraitLiveManager.liveID)) { - userIndex = i; - } - } - if (userIndex != -1) { - list.remove(userIndex); - } - //从右边打开侧边栏 - SidebarLiveAudience sidebarLiveAudience = new SidebarLiveAudience(); - bundle.putString("Avatar", mLiveBean.getAvatar()); - bundle.putString("banner", GsonUtils.toJson(slideInfoModels)); - bundle.putString("list", GsonUtils.toJson(list)); - bundle.putInt("LiveBg", liveBg); - sidebarLiveAudience.setArguments(bundle); - sidebarLiveAudience.show(getSupportFragmentManager(), "SidebarLiveAudience"); +// int userIndex = -1; +// for (int i = 0; i < list.size(); i++) { +// if (TextUtils.equals(list.get(i).getUid(), PortraitLiveManager.liveID)) { +// userIndex = i; +// } +// } +// if (userIndex != -1) { +// list.remove(userIndex); +// } +// //从右边打开侧边栏 +// SidebarLiveAudience sidebarLiveAudience = new SidebarLiveAudience(); +// bundle.putString("Avatar", mLiveBean.getAvatar()); +// bundle.putString("banner", GsonUtils.toJson(slideInfoModels)); +// bundle.putString("list", GsonUtils.toJson(list)); +// bundle.putInt("LiveBg", liveBg); +// sidebarLiveAudience.setArguments(bundle); +// sidebarLiveAudience.show(getSupportFragmentManager(), "SidebarLiveAudience"); +// MPopupWindow.create(mContext) +// .setLayoutId(R.layout.view_sidebar_live_audience) +// .setBackgroundDrawable(new ColorDrawable(Color.GREEN)) +// .setOnDismissListener(new MPopupWindow.MPopupListener() { +// @Override +// public void invoke(View contentView) { +// +// } +// +// @Override +// public void onDismiss() { +// +// } +// }).setGravity(TypeGravity.BOTTOM_RIGHT) +// .setTarget(titleLine) +// .setHeight(DeviceUtils.getScreenHeight(mContext)*2) +// .setWidth(DeviceUtils.getScreenWidth(mContext)/6*5) +// .build() +// .show(); + CustomDrawerPopupView drawerPopupView = new CustomDrawerPopupView(mContext); + new XPopup.Builder(mContext) + .hasShadowBg(false) + .isDestroyOnDismiss(true) + .isLightStatusBar(false) + .popupPosition(PopupPosition.Right)//右边 + .hasStatusBarShadow(true) //启用状态栏阴影 + .asCustom(drawerPopupView) + .show(); break; case BOTTOM_COLLECTION: LiveTotalDialog liveTotalDialog = new LiveTotalDialog(); @@ -1030,25 +1064,36 @@ public class LiveAudienceActivity extends LiveActivity { private List list = new ArrayList<>(); private void getDrawer() { - - //推荐位 - MainNetManager.get(mContext) - .anchorRecommend("12", new com.yunbao.common.http.base.HttpCallback() { + LiveNetManager.get(mContext) + .getCustomSidebarInfo(new com.yunbao.common.http.base.HttpCallback>() { @Override - public void onSuccess(AnchorRecommendModel anchorRecommendModel) { - list.clear(); - slideInfoModels.clear(); - List models = anchorRecommendModel.getList(); + public void onSuccess(List data) { - models.add(0, new AnchorRecommendItemModel()); - list.addAll(models); - slideInfoModels = anchorRecommendModel.getSlide(); } @Override public void onError(String error) { + } }); +// //推荐位 +// MainNetManager.get(mContext) +// .anchorRecommend("12", new com.yunbao.common.http.base.HttpCallback() { +// @Override +// public void onSuccess(AnchorRecommendModel anchorRecommendModel) { +// list.clear(); +// slideInfoModels.clear(); +// List models = anchorRecommendModel.getList(); +// +// models.add(0, new AnchorRecommendItemModel()); +// list.addAll(models); +// slideInfoModels = anchorRecommendModel.getSlide(); +// } +// +// @Override +// public void onError(String error) { +// } +// }); } public void onFollowEvent(FollowEvent e) { diff --git a/live/src/main/java/com/yunbao/live/adapter/LiveChatAdapter.java b/live/src/main/java/com/yunbao/live/adapter/LiveChatAdapter.java index a2ad2f0c1..9096d03e8 100644 --- a/live/src/main/java/com/yunbao/live/adapter/LiveChatAdapter.java +++ b/live/src/main/java/com/yunbao/live/adapter/LiveChatAdapter.java @@ -299,6 +299,10 @@ public class LiveChatAdapter extends RecyclerView.Adapter { mBg.setBackground(null); mTextView.setText(bean.getContent()); } + } else if (bean.getType() == LiveChatBean.SYSTEM2) { + mTextView.setTextColor(0xffffffff); + mBg.setBackground(null); + mTextView.setText(bean.getContent()); } else if (bean.getType() == -1) {//自动消息,关注 boolean isContains = false; for (LiveChatBean model : mList) { diff --git a/live/src/main/java/com/yunbao/live/bean/LiveChatBean.java b/live/src/main/java/com/yunbao/live/bean/LiveChatBean.java index 6165349f5..5a492399f 100644 --- a/live/src/main/java/com/yunbao/live/bean/LiveChatBean.java +++ b/live/src/main/java/com/yunbao/live/bean/LiveChatBean.java @@ -11,8 +11,9 @@ import com.yunbao.common.bean.MsgModel; public class LiveChatBean { - public static final int NORMAL = 0; + public final int NORMAL = 0; public static final int SYSTEM = 1; + public static final int SYSTEM2 = 111; public static final int GIFT = 2; public static final int ENTER_ROOM = 3; public static final int LIGHT = 4; @@ -22,6 +23,8 @@ public class LiveChatBean { public static final int STAR_CHALLENGE_UPGRADE_NOTIFY = 105; public static final int LUCKY_ANGEL = 106;//幸运天使 + + private String id; private String userNiceName; private int level; diff --git a/live/src/main/java/com/yunbao/live/dialog/SidebarLiveAudience.java b/live/src/main/java/com/yunbao/live/dialog/SidebarLiveAudience.java index 03f0c2f49..89e28ad83 100644 --- a/live/src/main/java/com/yunbao/live/dialog/SidebarLiveAudience.java +++ b/live/src/main/java/com/yunbao/live/dialog/SidebarLiveAudience.java @@ -1,40 +1,19 @@ package com.yunbao.live.dialog; import android.content.DialogInterface; -import android.graphics.Color; import android.os.Bundle; -import android.text.TextUtils; -import android.view.Display; import android.view.Gravity; import android.view.View; import android.view.Window; import android.view.WindowManager; -import android.widget.ImageView; -import android.widget.LinearLayout; -import android.widget.TextView; - -import androidx.recyclerview.widget.GridLayoutManager; import com.alibaba.fastjson.JSON; -import com.blankj.utilcode.util.GsonUtils; -import com.google.gson.reflect.TypeToken; -import com.ms.banner.Banner; -import com.yunbao.common.activity.WebViewActivity; -import com.yunbao.common.bean.AnchorRecommendItemModel; -import com.yunbao.common.bean.AnchorRecommendModel; import com.yunbao.common.bean.LiveBean; -import com.yunbao.common.bean.SlideInfoModel; -import com.yunbao.common.custom.CommonRefreshView; -import com.yunbao.common.custom.ItemDecoration; import com.yunbao.common.dialog.AbsDialogFragment; -import com.yunbao.common.glide.ImgLoader; import com.yunbao.common.http.HttpCallback; -import com.yunbao.common.http.main.MainNetManager; import com.yunbao.common.utils.Bus; import com.yunbao.common.utils.DeviceUtils; import com.yunbao.common.utils.RouteUtil; -import com.yunbao.common.views.SlideInBannerViewHolder; -import com.yunbao.common.views.weight.ViewClicksAntiShake; import com.yunbao.live.R; import com.yunbao.live.adapter.SidebarAdapter; import com.yunbao.live.event.LiveAudienceEvent; @@ -42,32 +21,18 @@ import com.yunbao.live.event.LiveRoomChangeEvent; import com.yunbao.live.http.LiveHttpUtil; import com.yunbao.live.presenter.LiveRoomCheckLivePresenter; import com.yunbao.live.views.LivePlayRyViewHolder; -import com.yunbao.live.views.PortraitLiveManager; import org.greenrobot.eventbus.EventBus; -import java.util.ArrayList; -import java.util.List; - /** * 直播间侧边栏 */ public class SidebarLiveAudience extends AbsDialogFragment { - //侧边栏背景 - private ImageView sidebarBack; - private View mask; - //侧边栏刷新列表 - public CommonRefreshView sidebarList; + //侧边栏适配器 private SidebarAdapter sidebarAdapter; - private List slideInfoModels = new ArrayList<>(); - private List list = new ArrayList<>(); - private int index = 0; - private LinearLayout haveData, noDataLive; - private Banner mBanner; - private TextView inBatch; @Override protected int getLayoutId() { @@ -84,176 +49,7 @@ public class SidebarLiveAudience extends AbsDialogFragment { super.onActivityCreated(savedInstanceState); Bundle bundle = getArguments(); - sidebarBack = (ImageView) findViewById(R.id.sidebar_back); - haveData = (LinearLayout) findViewById(R.id.have_data); - noDataLive = (LinearLayout) findViewById(R.id.view_no_data_live); - //侧边栏轮播 - mBanner = (Banner) findViewById(R.id.banner); - inBatch = (TextView) findViewById(R.id.in_batch); - mask = findViewById(R.id.mask); - if (bundle != null) { - String avatar = bundle.getString("Avatar"); - int liveBg = bundle.getInt("LiveBg"); - slideInfoModels = GsonUtils.fromJson(bundle.getString("banner"), new TypeToken>() { - }.getType()); - list = GsonUtils.fromJson(bundle.getString("list"), new TypeToken>() { - }.getType()); - //侧边栏背景 - if (liveBg == 1) { - ImgLoader.displayBlurLive(mContext, avatar, sidebarBack); - mask.setVisibility(View.VISIBLE); - } else { - ImgLoader.display(mContext, R.mipmap.live_bg, sidebarBack); - mask.setVisibility(View.GONE); - } - - } - sidebarList = (CommonRefreshView) findViewById(R.id.sidebarList); - sidebarList.setHeaderTextColor(Color.parseColor("#ffffff")); - GridLayoutManager gridLayoutManager = new GridLayoutManager(mContext, 2, GridLayoutManager.VERTICAL, false); - gridLayoutManager.setSpanSizeLookup(new GridLayoutManager.SpanSizeLookup() { - @Override - public int getSpanSize(int position) { - if (position == 0) { - return 2; - } - return 1; - } - }); - sidebarList.setLayoutManager(gridLayoutManager); - sidebarList.setEmptyLayoutId(R.layout.view_no_data_live); - sidebarList.setLoadMoreEnable(false); - ItemDecoration decoration = new ItemDecoration(mContext, 0x00000000, 6, 0); - decoration.setOnlySetItemOffsetsButNoDraw(true); - sidebarList.setItemDecoration(decoration); - Display mDisplay = getActivity().getWindowManager().getDefaultDisplay(); - sidebarAdapter = new SidebarAdapter(mContext, mDisplay.getHeight()); - sidebarAdapter.setHasStableIds(true); - sidebarList.setRecyclerViewAdapter(sidebarAdapter); - ViewClicksAntiShake.clicksAntiShake(inBatch, new ViewClicksAntiShake.ViewClicksCallBack() { - @Override - public void onViewClicks() { - sidebarList.initData(); - } - }); - if (sidebarAdapter != null) { - if (list.size() == 1) { - haveData.setVisibility(View.GONE); - noDataLive.setVisibility(View.VISIBLE); - - if (mBanner.isStart()) { - mBanner.update(slideInfoModels); - } else { - mBanner.setAutoPlay(true) - .setPages(slideInfoModels, new SlideInBannerViewHolder()) - .setDelayTime(3000) - .setOnBannerClickListener((datas, p) -> { - if (p >= 0 && p < slideInfoModels.size()) { - SlideInfoModel bean = slideInfoModels.get(p); - if (bean != null) { - - String link = bean.getSlideUrl(); - if (link.contains("http")) { - WebViewActivity.forward(getContext(), link, true); - } else { - gotoLive(link); - } - } - } - }).start(); - } - } else { - haveData.setVisibility(View.VISIBLE); - noDataLive.setVisibility(View.GONE); - sidebarAdapter.addData(list); - sidebarAdapter.setData(slideInfoModels); - } - - } - sidebarList.setDataHelperNew(new CommonRefreshView.DataHelperNew() { - @Override - public void loadData(int p) { - - } - - @Override - public void refresh() { - if (index > 0) { - //推荐位 - MainNetManager.get(getActivity()) - .anchorRecommend("12", new com.yunbao.common.http.base.HttpCallback() { - @Override - public void onSuccess(AnchorRecommendModel anchorRecommendModel) { - List list = anchorRecommendModel.getList(); - int userIndex = -1; - for (int i = 0; i < list.size(); i++) { - if (TextUtils.equals(list.get(i).getUid(), PortraitLiveManager.liveID)) { - userIndex = i; - } - } - if (userIndex != -1) { - list.remove(userIndex); - } - - list.add(0, new AnchorRecommendItemModel()); - if (list.size() == 1) { - haveData.setVisibility(View.GONE); - noDataLive.setVisibility(View.VISIBLE); - - if (mBanner.isStart()) { - mBanner.update(slideInfoModels); - } else { - mBanner.setAutoPlay(true) - .setPages(slideInfoModels, new SlideInBannerViewHolder()) - .setDelayTime(3000) - .setOnBannerClickListener((datas, p) -> { - if (p >= 0 && p < slideInfoModels.size()) { - SlideInfoModel bean = slideInfoModels.get(p); - if (bean != null) { - - String link = bean.getSlideUrl(); - if (link.contains("http")) { - WebViewActivity.forward(getContext(), link, true); - } else { - gotoLive(link); - } - } - } - }).start(); - } - } else { - haveData.setVisibility(View.VISIBLE); - noDataLive.setVisibility(View.GONE); - sidebarAdapter.addData(list); - sidebarAdapter.setData(anchorRecommendModel.getSlide()); - } - - sidebarList.onFinish(); - } - - @Override - public void onError(String error) { - } - }); - } else { - index = index + 1; - } - - } - }); - sidebarList.initData(); - sidebarAdapter.setOnItemClickListener((bean, position) -> { - - gotoLive(bean.getUid()); - dismiss(); - }); - sidebarAdapter.setListener(new SidebarAdapter.SidebarListener() { - @Override - public void refresh() { - sidebarList.initData(); - } - }); } @Override diff --git a/live/src/main/java/com/yunbao/live/socket/SocketRyClient.java b/live/src/main/java/com/yunbao/live/socket/SocketRyClient.java index 0818c9784..a058d2023 100644 --- a/live/src/main/java/com/yunbao/live/socket/SocketRyClient.java +++ b/live/src/main/java/com/yunbao/live/socket/SocketRyClient.java @@ -204,12 +204,12 @@ public class SocketRyClient { } break; case Constants.SOCKET_KICK://踢人 - systemChatMessage(map.getString("ct")); + systemChatMessage2(map.getString("ct")); mListener.onKick(map.getString("touid")); break; case Constants.SOCKET_SHUT_UP://禁言 String ct = map.getString("ct"); - systemChatMessage(ct); + systemChatMessage2(ct); mListener.onShutUp(map.getString("touid"), ct); break; case Constants.SOCKET_SEND_MSG://文字消息,点亮,用户进房间,这种混乱的设计是因为服务器端逻辑就是这样设计的,客户端无法自行修改 @@ -333,9 +333,12 @@ public class SocketRyClient { mListener.addFakeFans(list); break; case Constants.SOCKET_SET_ADMIN://设置或取消管理员 - systemChatMessage(map.getString("ct")); + systemChatMessage2(map.getString("ct")); mListener.onSetAdmin(map.getString("touid"), map.getIntValue("action")); break; + case Constants.SUPER_VISION://设置或取消管理员 + systemChatMessage2(map.getString("ct")); + break; case Constants.SOCKET_BUY_GUARD://购买守护 buyGuardInSameRoom(map); break; @@ -858,6 +861,16 @@ public class SocketRyClient { mListener.onChat(bean, 1); } + /** + * 接收到系统消息,显示在聊天栏中 + */ + private static void systemChatMessage2(String content) { + LiveChatBean bean = new LiveChatBean(); + bean.setContent(content); + bean.setType(LiveChatBean.SYSTEM2); + mListener.onChat(bean, 1); + } + /** * 处理观众与主播连麦逻辑 */ 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 0a055d8ff..17535b20e 100644 --- a/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java +++ b/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java @@ -183,6 +183,9 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe //标记是调用正常退出还是手动切后台 private boolean isQuitF = false; + //是否成功调用进入房间接口 + private boolean isEnterRoom = false; + public PortraitLiveManager setQuitF(boolean quitF) { isQuitF = quitF; return this; @@ -224,6 +227,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe @Override public synchronized void onAdd(LiveBean data, int liveType, int liveTypeVal, int liveSdk) { + isEnterRoom = false; openParametersModel = new OpenParametersModel(); mContext.runOnUiThread(new Runnable() { @Override @@ -1062,7 +1066,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe LiveHttpUtil.enterRoom(mLiveBean.getUid(), mLiveBean.getStream(), new HttpCallback() { @Override public void onSuccess(int code, String msg, String[] info) { - + isEnterRoom = true; if (code == 0 && info.length > 0) { JSONObject obj = JSON.parseObject(info[0]); mDanmuPrice = obj.getString("barrage_fee"); @@ -1418,7 +1422,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe * 退出直播间 */ public void exitLiveRoom() { - if (mLiveBean == null) { + if (mLiveBean == null && !isEnterRoom) { return; } RongChatRoomClient.getInstance().quitChatRoom("g" + mLiveBean.getUid(), new IRongCoreCallback.OperationCallback() { diff --git a/live/src/main/res/layout/activity_live_detail.xml b/live/src/main/res/layout/activity_live_detail.xml index 997e1794d..e69a2c00a 100644 --- a/live/src/main/res/layout/activity_live_detail.xml +++ b/live/src/main/res/layout/activity_live_detail.xml @@ -3,6 +3,11 @@ android:layout_width="match_parent" android:layout_height="match_parent"> + + + android:layout_marginStart="54dp" + android:src="@mipmap/icon_voice_press" + android:visibility="gone" /> \ No newline at end of file diff --git a/live/src/main/res/layout/view_sidebar_live_audience.xml b/live/src/main/res/layout/view_sidebar_live_audience.xml index a5638be36..3dfd27392 100644 --- a/live/src/main/res/layout/view_sidebar_live_audience.xml +++ b/live/src/main/res/layout/view_sidebar_live_audience.xml @@ -1,110 +1,8 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file