From 38a63230ebd96d8e6b89d1d71b0bd4ef74ec43c4 Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Tue, 18 Jun 2024 14:46:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8C=E6=AD=A5PD=E6=95=B4=E8=9B=8A=E5=86=85?= =?UTF-8?q?=E5=AE=B9=20=E5=90=8C=E6=AD=A5PD=E4=BF=AE=E5=A4=8D=E5=86=85?= =?UTF-8?q?=E5=AE=B9=20=E8=B0=83=E6=95=B4=E8=BF=9B=E6=B8=B8=E6=88=8F?= =?UTF-8?q?=E6=88=BF=E5=B0=B1=E5=85=B3=E6=8E=89=E5=B0=8F=E7=AA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/yunbao/common/Constants.java | 2 + .../yunbao/common/adapter/BaseAdapter.java | 79 ++++ .../com/yunbao/common/bean/PrankGiftBean.java | 11 + .../common/bean/PrankGiftResultBean.java | 33 ++ .../yunbao/common/bean/PrankProgressBean.java | 176 +++++++ .../com/yunbao/common/glide/ImgLoader.java | 12 +- .../com/yunbao/common/http/PDLiveApi.java | 34 +- .../common/http/live/LiveNetManager.java | 54 ++- .../yunbao/common/manager/OpenAdManager.java | 1 + .../main/res/drawable/live_room_menu_red.xml | 5 + .../res/layout/dialog_live_new_function.xml | 30 +- .../ic_prank_gift_add_gift_to.png | Bin 0 -> 933 bytes .../res/mipmap-xxhdpi/ic_prank_gift_del.png | Bin 0 -> 1721 bytes .../mipmap-xxhdpi/ic_prank_gift_switch.png | Bin 0 -> 725 bytes .../src/main/res/mipmap-xxhdpi/ic_zl_rule.png | Bin common/src/main/res/values-en-rUS/string.xml | 10 +- common/src/main/res/values-zh-rHK/strings.xml | 1 + common/src/main/res/values-zh-rTW/strings.xml | 1 + common/src/main/res/values-zh/strings.xml | 1 + common/src/main/res/values/strings.xml | 11 +- common/src/main/res/values/style.xml | 6 + .../yunbao/live/activity/LiveActivity.java | 4 +- .../live/activity/LiveAnchorActivity.java | 5 + .../live/activity/LiveAudienceActivity.java | 5 + .../live/activity/LiveRyAnchorActivity.java | 26 +- .../live/activity/LiveSwAnchorActivity.java | 24 +- .../live/activity/SudSwGameActivity.java | 5 + .../com/yunbao/live/adapter/ComboAdapter.java | 76 +++ .../yunbao/live/adapter/FrameGiftAdapter.java | 1 + .../live/adapter/FreePkRecyclerAdapter.java | 62 ++- .../ItemLivePrankGiftNumberAdapter.java | 79 ++++ .../yunbao/live/adapter/LiveChatAdapter.java | 36 +- .../live/adapter/LiveParcelItemAdapter.java | 12 +- .../adapter/LivePrankRecyclerAdapter.java | 95 ++-- .../com/yunbao/live/adapter/PrankAdapter.java | 170 +++++++ .../com/yunbao/live/bean/LiveChatBean.java | 11 +- .../com/yunbao/live/dialog/GiftPopDialog.java | 22 +- .../com/yunbao/live/dialog/LiveGiftPopup.java | 8 +- .../dialog/LiveNewFunctionDialogFragment.java | 7 + .../live/dialog/LivePrankAddGiftDialog.java | 161 +++++++ .../dialog/LivePrankAddGiftNumberDialog.java | 137 ++++++ .../live/dialog/LivePrankDialogFragment.java | 364 +++++++++++---- .../live/dialog/LivePrankExplainDialog.java | 110 +++++ .../event/LiveParcelItemRefreshEvent.java | 11 + .../live/presenter/AbsLinkMicPkPresenter.java | 6 + .../presenter/LiveRyLinkMicPkPresenter.java | 13 + .../presenter/LiveSwLinkMicPkPresenter.java | 10 + .../live/socket/SocketMessageListener.java | 5 + .../yunbao/live/socket/SocketRyChatUtil.java | 60 +++ .../yunbao/live/socket/SocketRyClient.java | 49 +- .../yunbao/live/socket/SocketSwClient.java | 43 ++ .../main/java/com/yunbao/live/utils/Zeus.kt | 90 ++++ .../live/views/LiveGiftItemFragment.java | 10 + .../live/views/LiveParcelItemFragment.java | 2 +- .../yunbao/live/views/LiveRoomViewHolder.java | 432 ++++++++++++++++-- .../live/views/LiveRyAnchorViewHolder.java | 11 + .../live/views/PortraitLiveManager.java | 17 + .../res/drawable/bg_live_prank_btn_cancel.xml | 9 + .../res/drawable/bg_live_prank_btn_save.xml | 9 + .../drawable/bg_live_prank_turntable_save.xml | 2 +- .../main/res/drawable/bg_prank_an_once.xml | 5 + .../res/drawable/bg_prank_bottom_detail.xml | 5 + .../drawable/bg_prank_btn_gift_add_number.xml | 9 + .../res/drawable/bg_prank_gift_add_item.xml | 9 + live/src/main/res/drawable/bg_prank_group.xml | 5 + live/src/main/res/drawable/bg_prank_item.xml | 5 + .../res/drawable/bg_prank_item_subscript.xml | 5 + live/src/main/res/drawable/pran_en.gif | Bin 0 -> 21245 bytes live/src/main/res/drawable/pran_zh.gif | Bin 0 -> 27179 bytes live/src/main/res/drawable/prank_msg_goto.xml | 5 + .../main/res/drawable/progress_prank_bg.xml | 17 + .../src/main/res/layout/dialog_live_prank.xml | 57 ++- .../res/layout/dialog_live_prank_add_gift.xml | 176 +++++++ .../dialog_live_prank_add_gift_number.xml | 88 ++++ .../res/layout/dialog_live_prank_explain.xml | 53 +++ .../layout/dialog_live_select_gift_wrap.xml | 2 +- live/src/main/res/layout/item_combo_vote.xml | 41 ++ live/src/main/res/layout/item_live_chat.xml | 43 ++ .../main/res/layout/item_live_prank_gift.xml | 80 +--- .../main/res/layout/item_live_report_foot.xml | 1 + .../item_prank_dialog_add_gift_number.xml | 17 + .../main/res/layout/item_prank_progress.xml | 150 ++++++ .../res/layout/view_live_prank_turntable.xml | 317 +++++++++---- live/src/main/res/layout/view_live_room.xml | 45 +- live/src/main/res/layout/view_prank_group.xml | 91 ++++ .../main/res/layout/view_ry_live_anchor.xml | 19 + .../src/main/res/mipmap-xhdpi/bottom_icon.png | Bin 0 -> 420 bytes live/src/main/res/mipmap-xhdpi/prank_icon.png | Bin 0 -> 1796 bytes .../main/res/mipmap-xhdpi/turntable_icon.png | Bin 0 -> 13875 bytes .../main/res/mipmap-xxxhdpi/bottom_icon.png | Bin 0 -> 770 bytes .../main/res/mipmap-xxxhdpi/prank_icon.png | Bin 0 -> 3605 bytes .../res/mipmap-xxxhdpi/turntable_icon.png | Bin 0 -> 27948 bytes live/src/main/res/values-en/strings.xml | 30 ++ live/src/main/res/values/strings.xml | 28 ++ 94 files changed, 3589 insertions(+), 380 deletions(-) create mode 100644 common/src/main/java/com/yunbao/common/adapter/BaseAdapter.java create mode 100644 common/src/main/java/com/yunbao/common/bean/PrankGiftResultBean.java create mode 100644 common/src/main/java/com/yunbao/common/bean/PrankProgressBean.java create mode 100644 common/src/main/res/drawable/live_room_menu_red.xml create mode 100644 common/src/main/res/mipmap-xxhdpi/ic_prank_gift_add_gift_to.png create mode 100644 common/src/main/res/mipmap-xxhdpi/ic_prank_gift_del.png create mode 100644 common/src/main/res/mipmap-xxhdpi/ic_prank_gift_switch.png rename {main => common}/src/main/res/mipmap-xxhdpi/ic_zl_rule.png (100%) create mode 100644 live/src/main/java/com/yunbao/live/adapter/ComboAdapter.java create mode 100644 live/src/main/java/com/yunbao/live/adapter/ItemLivePrankGiftNumberAdapter.java create mode 100644 live/src/main/java/com/yunbao/live/adapter/PrankAdapter.java create mode 100644 live/src/main/java/com/yunbao/live/dialog/LivePrankAddGiftDialog.java create mode 100644 live/src/main/java/com/yunbao/live/dialog/LivePrankAddGiftNumberDialog.java create mode 100644 live/src/main/java/com/yunbao/live/dialog/LivePrankExplainDialog.java create mode 100644 live/src/main/java/com/yunbao/live/utils/Zeus.kt create mode 100644 live/src/main/res/drawable/bg_live_prank_btn_cancel.xml create mode 100644 live/src/main/res/drawable/bg_live_prank_btn_save.xml create mode 100644 live/src/main/res/drawable/bg_prank_an_once.xml create mode 100644 live/src/main/res/drawable/bg_prank_bottom_detail.xml create mode 100644 live/src/main/res/drawable/bg_prank_btn_gift_add_number.xml create mode 100644 live/src/main/res/drawable/bg_prank_gift_add_item.xml create mode 100644 live/src/main/res/drawable/bg_prank_group.xml create mode 100644 live/src/main/res/drawable/bg_prank_item.xml create mode 100644 live/src/main/res/drawable/bg_prank_item_subscript.xml create mode 100644 live/src/main/res/drawable/pran_en.gif create mode 100644 live/src/main/res/drawable/pran_zh.gif create mode 100644 live/src/main/res/drawable/prank_msg_goto.xml create mode 100644 live/src/main/res/drawable/progress_prank_bg.xml create mode 100644 live/src/main/res/layout/dialog_live_prank_add_gift.xml create mode 100644 live/src/main/res/layout/dialog_live_prank_add_gift_number.xml create mode 100644 live/src/main/res/layout/dialog_live_prank_explain.xml create mode 100644 live/src/main/res/layout/item_combo_vote.xml create mode 100644 live/src/main/res/layout/item_prank_dialog_add_gift_number.xml create mode 100644 live/src/main/res/layout/item_prank_progress.xml create mode 100644 live/src/main/res/layout/view_prank_group.xml create mode 100644 live/src/main/res/mipmap-xhdpi/bottom_icon.png create mode 100644 live/src/main/res/mipmap-xhdpi/prank_icon.png create mode 100644 live/src/main/res/mipmap-xhdpi/turntable_icon.png create mode 100644 live/src/main/res/mipmap-xxxhdpi/bottom_icon.png create mode 100644 live/src/main/res/mipmap-xxxhdpi/prank_icon.png create mode 100644 live/src/main/res/mipmap-xxxhdpi/turntable_icon.png diff --git a/common/src/main/java/com/yunbao/common/Constants.java b/common/src/main/java/com/yunbao/common/Constants.java index af7850d0c..8fe6ee4db 100644 --- a/common/src/main/java/com/yunbao/common/Constants.java +++ b/common/src/main/java/com/yunbao/common/Constants.java @@ -202,6 +202,8 @@ public class Constants { public static final String LuckyAngel = "LuckyCheck";//幸运天使 public static final String Lucky100Check = "Lucky100Check";//幸运天使 + public static final String PrankSendData = "PrankSendData";//整蛊进度 + public static final int SOCKET_WHAT_CONN = 0; public static final int SOCKET_WHAT_DISCONN = 2; public static final int SOCKET_WHAT_BROADCAST = 1; diff --git a/common/src/main/java/com/yunbao/common/adapter/BaseAdapter.java b/common/src/main/java/com/yunbao/common/adapter/BaseAdapter.java new file mode 100644 index 000000000..e53971c5b --- /dev/null +++ b/common/src/main/java/com/yunbao/common/adapter/BaseAdapter.java @@ -0,0 +1,79 @@ +package com.yunbao.common.adapter; + +import android.content.Context; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import androidx.recyclerview.widget.RecyclerView; +import java.util.HashMap; +import java.util.List; + +public abstract class BaseAdapter extends RecyclerView.Adapter { + private Context context; + public List data; + + public BaseAdapter(Context context, List data) { + this.context = context; + this.data = data; + } + + @Override + public BaseViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { + View view = LayoutInflater.from(context).inflate(getItemLayoutId(), parent, false); + return new BaseViewHolder(view); + } + + @Override + public void onBindViewHolder(BaseAdapter.BaseViewHolder holder, int position) { + T t = data.get(position); + convert(holder, t); + } + + @Override + public int getItemCount() { + return data == null ? 0 : data.size(); + } + + public abstract void convert(BaseViewHolder holder, T t); + + public abstract int getItemLayoutId(); + + class BaseViewHolder extends RecyclerView.ViewHolder { + + private HashMap views; + + public BaseViewHolder(View itemView) { + super(itemView); + views = new HashMap<>(); + if (onItemClickListener != null){ + itemView.setOnClickListener(v ->onItemClickListener.onItemClick(getAdapterPosition()) ); + } + } + + public View getView(int id) { + View view = views.get(id); + if (view == null) { + view = itemView.findViewById(id); + views.put(id, view); + if (onItemClickListener != null){ + view.setOnClickListener(v -> { + onItemClickListener.onItemChildClick(v, getAdapterPosition()); + }); + } + } + return view; + } + } + + private OnItemClickListener onItemClickListener; + + private void setOnItemClickListener(OnItemClickListener onItemClickListener){ + this.onItemClickListener = onItemClickListener; + } + + public interface OnItemClickListener{ + default void onItemClick(int position){} + + default void onItemChildClick(View view,int position){} + } +} \ No newline at end of file diff --git a/common/src/main/java/com/yunbao/common/bean/PrankGiftBean.java b/common/src/main/java/com/yunbao/common/bean/PrankGiftBean.java index a7e6c95a7..ff79d641e 100644 --- a/common/src/main/java/com/yunbao/common/bean/PrankGiftBean.java +++ b/common/src/main/java/com/yunbao/common/bean/PrankGiftBean.java @@ -56,4 +56,15 @@ public class PrankGiftBean extends BaseModel{ public void setGiftId(String giftId) { this.giftId = giftId; } + + @Override + public String toString() { + return "PrankGiftBean{" + + "title='" + title + '\'' + + ", name='" + name + '\'' + + ", icon='" + icon + '\'' + + ", num=" + num + + ", giftId='" + giftId + '\'' + + '}'; + } } diff --git a/common/src/main/java/com/yunbao/common/bean/PrankGiftResultBean.java b/common/src/main/java/com/yunbao/common/bean/PrankGiftResultBean.java new file mode 100644 index 000000000..3835f31d3 --- /dev/null +++ b/common/src/main/java/com/yunbao/common/bean/PrankGiftResultBean.java @@ -0,0 +1,33 @@ +package com.yunbao.common.bean; + +import java.util.List; + +public class PrankGiftResultBean extends BaseModel{ + private List prank_list; + private String status; + private String prank_type; + + public List getPrank_list() { + return prank_list; + } + + public void setPrank_list(List prank_list) { + this.prank_list = prank_list; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public String getPrank_type() { + return prank_type; + } + + public void setPrank_type(String prank_type) { + this.prank_type = prank_type; + } +} diff --git a/common/src/main/java/com/yunbao/common/bean/PrankProgressBean.java b/common/src/main/java/com/yunbao/common/bean/PrankProgressBean.java new file mode 100644 index 000000000..77790c5bc --- /dev/null +++ b/common/src/main/java/com/yunbao/common/bean/PrankProgressBean.java @@ -0,0 +1,176 @@ +package com.yunbao.common.bean; + +import com.google.gson.JsonElement; + +import java.util.List; + +public class PrankProgressBean extends BaseModel { + private int status;//整蛊状态 0.关闭 1.开启 + private int prank_turntable_status;// 转盘整蛊状态 0=关闭 1=开启 + private int prank_type;// 整蛊类型 1.礼物整蛊 2.连击整蛊 + private List prank_list;// 整蛊进度 + private List completed_list;// 待完成的整蛊 + + public PrankProgressBean(){ + } + + + + public static class PrankList{ + private int gift_id;// 礼物ID + private int gift_num;// 整蛊需要的礼物数量 + private String prank_content; // 整蛊内容 + private int send_num; // 用户已赠送的礼物数量 + private int completed_num;// 待完成的整蛊次数 + private String gift_name;// 礼物名称 + private String gift_icon; // 礼物图片链接 + + private String gift_name_en; + + private int continuous_click_num; + + public int getContinuous_click_num() { + return continuous_click_num; + } + + public void setContinuous_click_num(int continuous_click_num) { + this.continuous_click_num = continuous_click_num; + } + + public String getGift_name_en() { + return gift_name_en; + } + + public void setGift_name_en(String gift_name_en) { + this.gift_name_en = gift_name_en; + } + + public int getGift_id() { + return gift_id; + } + + public void setGift_id(int gift_id) { + this.gift_id = gift_id; + } + + public int getGift_num() { + return gift_num; + } + + public void setGift_num(int gift_num) { + this.gift_num = gift_num; + } + + public String getPrank_content() { + return prank_content; + } + + public void setPrank_content(String prank_content) { + this.prank_content = prank_content; + } + + public int getSend_num() { + return send_num; + } + + public void setSend_num(int send_num) { + this.send_num = send_num; + } + + public int getCompleted_num() { + return completed_num; + } + + public void setCompleted_num(int completed_num) { + this.completed_num = completed_num; + } + + public String getGift_name() { + return gift_name; + } + + public void setGift_name(String gift_name) { + this.gift_name = gift_name; + } + + public String getGift_icon() { + return gift_icon; + } + + public void setGift_icon(String gift_icon) { + this.gift_icon = gift_icon; + } + + //计算完成度 + public double getCompletionRate() { + if (gift_num == 0) return 0; // Avoid division by zero + return (double) send_num / gift_num; + } + + @Override + public String toString() { + return "PrankList{" + + "gift_id=" + gift_id + + ", gift_num=" + gift_num + + ", prank_content='" + prank_content + '\'' + + ", send_num=" + send_num + + ", completed_num=" + completed_num + + ", gift_name='" + gift_name + '\'' + + ", gift_icon='" + gift_icon + '\'' + + ", gift_name_en='" + gift_name_en + '\'' + + ", continuous_click_num=" + continuous_click_num + + '}'; + } + } + + public int getStatus() { + return status; + } + + public void setStatus(int status) { + this.status = status; + } + + public int getPrank_type() { + return prank_type; + } + + public void setPrank_type(int prank_type) { + this.prank_type = prank_type; + } + + public List getPrank_list() { + return prank_list; + } + + public void setPrank_list(List prank_list) { + this.prank_list = prank_list; + } + + public List getCompleted_list() { + return completed_list; + } + + public void setCompleted_list(List completed_list) { + this.completed_list = completed_list; + } + + public int getPrank_turntable_status() { + return prank_turntable_status; + } + + public void setPrank_turntable_status(int prank_turntable_status) { + this.prank_turntable_status = prank_turntable_status; + } + + @Override + public String toString() { + return "PrankProgressBean{" + + "status=" + status + + ", prank_turntable_status=" + prank_turntable_status + + ", prank_type=" + prank_type + + ", prank_list=" + prank_list + + ", completed_list=" + completed_list + + '}'; + } +} diff --git a/common/src/main/java/com/yunbao/common/glide/ImgLoader.java b/common/src/main/java/com/yunbao/common/glide/ImgLoader.java index 43881950d..6fe9714dd 100644 --- a/common/src/main/java/com/yunbao/common/glide/ImgLoader.java +++ b/common/src/main/java/com/yunbao/common/glide/ImgLoader.java @@ -22,7 +22,7 @@ import com.bumptech.glide.request.target.Target; import com.bumptech.glide.request.transition.Transition; import com.yunbao.common.R; import com.yunbao.common.utils.StringUtil; - +import com.yunbao.common.interfaces.OnItemClickListener; import java.io.File; import jp.wasabeef.glide.transformations.BlurTransformation; @@ -267,14 +267,20 @@ public class ImgLoader { .skipMemoryCache(SKIP_MEMORY_CACHE) .into(imageView); } - public static void displayDrawable(Context context, String url, final DrawableCallback callback) { + displayDrawable(context, url, -1, -1, callback); + } + public static void displayDrawable(Context context, String url, int width, int height, final DrawableCallback callback) { if (TextUtils.isEmpty(url) || !contextIsExist(context)) { if (callback != null) callback.onLoadFailed(); } else { - Glide.with(context).asDrawable().load(url).thumbnail(thumbnail).skipMemoryCache(SKIP_MEMORY_CACHE).into(new CustomTarget() { + RequestBuilder builder = Glide.with(context).asDrawable().load(url); + if (width != -1 && height != -1) { + builder = builder.override(width, height); + } + builder.thumbnail(thumbnail).skipMemoryCache(SKIP_MEMORY_CACHE).into(new CustomTarget() { @Override public void onResourceReady(@NonNull Drawable resource, @Nullable Transition transition) { 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 b4f549816..17ec489e4 100644 --- a/common/src/main/java/com/yunbao/common/http/PDLiveApi.java +++ b/common/src/main/java/com/yunbao/common/http/PDLiveApi.java @@ -66,7 +66,9 @@ import com.yunbao.common.bean.NobleTrumpetModel; import com.yunbao.common.bean.OpenAdModel; import com.yunbao.common.bean.PkRankBean; import com.yunbao.common.bean.PrankGiftBean; +import com.yunbao.common.bean.PrankGiftResultBean; import com.yunbao.common.bean.PrankHttpTurntableBean; +import com.yunbao.common.bean.PrankProgressBean; import com.yunbao.common.bean.QuickGiftSendGiftModel; import com.yunbao.common.bean.RandomPkUserBean; import com.yunbao.common.bean.RankPkInfoBean; @@ -520,7 +522,16 @@ public interface PDLiveApi { * 获取整蛊列表 */ @GET("/api/public/?service=Prank.prankList") - Observable>> prankList(@Query("anchor_id") String anchor_id); + Observable>prankList( + @Query("anchor_id") String anchor_id, + @Query("prank_type") String prank_type + ); + + /** + * 获取整蛊进度列表 + */ + @GET("/api/public/?service=Prank.prankCompletedList") + Observable> getPrankProgressList(@Query("anchor_id") String anchor_id); /** * 设置礼物整蛊 @@ -528,9 +539,11 @@ public interface PDLiveApi { @GET("/api/public/?service=Prank.setPrank") Observable>> setPrank( @Query("anchor_id") String anchor_id, - @Query("gift_id") String gift_id, - @Query("gift_num") String gift_num, - @Query("prank_content") String prank_content + @Query("status") String status, + @Query("prank_json") String prank_json, + @Query("prank_type") String prank_type, + @Query("is_cleared") String is_cleared + ); /** @@ -1379,4 +1392,17 @@ public interface PDLiveApi { ); @GET("/api/public/?service=Tx.getShengwangToken") Observable> getSwToken(); + + + /** + * + * @param anchor_id + * @param gift_id + * @return + */ + @GET("/api/public/?service=Prank.anchorClickFinish") + Observable>> anchorClickFinish( + @Query("anchor_id")String anchor_id, + @Query("gift_id")String gift_id + ); } 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 babc2e545..85e59ccb9 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 @@ -68,7 +68,9 @@ import com.yunbao.common.bean.NobleTrumpetModel; import com.yunbao.common.bean.OpenAdModel; import com.yunbao.common.bean.PkRankBean; import com.yunbao.common.bean.PrankGiftBean; +import com.yunbao.common.bean.PrankGiftResultBean; import com.yunbao.common.bean.PrankHttpTurntableBean; +import com.yunbao.common.bean.PrankProgressBean; import com.yunbao.common.bean.QuickGiftSendGiftModel; import com.yunbao.common.bean.RandomPkUserBean; import com.yunbao.common.bean.RankPkInfoBean; @@ -897,9 +899,9 @@ public class LiveNetManager { /** * 获取转盘整蛊列表 */ - public void getPrankGiftList(String mLiveUid, HttpCallback> callback) { + public void getPrankGiftList(String mLiveUid, String prank_type,HttpCallback callback) { API.get().pdLiveApi(mContext) - .prankList(mLiveUid) + .prankList(mLiveUid,prank_type) .observeOn(AndroidSchedulers.mainThread()) .subscribeOn(Schedulers.io()) .subscribe(responseModel -> { @@ -916,12 +918,31 @@ public class LiveNetManager { }).isDisposed(); } + /** + * 获取整蛊进度列表 + */ + public void getPrankProgressList(String mLiveUid, HttpCallback callback){ + API.get().pdLiveApi(mContext) + .getPrankProgressList(mLiveUid) + .observeOn(AndroidSchedulers.mainThread()) + .subscribeOn(Schedulers.io()) + .subscribe(responseModel->{ + if (callback != null){ + callback.onSuccess(responseModel.getData().getInfo()); + } + },throwable->{ + if (callback != null){ + callback.onError(throwable.getMessage()); + } + } ).isDisposed(); + } + /** * 设置礼物整蛊 */ - public void setPrankGift(String mLiveUid, String gift_id, String gift_num, String prank_content, HttpCallback callback) { + public void setPrankGift(String mLiveUid, String status, String prank_json,String prank_type,String is_cleared, HttpCallback callback) { API.get().pdLiveApi(mContext) - .setPrank(mLiveUid, gift_id, gift_num, prank_content) + .setPrank(mLiveUid, status, prank_json, prank_type,is_cleared) .observeOn(AndroidSchedulers.mainThread()) .subscribeOn(Schedulers.io()) .subscribe(responseModel -> { @@ -3506,6 +3527,31 @@ public class LiveNetManager { }).isDisposed(); } + public void anchorClickFinish(String mLiveId, String giftId, HttpCallback>callback) { + API.get().pdLiveApi(mContext) + .anchorClickFinish(mLiveId, giftId) + .subscribeOn(Schedulers.io()) + .observeOn(AndroidSchedulers.mainThread()) + .subscribe(new Consumer>>() { + @Override + public void accept(ResponseModel> listResponseModel) throws Exception { + if (callback != null) { + callback.onSuccess(listResponseModel.getData().getInfo()); + } + } + }, new Consumer() { + @Override + public void accept(Throwable throwable) throws Exception { + throwable.printStackTrace(); + if (callback != null) { + callback.onError(mContext.getString(R.string.net_error)); + } + } + }).isDisposed(); + + } + + public void updateFile(File file, HttpCallback callback) { MultipartBody.Part uploadFile = createUploadFile(file); API.get().pdLiveApi(mContext) diff --git a/common/src/main/java/com/yunbao/common/manager/OpenAdManager.java b/common/src/main/java/com/yunbao/common/manager/OpenAdManager.java index fb98cffae..47681af39 100644 --- a/common/src/main/java/com/yunbao/common/manager/OpenAdManager.java +++ b/common/src/main/java/com/yunbao/common/manager/OpenAdManager.java @@ -104,6 +104,7 @@ public class OpenAdManager { return; } Collections.sort(data, new AdListComparator()); + data.clear(); list = data; if (isShow) { if (showType == 0) { diff --git a/common/src/main/res/drawable/live_room_menu_red.xml b/common/src/main/res/drawable/live_room_menu_red.xml new file mode 100644 index 000000000..b45eac8b0 --- /dev/null +++ b/common/src/main/res/drawable/live_room_menu_red.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/common/src/main/res/layout/dialog_live_new_function.xml b/common/src/main/res/layout/dialog_live_new_function.xml index e9d7d76f0..c3f4f3f5b 100644 --- a/common/src/main/res/layout/dialog_live_new_function.xml +++ b/common/src/main/res/layout/dialog_live_new_function.xml @@ -182,10 +182,34 @@ android:gravity="center" android:orientation="vertical"> - + android:layout_height="40dp"> + + + + + + + Px&Ur9tkR9HvNmrH09Q51&%a}#Z>ih@{FD2k7T#f{*un_z7-sZea%swj&1MtmUX zqM#zUD88^hKoE7IC~8dW157fpSSgAX1L{&*ks_kRYN<_Vn#?_RoT<35&15D%W_$14 z|GWRW=iGY;|G`IA8NA-=86Hn@0FYWHlfBc{cJGtbe{;>V45282O#q!@CIR4RcX#qw zS64WlOTfx_9uRfA0UQIU2tdD-a;vJg+ycN>gvOd<8N%yrnBnp82>@%21^F8@Z;wV> zuKzU%U8tg>cADEQZV=Hj6Xd;=v`STPKXn3P*@+R6s;b%&Aw&l=77!5u{ES(wi$;T8 zc0uxn06>aTzZAeF0J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zvYc}Vol__jj!#Zbo*^<_0kAnpBofaxy1Qu+)=26HY&P3^!!U~Jboz_=)}w|(p?%bT zipAnj6B83ByU8PJPYYUnY;0`5l(MU`4+H{ttzNx)L`pf`;G!bEhSTW`1_FWIj4>^r z&wpJk7B87i2P%6Z#0j`?;ljpxz5YA^EO1G?C8ab%q0knm(>X#flg(z2R4SFJMdG9X z{eJ(j*XzBPn4P$&P$(n;z)Z#2IOlIcGMQXGFT!7vQrg;qF$|*?3Dbb4rL=)DC!6pzR61b`=6HCRPatbKib z4+DTDm&<)sDwY23BtIy8Jv}{}JRZ;Xxw*N&#>dBxwvr$Jwle%|czF24lKP9s<0O!L z&8|R=+HSY|4a2DFx?VAxsC3q}mM-cJW8xTGs$wa+g|G?BJ zy$Fi<2>|vAA!s5ot0voqj%bB*{;j5IN0v{k%Z)l#O=Ez3jASW^vK8bOO%wtVi=6W> z76-z14B0Uu8-wIl02ly(C?c+Eyc&J?SuVyXH%KOdlu`qLA^?ofSMDz~b9HpoEw2z~ zoIQKiX}8<^=W}3?b55W3NG*~Crmtxe!b$0;(e?oOqL P00000NkvXXu0mjfMLIE~ literal 0 HcmV?d00001 diff --git a/common/src/main/res/mipmap-xxhdpi/ic_prank_gift_switch.png b/common/src/main/res/mipmap-xxhdpi/ic_prank_gift_switch.png new file mode 100644 index 0000000000000000000000000000000000000000..c140e0bc96329d9275b11cd26f91a6f118e4b2d0 GIT binary patch literal 725 zcmV;`0xJE9P)Px%k4Z#9R9Hvtmd|SwK@`W|471x1HXcG0gydjmHrIkwPX*bNN5Ml7Z~g-+dQh|} zr7cRKh5iZlAmUlPHee4P%vlJ#lWm}&XzL+~*^tfdlYyjaNxErp+k$zw-FfrgXTI;v z4+7`R$T{PIDNs~J{y&8fk-4sW2N46#`I|FWXm@wlG7Muo3`1x%8jC`RmE)jdFIlZt zyN-w-0e}KP006f*=kG^B#SVmsR7$x-2w4CCLJ0X91i`#%nsOLa>_951>$-_B40kA{ zbCgo(^?ILmU7yS4a^6v>Qvp&*ZQH)U7%MZzuBva}_utj)_1l(Z_5Oq!3REta6H&Y2 zq~o6FA?N&xrfJ&%aJfJKMLwT@J`$)}tzKh{ZEKoloHXG${)ni`b?B<=I(VLUqfjV( z82tQ8A;)n_nM`K6*=&vzeqo!TxNcM(&dD5a(fok$_aaV`PC8l^N10KX56s3;STBjT4Z3>Qt) z{66YnTu7(WE3H=RFa;s;RW+4L!T$b!NeHnz6i7-ruW8zj@B4#sRPP1G*n}D!Kh5|3 zp8#NS&OePj7#+vC4*=_g5N&2=2D;sDsa~(IXR}${+uQr6a#@zuIf^_qft2zQrF28x zJIQ1c+U@p6rBZoPEEd&^FIF45VkzZaLdfg>WvCi_GoQ~tCWOS=?8lbCb=`+y7_I?; zuAT~=PG?C7u^cB|m00000NkvXX Hu0mjfj?+f; literal 0 HcmV?d00001 diff --git a/main/src/main/res/mipmap-xxhdpi/ic_zl_rule.png b/common/src/main/res/mipmap-xxhdpi/ic_zl_rule.png similarity index 100% rename from main/src/main/res/mipmap-xxhdpi/ic_zl_rule.png rename to common/src/main/res/mipmap-xxhdpi/ic_zl_rule.png diff --git a/common/src/main/res/values-en-rUS/string.xml b/common/src/main/res/values-en-rUS/string.xml index babd3ac2e..89417111e 100644 --- a/common/src/main/res/values-en-rUS/string.xml +++ b/common/src/main/res/values-en-rUS/string.xml @@ -1359,11 +1359,11 @@ Limited ride And limited avatar frame Whether to enter the live broadcast room No,only enter the game There are currently no rooms to join - Turntable prank switch - After closing, all users will not be able to see the contents of the turntable - The turntable consumes diamonds every time - Minimum requirement of 1000 diamonds - Fill in the content of the prank,Fill in a minimum of 2 words and a maximum of 10 words + Turntable Trick Switch + After turning it on, all users will not be able to see the content of the carousel. + Each turn of the wheel consumes diamonds + Starting with at least 1000 diamonds + Choose a gift You have not set up the prank content yet Choose a prank gift Enter the prank content... diff --git a/common/src/main/res/values-zh-rHK/strings.xml b/common/src/main/res/values-zh-rHK/strings.xml index 01320d02b..d46a0ba17 100644 --- a/common/src/main/res/values-zh-rHK/strings.xml +++ b/common/src/main/res/values-zh-rHK/strings.xml @@ -1549,4 +1549,5 @@ 短劇 主播正在PK,稍後再試 您將花費%s鑽石,為主播開通 + 完成*1 diff --git a/common/src/main/res/values-zh-rTW/strings.xml b/common/src/main/res/values-zh-rTW/strings.xml index cc243dfa7..1c038f7c4 100644 --- a/common/src/main/res/values-zh-rTW/strings.xml +++ b/common/src/main/res/values-zh-rTW/strings.xml @@ -1549,4 +1549,5 @@ 短劇 主播正在PK,稍後再試 您將花費%s鑽石,為主播開通 + 完成*1 diff --git a/common/src/main/res/values-zh/strings.xml b/common/src/main/res/values-zh/strings.xml index c1043b2fa..a30e61716 100644 --- a/common/src/main/res/values-zh/strings.xml +++ b/common/src/main/res/values-zh/strings.xml @@ -1547,4 +1547,5 @@ 短劇 主播正在PK,稍後再試 您將花費%s鑽石,為主播開通 + 完成*1 diff --git a/common/src/main/res/values/strings.xml b/common/src/main/res/values/strings.xml index fe08a0498..37e0c9595 100644 --- a/common/src/main/res/values/strings.xml +++ b/common/src/main/res/values/strings.xml @@ -1360,11 +1360,11 @@ Limited ride And limited avatar frame Whether to enter the live broadcast room No,only enter the game There are currently no rooms to join - Turntable prank switch - After closing, all users will not be able to see the contents of the turntable - The turntable consumes diamonds every time - Minimum requirement of 1000 diamonds - Fill in the content of the prank,Fill in a minimum of 2 words and a maximum of 10 words + Turntable Trick Switch + After turning it on, all users will not be able to see the content of the carousel. + Each turn of the wheel consumes diamonds + Starting with at least 1000 diamonds + Choose a gift You have not set up the prank content yet Choose a prank gift Enter the prank content... @@ -1571,4 +1571,5 @@ Limited ride And limited avatar frame 3.The final interpretation of this activity belongs to PDLIVE. Theater The anchor is in PK, please try again later + once diff --git a/common/src/main/res/values/style.xml b/common/src/main/res/values/style.xml index f3a12b7f6..cc94b7b30 100644 --- a/common/src/main/res/values/style.xml +++ b/common/src/main/res/values/style.xml @@ -141,4 +141,10 @@ + + + \ No newline at end of file diff --git a/live/src/main/java/com/yunbao/live/activity/LiveActivity.java b/live/src/main/java/com/yunbao/live/activity/LiveActivity.java index 93d0aff7a..a5f335d3e 100644 --- a/live/src/main/java/com/yunbao/live/activity/LiveActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/LiveActivity.java @@ -771,13 +771,15 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL mLiveSwLinkMicPkPresenter.onLinkMicPkStart(pkUid, 1); pr = new pkRunnable(pkUid, pkhead, pkname, isLadders); mHandler.postDelayed(pr, 4000);//3秒后执行Runnable中的run方法 + mLiveRoomViewHolder.initAnchorSay(); + mLiveRoomViewHolder.closePrankView(); } } else { if (mLiveRyLinkMicPkPresenter != null && mLiveRoomViewHolder != null) { mLiveRyLinkMicPkPresenter.onLinkMicPkStart(pkUid, 1); pr = new pkRunnable(pkUid, pkhead, pkname, isLadders); mHandler.postDelayed(pr, 4000);//3秒后执行Runnable中的run方法 - + mLiveRoomViewHolder.closePrankView(); } } } diff --git a/live/src/main/java/com/yunbao/live/activity/LiveAnchorActivity.java b/live/src/main/java/com/yunbao/live/activity/LiveAnchorActivity.java index 75e1bbd4b..9085ab432 100644 --- a/live/src/main/java/com/yunbao/live/activity/LiveAnchorActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/LiveAnchorActivity.java @@ -1057,6 +1057,11 @@ public class LiveAnchorActivity extends LiveActivity implements LiveFunctionClic } + @Override + public void onUpdatePrankProgress(String prankString) { + + } + /** * 腾讯sdk连麦时候主播混流 */ diff --git a/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java b/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java index 45456e670..59018127d 100644 --- a/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java @@ -619,6 +619,11 @@ public class LiveAudienceActivity extends LiveActivity { manager.prankTurntable(msgtype, time, jsonObject); } + @Override + public void onUpdatePrankProgress(String prankString) { + + } + @Override public void onBackPressed() { if (manager != null && manager.getsudGameMin()) { diff --git a/live/src/main/java/com/yunbao/live/activity/LiveRyAnchorActivity.java b/live/src/main/java/com/yunbao/live/activity/LiveRyAnchorActivity.java index 42db962b2..f99b445e0 100644 --- a/live/src/main/java/com/yunbao/live/activity/LiveRyAnchorActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/LiveRyAnchorActivity.java @@ -266,7 +266,6 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl mContainerWrap = (ViewGroup) findViewById(R.id.container_wrap); mContainer = (ViewGroup) findViewById(R.id.container); mLiveRyLinkMicPkPresenter = new LiveRyLinkMicPkPresenter(mContext, mLivePushViewHolder, true, mContainer); - RandomPkManager.getInstance().addOnRandomPkTimer(onRandomPkTimer); //添加开播前设置控件 @@ -298,8 +297,6 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl ToastUtil.show(mContext.getString(R.string.live_push_failed)); } }); - - } private void initFaceManager() { @@ -378,8 +375,17 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl case Constants.LIVE_FUNC_ZG://zg // ToastUtil.show("開發中,敬請期待"); LivePrankDialogFragment fragment = new LivePrankDialogFragment(); + fragment.setOnPrankResultListener(new LivePrankDialogFragment.onPrankResultListener() { + @Override + public void OpenAndCloseListener() { + if(mLiveRoomViewHolder!=null){ + mLiveRoomViewHolder.initPrankProgress(); + } + } + }); fragment.setmLiveUid(mLiveUid); fragment.show(getSupportFragmentManager(), "LivePrankDialogFragment"); + mLiveAnchorViewHolder.closeMenuRed(); break; case Constants.LIVE_FUNC_MIC://語音 //ToastUtil.show("開發中,敬請期待"); @@ -698,6 +704,7 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl bundle.putBoolean("isPk", isDRPK == 1 || PKing || mLivePushViewHolder.isPking()); bundle.putLong("liveTime", mLiveAnchorViewHolder.getmAnchorLiveTime()); bundle.putBoolean(Constants.OPEN_FLASH, mLivePushViewHolder != null && mLivePushViewHolder.isFlashOpen()); + bundle.putBoolean("isShowZgRed",mLiveAnchorViewHolder.isShowMenuRed()); fragment.setArguments(bundle); fragment.setFunctionClickListener(this); fragment.show(getSupportFragmentManager(), "LiveFunctionDialogFragment"); @@ -806,6 +813,7 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl mLiveRoomViewHolder.initAnchorSay(); mLiveRoomViewHolder.setGiftWall(obj.getString("gift_wall_lighten_number"), obj.getString("gift_wall_lighten_total")); } + mLiveRyLinkMicPkPresenter.setmLiveRoomViewHolder(mLiveRoomViewHolder); if (mLiveAnchorViewHolder == null) { mLiveAnchorViewHolder = new LiveRyAnchorViewHolder(mContext, mContainer); mLiveAnchorViewHolder.setLiveBean(mLiveBean); @@ -871,6 +879,11 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl getAiRobotStatus(); MicedUserManager.get().removeAllMicUserList(); MicUserManager.get().removeAllMicUserList(); + //加载整蛊 + if(mLiveRoomViewHolder!=null){ + mLiveRoomViewHolder.initPrankProgress(); + mLiveRoomViewHolder.sendMsgPrank(); + } } /** @@ -1455,6 +1468,13 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl } } + @Override + public void onUpdatePrankProgress(String prankString) { + if (mLiveRoomViewHolder != null){ + mLiveRoomViewHolder.refreshPrank(prankString); + } + } + /** * 腾讯sdk连麦时候主播混流 diff --git a/live/src/main/java/com/yunbao/live/activity/LiveSwAnchorActivity.java b/live/src/main/java/com/yunbao/live/activity/LiveSwAnchorActivity.java index 6cab519b9..ffe014b60 100644 --- a/live/src/main/java/com/yunbao/live/activity/LiveSwAnchorActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/LiveSwAnchorActivity.java @@ -25,7 +25,6 @@ import android.widget.ImageView; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.fragment.app.DialogFragment; - import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import com.blankj.utilcode.util.GsonUtils; @@ -366,8 +365,17 @@ public class LiveSwAnchorActivity extends LiveActivity implements LiveFunctionCl case Constants.LIVE_FUNC_ZG://zg // ToastUtil.show("開發中,敬請期待"); LivePrankDialogFragment fragment = new LivePrankDialogFragment(); + fragment.setOnPrankResultListener(new LivePrankDialogFragment.onPrankResultListener() { + @Override + public void OpenAndCloseListener() { + if(mLiveRoomViewHolder!=null){ + mLiveRoomViewHolder.initPrankProgress(); + } + } + }); fragment.setmLiveUid(mLiveUid); fragment.show(getSupportFragmentManager(), "LivePrankDialogFragment"); + mLiveAnchorViewHolder.closeMenuRed(); break; case Constants.LIVE_FUNC_MIC://語音 //ToastUtil.show("開發中,敬請期待"); @@ -692,6 +700,7 @@ public class LiveSwAnchorActivity extends LiveActivity implements LiveFunctionCl bundle.putBoolean("isPk", isDRPK == 1 || PKing || mLivePushViewHolder.isPking()); bundle.putLong("liveTime", mLiveAnchorViewHolder.getmAnchorLiveTime()); bundle.putBoolean(Constants.OPEN_FLASH, mLivePushViewHolder != null && mLivePushViewHolder.isFlashOpen()); + bundle.putBoolean("isShowZgRed",mLiveAnchorViewHolder.isShowMenuRed()); fragment.setArguments(bundle); fragment.setFunctionClickListener(this); fragment.show(getSupportFragmentManager(), "LiveFunctionDialogFragment"); @@ -865,6 +874,12 @@ public class LiveSwAnchorActivity extends LiveActivity implements LiveFunctionCl getAiRobotStatus(); MicedUserManager.get().removeAllMicUserList(); MicUserManager.get().removeAllMicUserList(); + //加载整蛊 + if(mLiveRoomViewHolder!=null){ + mLiveRoomViewHolder.initPrankProgress(); + mLiveRoomViewHolder.sendMsgPrank(); + } + mLiveSwLinkMicPkPresenter.setmLiveRoomViewHolder(mLiveRoomViewHolder); } /** @@ -1472,6 +1487,13 @@ public class LiveSwAnchorActivity extends LiveActivity implements LiveFunctionCl } } + @Override + public void onUpdatePrankProgress(String prankString) { + if (mLiveRoomViewHolder != null){ + mLiveRoomViewHolder.refreshPrank(prankString); + } + } + /** * 腾讯sdk连麦时候主播混流 diff --git a/live/src/main/java/com/yunbao/live/activity/SudSwGameActivity.java b/live/src/main/java/com/yunbao/live/activity/SudSwGameActivity.java index d66881c79..d8cd07071 100644 --- a/live/src/main/java/com/yunbao/live/activity/SudSwGameActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/SudSwGameActivity.java @@ -19,6 +19,7 @@ import com.alibaba.android.arouter.facade.annotation.Route; import com.alibaba.fastjson.JSONObject; import com.google.gson.Gson; import com.lxj.xpopup.XPopup; +import com.lzf.easyfloat.EasyFloat; import com.yunbao.common.CommonAppConfig; import com.yunbao.common.Constants; import com.yunbao.common.R; @@ -34,6 +35,7 @@ import com.yunbao.common.bean.RoomMicStatusModel; import com.yunbao.common.bean.SudGameChatImModel; import com.yunbao.common.bean.SudGameUserModel; import com.yunbao.common.dialog.SudGameInputPopupWindow; +import com.yunbao.common.event.LiveFloatEvent; import com.yunbao.common.event.CheckRemainingBalanceEvent; import com.yunbao.common.event.SubGameEvent; import com.yunbao.common.event.SudGameSocketImEvent; @@ -71,6 +73,7 @@ import cn.rongcloud.rtc.api.RCRTCRemoteUser; import cn.rongcloud.rtc.api.RCRTCRoom; import cn.rongcloud.rtc.api.stream.RCRTCInputStream; import cn.rongcloud.rtc.base.RTCErrorCode; +import io.agora.beautyapi.faceunity.agora.LiveFloatView; import io.agora.beautyapi.faceunity.agora.SWAuManager; import io.rong.imlib.IRongCoreCallback; import io.rong.imlib.IRongCoreEnum; @@ -130,6 +133,8 @@ public class SudSwGameActivity extends AbsActivity implements GameSwMicManager.M } }); + //进游戏房就关掉小窗 + EasyFloat.dismiss("LiveFloatView", true); // 设置禁用麦克风采集 //RCRTCEngine.getInstance().getDefaultAudioStream().setMicrophoneDisable(disable); diff --git a/live/src/main/java/com/yunbao/live/adapter/ComboAdapter.java b/live/src/main/java/com/yunbao/live/adapter/ComboAdapter.java new file mode 100644 index 000000000..3f9b18ba6 --- /dev/null +++ b/live/src/main/java/com/yunbao/live/adapter/ComboAdapter.java @@ -0,0 +1,76 @@ +package com.yunbao.live.adapter; + +import android.content.Context; +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.recyclerview.widget.RecyclerView; + +import com.yunbao.common.bean.PrankProgressBean; +import com.yunbao.common.glide.ImgLoader; +import com.yunbao.live.R; + +import java.util.ArrayList; +import java.util.List; + +public class ComboAdapter extends RecyclerView.Adapter{ + + private List mList = new ArrayList<>(); + private Context mContext; + + public ComboAdapter(Context context){ + mContext = context; + } + + public void setList(List list){ + mList.clear(); + mList.addAll(list); + notifyDataSetChanged(); + } + + @NonNull + @Override + public MyViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { + return new MyViewHolder(LayoutInflater.from(mContext).inflate(R.layout.item_combo_vote, parent, false)); + } + + @Override + public void onBindViewHolder(@NonNull MyViewHolder holder, int position) { + PrankProgressBean.PrankList data = mList.get(position); + holder.itemView.setOnClickListener(v-> onItemClickListener.onItemClick(v,data.getGift_id())); + holder.combo_item_prank_name.setText(data.getPrank_content()); + ImgLoader.display(mContext,data.getGift_icon(),holder.combo_item_icon); + holder.combo_item_combo.setText(String.valueOf(data.getSend_num())); + } + + @Override + public int getItemCount() { + return mList.size(); + } + + class MyViewHolder extends RecyclerView.ViewHolder{ + + private TextView combo_item_prank_name,combo_item_combo; + private ImageView combo_item_icon; + + public MyViewHolder(@NonNull View itemView){ + super(itemView); + combo_item_prank_name = itemView.findViewById(R.id.combo_item_prank_name); + combo_item_combo = itemView.findViewById(R.id.combo_item_combo); + combo_item_icon = itemView.findViewById(R.id.combo_item_icon); + } + } + + private OnItemClickListener onItemClickListener; + + public interface OnItemClickListener { + void onItemClick(View view,int giftId); + } + + public void addOnItemClickListener(OnItemClickListener onItemClickListener){ + this.onItemClickListener = onItemClickListener; + } +} diff --git a/live/src/main/java/com/yunbao/live/adapter/FrameGiftAdapter.java b/live/src/main/java/com/yunbao/live/adapter/FrameGiftAdapter.java index 6e5acb0f2..5e2b22877 100644 --- a/live/src/main/java/com/yunbao/live/adapter/FrameGiftAdapter.java +++ b/live/src/main/java/com/yunbao/live/adapter/FrameGiftAdapter.java @@ -42,6 +42,7 @@ public class FrameGiftAdapter extends RecyclerView.Adapter { if (!TextUtils.isEmpty(wishGiftId) && TextUtils.equals(giftJson.get(position).getId() + "", wishGiftId)) { Bus.get().post(new LiveGiftItemEvent().setLiveGiftModel(giftJson.get(position))); + wishGiftId = null; } FrameGiftViewHolder frameGiftViewHolder = (FrameGiftViewHolder) holder; diff --git a/live/src/main/java/com/yunbao/live/adapter/FreePkRecyclerAdapter.java b/live/src/main/java/com/yunbao/live/adapter/FreePkRecyclerAdapter.java index 6ce23c031..4e255eded 100644 --- a/live/src/main/java/com/yunbao/live/adapter/FreePkRecyclerAdapter.java +++ b/live/src/main/java/com/yunbao/live/adapter/FreePkRecyclerAdapter.java @@ -146,31 +146,13 @@ public class FreePkRecyclerAdapter extends RefreshAdapter { if (code == 0 && info.length > 0) { JSONObject obj = JSON.parseObject(info[0]); if (obj != null) { - if (TextUtils.equals(obj.getString("ispk"), "0")) {//自己不在PK,可以发起邀请 - + if(mDrPkNum!=-1){ LiveHttpUtil.getMicList(liveUid, 0, new com.yunbao.common.http.HttpCallback() { @Override public void onSuccess(int code, String msg, String[] info) { System.out.println("code = " + code + ", msg = " + msg + ", info = " + Arrays.deepToString(info)); //非0认为未开通连麦权限 if (code != 0) { - if (mDrPkNum == -1) { - if (WordUtil.isNewZh()) { - ToastUtil.show("邀请 " + bean.getUserNiceName() + " 发送成功"); - } else { - ToastUtil.show("invite " + bean.getUserNiceName() + " successful"); - } - mOnItemClickListener.onItemClick(bean, -1); - if(mContext instanceof LiveSwAnchorActivity){ - ((LiveSwAnchorActivity) mContext).linkMicAnchorApply(bean.getId(), bean.getId(), - false); - }else{ - ((LiveRyAnchorActivity) mContext).linkMicAnchorApply(bean.getId(), bean.getId(), - ((LiveRyAnchorActivity) mContext).buildLinkMicJSON().toString() - ); - } - return; - } if (mDrPkNum <= 0) { if (WordUtil.isNewZh()) { ToastUtil.show("多人次數已用完"); @@ -203,10 +185,44 @@ public class FreePkRecyclerAdapter extends RefreshAdapter { } }); }else{ - if (WordUtil.isNewZh()) { - ToastUtil.show("請先關閉PK"); - } else { - ToastUtil.show("Please disable the PK"); + if (TextUtils.equals(obj.getString("ispk"), "0")) {//自己不在PK,可以发起邀请 + LiveHttpUtil.getMicList(liveUid, 0, new com.yunbao.common.http.HttpCallback() { + @Override + public void onSuccess(int code, String msg, String[] info) { + System.out.println("code = " + code + ", msg = " + msg + ", info = " + Arrays.deepToString(info)); + //非0认为未开通连麦权限 + if (code != 0) { + if (mDrPkNum == -1) { + if (WordUtil.isNewZh()) { + ToastUtil.show("邀请 " + bean.getUserNiceName() + " 发送成功"); + } else { + ToastUtil.show("invite " + bean.getUserNiceName() + " successful"); + } + mOnItemClickListener.onItemClick(bean, -1); + if(mContext instanceof LiveSwAnchorActivity){ + ((LiveSwAnchorActivity) mContext).linkMicAnchorApply(bean.getId(), bean.getId(), + false); + }else{ + ((LiveRyAnchorActivity) mContext).linkMicAnchorApply(bean.getId(), bean.getId(), + ((LiveRyAnchorActivity) mContext).buildLinkMicJSON().toString() + ); + } + } + } else { + if (WordUtil.isNewZh()) { + ToastUtil.show("請先關閉語音連麥"); + } else { + ToastUtil.show("Please disable the voice connection first"); + } + } + } + }); + }else{ + if (WordUtil.isNewZh()) { + ToastUtil.show("請先關閉PK"); + } else { + ToastUtil.show("Please disable the PK"); + } } } } diff --git a/live/src/main/java/com/yunbao/live/adapter/ItemLivePrankGiftNumberAdapter.java b/live/src/main/java/com/yunbao/live/adapter/ItemLivePrankGiftNumberAdapter.java new file mode 100644 index 000000000..38c3b14fc --- /dev/null +++ b/live/src/main/java/com/yunbao/live/adapter/ItemLivePrankGiftNumberAdapter.java @@ -0,0 +1,79 @@ +package com.yunbao.live.adapter; + +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.Button; + +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.RecyclerView; + +import com.yunbao.live.R; + +import java.util.ArrayList; +import java.util.List; + +public class ItemLivePrankGiftNumberAdapter extends RecyclerView.Adapter { + List list = new ArrayList<>(); + int selectNumber; + OnSelectNumberListener onSelectNumberListener; + + public void setOnSelectNumberListener(OnSelectNumberListener onSelectNumberListener) { + this.onSelectNumberListener = onSelectNumberListener; + } + + public void setSelectNumber(int selectNumber) { + this.selectNumber = selectNumber; + } + + public int getSelectNumber() { + return selectNumber; + } + + public void setList(List list) { + this.list = list; + notifyDataSetChanged(); + } + + @NonNull + @Override + public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { + return new ViewHolder(LayoutInflater.from(parent.getContext()).inflate(R.layout.item_prank_dialog_add_gift_number, parent, false)); + } + + @Override + public void onBindViewHolder(@NonNull ViewHolder holder, int position) { + holder.setData(list.get(position), selectNumber); + } + + @Override + public int getItemCount() { + return list.size(); + } + + public interface OnSelectNumberListener { + void onSelectNumber(int number); + } + + public class ViewHolder extends RecyclerView.ViewHolder { + private Button button; + + public ViewHolder(@NonNull View itemView) { + super(itemView); + button = itemView.findViewById(R.id.coin); + } + + public void setData(int number, int selectNumber) { + button.setText(String.valueOf(number)); + if (number == selectNumber) { + button.setBackgroundResource(R.drawable.bg_prank_btn_gift_add_number); + } else { + button.setBackgroundResource(R.drawable.bg_prank_coin); + } + button.setOnClickListener(view -> { + ItemLivePrankGiftNumberAdapter.this.selectNumber = number; + notifyDataSetChanged(); + }); + } + } +} 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 bac417ed9..3c739cc9f 100644 --- a/live/src/main/java/com/yunbao/live/adapter/LiveChatAdapter.java +++ b/live/src/main/java/com/yunbao/live/adapter/LiveChatAdapter.java @@ -6,6 +6,8 @@ import static com.yunbao.live.bean.LiveChatBean.LUCKY_ANGEL; import static com.yunbao.live.bean.LiveChatBean.RECOMMEND_CARD_NOTIFY; import static com.yunbao.live.bean.LiveChatBean.STAR_CHALLENGE_UPGRADE_NOTIFY; import static com.yunbao.live.bean.LiveChatBean.SYSTEM3_COLOR; +import static com.yunbao.live.bean.LiveChatBean.TYPE_TO_ANCHOR_PRANK; +import static com.yunbao.live.bean.LiveChatBean.TYPE_TO_ANCHOR_PRANK_GIFT; import static com.yunbao.live.bean.LiveChatBean.TYPE_TO_USER_MSG; import static com.yunbao.live.bean.LiveChatBean.WISH_LIST_PROGRESS; import static com.yunbao.live.bean.LiveChatBean.XYD_COMPLETE; @@ -219,6 +221,10 @@ public class LiveChatAdapter extends RecyclerView.Adapter { LinearLayoutCompat attentionLayout; ClipPathCircleImage clipImage2; + LinearLayoutCompat prank_open_live_layout; + TextView prank_open_live_msg; + TextView prank_to_setting; + public Vh(View itemView) { super(itemView); mBg = (LinearLayout) itemView.findViewById(R.id.bg); @@ -245,6 +251,10 @@ public class LiveChatAdapter extends RecyclerView.Adapter { btnAttention = (ImageView) itemView.findViewById(R.id.btn_attention); textLeave = (ImageView) itemView.findViewById(R.id.text_leave); + prank_open_live_layout = itemView.findViewById(R.id.prank_open_live_layout); + prank_open_live_msg = itemView.findViewById(R.id.prank_open_live_msg); + prank_to_setting = itemView.findViewById(R.id.prank_to_setting); + } void setData(final LiveChatBean bean, int position) { @@ -255,9 +265,7 @@ public class LiveChatAdapter extends RecyclerView.Adapter { Bus.get().post(new LiveAudienceEvent() .setType(LiveAudienceEvent.LiveAudienceType.INPUT_DIALOG) .setOlineUserlistModel(new OlineUserlistModel().setId(bean.getId()).setUserNicename(bean.getUserNiceName()))); - } - Log.e("eqwewqeweq", bean.toString()); return true; } @@ -521,7 +529,29 @@ public class LiveChatAdapter extends RecyclerView.Adapter { if (!StringUtil.isEmpty(bean.getBubble())) { new LoadDian9TuUtil().loadDian9Tu(mContext, mBg, bean.getBubble(), 1); } - } else { + } else if(bean.getType() == TYPE_TO_ANCHOR_PRANK){ + /*String str1 = "娛樂整蠱"; + String str2 = "全新升級,快去設置整蠱内容,給直播間增加更多趣味吧!"; + String str3 = ">>立即前往>>"; + mTextView.setText(Html.fromHtml(str1+str2+str3)); + new LoadDian9TuUtil().loadDian9TuAssets(mContext, mBg, 1);*/ + + LinearLayout.LayoutParams params3 = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT); + params3.setMargins(0, 8, DpUtil.dp2px(80), 8); + params3.gravity = Gravity.CENTER_VERTICAL; + mBg.setLayoutParams(params3); + prank_open_live_layout.setVisibility(View.VISIBLE); + + }else if(bean.getType() == TYPE_TO_ANCHOR_PRANK_GIFT){ + StringBuffer stringBuffer = new StringBuffer(); + stringBuffer.append(""+(WordUtil.isNewZh()?"整蠱來了!":"Tricky is coming")+""); + stringBuffer.append(" "+bean.getUserNiceName()+""); + stringBuffer.append(""+(WordUtil.isNewZh()?"送出":"send")+"【"+bean.getGiftName()+"*"+bean.getHot_num()+"】"); + stringBuffer.append(","+(WordUtil.isNewZh()?"主播需完成":",and the anchor needs to complete ")+""); + stringBuffer.append( "【"+bean.getContent()+"】"); + mTextView.setText(Html.fromHtml(stringBuffer.toString())); + new LoadDian9TuUtil().loadDian9TuAssets(mContext, mBg, 1); + }else{ if (bean.getBubble() != null && !bean.getBubble().equals("")) { //加载.9图聊天气泡 new LoadDian9TuUtil().loadDian9Tu(mContext, mBg, bean.getBubble(), 1); diff --git a/live/src/main/java/com/yunbao/live/adapter/LiveParcelItemAdapter.java b/live/src/main/java/com/yunbao/live/adapter/LiveParcelItemAdapter.java index dad11e84a..d05fb0dcb 100644 --- a/live/src/main/java/com/yunbao/live/adapter/LiveParcelItemAdapter.java +++ b/live/src/main/java/com/yunbao/live/adapter/LiveParcelItemAdapter.java @@ -11,6 +11,7 @@ import com.yunbao.common.bean.LiveGiftBean; import com.yunbao.common.utils.Bus; import com.yunbao.live.R; import com.yunbao.live.event.LiveGiftItemEvent; +import com.yunbao.live.event.LiveParcelItemRefreshEvent; import com.yunbao.live.views.LiveParcelItemViewHolder; import java.util.ArrayList; @@ -56,9 +57,11 @@ public class LiveParcelItemAdapter extends RecyclerView.Adapter { notifyDataSetChanged(); } - public void refreshWrapListAfterSend(LiveGiftBean model) { + public void refreshWrapListAfterSend(LiveParcelItemRefreshEvent refreshEvent) { + LiveGiftBean liveGiftBean = refreshEvent.getLiveGiftModel(); + int sendCount = refreshEvent.getSendCount();//赠送礼物数量 for (int i = 0; i < giftJson.size(); i++) { - if (giftJson.get(i).getId() == model.getId()) { + if (giftJson.get(i).getId() == liveGiftBean.getId()) { String giftNum = giftJson.get(i).getGiftNum(); @@ -70,10 +73,11 @@ public class LiveParcelItemAdapter extends RecyclerView.Adapter { number = 0; } if (number == 1) { - + //如果礼物只剩一个,直接移除礼物 giftJson.remove(i); } else { - giftJson.get(i).setGiftNum(String.valueOf(number - 1)); + //设置送礼后的礼物数量 + giftJson.get(i).setGiftNum(String.valueOf(number - sendCount)); } } } diff --git a/live/src/main/java/com/yunbao/live/adapter/LivePrankRecyclerAdapter.java b/live/src/main/java/com/yunbao/live/adapter/LivePrankRecyclerAdapter.java index a00862fad..25cf9ef60 100644 --- a/live/src/main/java/com/yunbao/live/adapter/LivePrankRecyclerAdapter.java +++ b/live/src/main/java/com/yunbao/live/adapter/LivePrankRecyclerAdapter.java @@ -1,5 +1,6 @@ package com.yunbao.live.adapter; +import android.annotation.SuppressLint; import android.app.Dialog; import android.content.Context; import android.view.LayoutInflater; @@ -17,6 +18,7 @@ import com.yunbao.common.glide.ImgLoader; import com.yunbao.common.interfaces.OnItemClickListener; import com.yunbao.common.manager.IMLoginManager; import com.yunbao.common.utils.DialogUitl; +import com.yunbao.common.utils.StringUtil; import com.yunbao.common.utils.ToastUtil; import com.yunbao.common.utils.WordUtil; import com.yunbao.live.R; @@ -107,7 +109,6 @@ public class LivePrankRecyclerAdapter extends RecyclerView.Adapter { PrankGiftBean bean = (PrankGiftBean) v.getTag(); onItemClickListener.onItemClick(bean.getGiftId(), (Integer) itemView.getTag()); }); - } + @SuppressLint("SetTextI18n") public void setDate(PrankGiftBean bean, int position) { ImgLoader.display(mContext, bean.getIcon(), mIcon); itemView.setTag(position); - mName.setText(bean.getName()); + mName.setText(bean.getName()+"*"+bean.getNum()); mTitle.setText(bean.getTitle()); - mNum.setText(bean.getNum() + ""); mRemove.setTag(bean); } @@ -148,11 +147,11 @@ public class LivePrankRecyclerAdapter extends RecyclerView.Adapter { if (IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) { - DialogUitl.showSimpleInputDialog(mContext, "填寫整蠱內容", DialogUitl.INPUT_TYPE_TEXT, 10, new DialogUitl.SimpleCallback() { + DialogUitl.showSimpleInputDialog(mContext, WordUtil.isNewZh() ? "填寫整蠱內容" : "prank content", DialogUitl.INPUT_TYPE_TEXT, 10, new DialogUitl.SimpleCallback() { @Override public void onConfirmClick(Dialog dialog, String content) { if (WordUtil.isSpecialChar(content)) { - ToastUtil.show("整蠱內容不能包含特殊字符"); + ToastUtil.show(WordUtil.isNewZh() ? "整蠱內容不能包含特殊字符" : "The prank content must not contain special characters"); return; } if (content.length() >= 2 && content.length() <= 10) { @@ -205,23 +204,67 @@ public class LivePrankRecyclerAdapter extends RecyclerView.Adapter { + + private List mList = new ArrayList<>(); + private Context mContext; + + private boolean isAn; + + public static final int TYPE_GIFT = 1; + public static final int TYPE_COMBO = 2; + private int viewType1 = TYPE_GIFT; + + public PrankAdapter(Context context){ + mContext = context; + } + public void setViewType(int viewType) { + this.viewType1 = viewType; + } + + public void setList(List list){ + mList.clear(); + mList.addAll(list); + notifyDataSetChanged(); + } + + public void showAnView(List list,boolean isAn){ + this.isAn = isAn; + mList.clear(); + mList.addAll(list); + notifyDataSetChanged(); + } + + @NonNull + @Override + public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { + if (viewType1 ==TYPE_GIFT){ + return new MyViewHolder(LayoutInflater.from(mContext).inflate(R.layout.item_prank_progress, parent, false)); + }else{ + return new MyComboViewHolder(LayoutInflater.from(mContext).inflate(R.layout.item_combo_vote, parent, false)); + } + } + + @SuppressLint("SetTextI18n") + @Override + public void onBindViewHolder(@NonNull RecyclerView.ViewHolder viewHolder, int position) { + PrankProgressBean.PrankList data = mList.get(position); + if(viewHolder instanceof MyViewHolder){ + MyViewHolder holder = (MyViewHolder) viewHolder; + holder.itemView.setOnClickListener(v-> onItemClickListener.onItemClick(v,data.getGift_id())); + int completedNum = data.getCompleted_num(); + if (completedNum>99){ + holder.prank_item_subscript.setText("99+"); + }else { + holder.prank_item_subscript.setText(String.valueOf(data.getCompleted_num())); + } + holder.prank_item_prank_name.setText(data.getPrank_content()); + holder.prank_item_gift_name.setText(WordUtil.isNewZh() ? data.getGift_name() : data.getGift_name_en()); + holder.prank_item_now_progress.setText(String.valueOf(data.getSend_num())); + holder.prank_item_total_progress.setText("/"+ data.getGift_num()); + ImgLoader.display(mContext,data.getGift_icon(),holder.prank_item_icon); + holder.prank_item_progress.setMax(data.getGift_num()); + holder.prank_item_progress.setProgress(data.getSend_num()); + holder.an_prank_name.setText(data.getPrank_content()); + holder.an_prank_remove.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + onItemClickListener.onItemDel(data.getGift_id()); + } + }); + if(isAn){ + holder.anLayout.setVisibility(View.VISIBLE); + holder.progressLayout.setVisibility(View.GONE); + holder.nameLayout.setVisibility(View.GONE); + }else{ + holder.anLayout.setVisibility(View.GONE); + holder.progressLayout.setVisibility(View.VISIBLE); + holder.nameLayout.setVisibility(View.VISIBLE); + } + }else{ + MyComboViewHolder holder = (MyComboViewHolder) viewHolder; + holder.itemView.setOnClickListener(v-> onItemClickListener.onItemClick(v,data.getGift_id())); + holder.combo_item_prank_name.setText(data.getPrank_content()); + ImgLoader.display(mContext,data.getGift_icon(),holder.combo_item_icon); + holder.combo_item_combo.setText(String.valueOf(data.getSend_num())); + } + } + + @Override + public int getItemCount() { + return mList.size(); + } + + class MyViewHolder extends RecyclerView.ViewHolder{ + private TextView prank_item_subscript,prank_item_prank_name,prank_item_gift_name,prank_item_now_progress,prank_item_total_progress; + private ImageView prank_item_icon; + private ProgressBar prank_item_progress; + private LinearLayout anLayout; + private MarqueeTextView an_prank_name; + private TextView an_prank_remove; + private LinearLayout progressLayout; + private LinearLayout nameLayout; + public MyViewHolder(@NonNull View itemView) { + super(itemView); + prank_item_subscript = itemView.findViewById(R.id.prank_item_subscript); + prank_item_prank_name = itemView.findViewById(R.id.prank_item_prank_name); + prank_item_gift_name = itemView.findViewById(R.id.prank_item_gift_name); + prank_item_now_progress = itemView.findViewById(R.id.prank_item_now_progress); + prank_item_total_progress = itemView.findViewById(R.id.prank_item_total_progress); + prank_item_icon = itemView.findViewById(R.id.prank_item_icon); + prank_item_progress = itemView.findViewById(R.id.prank_item_progress); + + nameLayout = itemView.findViewById(R.id.nameLayout); + progressLayout = itemView.findViewById(R.id.progressLayout); + //主播 + anLayout = itemView.findViewById(R.id.anLayout); + an_prank_name = itemView.findViewById(R.id.an_prank_name); + an_prank_remove = itemView.findViewById(R.id.an_prank_remove); + } + } + + class MyComboViewHolder extends RecyclerView.ViewHolder{ + + private TextView combo_item_prank_name,combo_item_combo; + private ImageView combo_item_icon; + + public MyComboViewHolder(@NonNull View itemView){ + super(itemView); + combo_item_prank_name = itemView.findViewById(R.id.combo_item_prank_name); + combo_item_combo = itemView.findViewById(R.id.combo_item_combo); + combo_item_icon = itemView.findViewById(R.id.combo_item_icon); + } + } + + + private OnItemClickListener onItemClickListener; + + public interface OnItemClickListener { + void onItemClick(View view,int giftId); + + void onItemDel(int giftId); + } + + public void addOnItemClickListener(OnItemClickListener onItemClickListener){ + this.onItemClickListener = onItemClickListener; + } +} 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 e074fd2fa..322fff5fe 100644 --- a/live/src/main/java/com/yunbao/live/bean/LiveChatBean.java +++ b/live/src/main/java/com/yunbao/live/bean/LiveChatBean.java @@ -30,7 +30,8 @@ public class LiveChatBean { public static final int WISH_LIST_PROGRESS = 307;//心愿单进度通知 public static final int BLIND_BOX = 409;//盲盒礼物消息 public static final int TYPE_TO_USER_MSG = 500;//指定信息 - + public static final int TYPE_TO_ANCHOR_PRANK = 501;//整蠱-開播提示語 + public static final int TYPE_TO_ANCHOR_PRANK_GIFT = 502;//整蠱-禮物 private String id; private String userNiceName; @@ -68,6 +69,14 @@ public class LiveChatBean { return WordUtil.isNewZh() ? giftName : giftname_en; } + public String getGiftname_en() { + return giftname_en; + } + + public void setGiftname_en(String giftname_en) { + this.giftname_en = giftname_en; + } + public LiveChatBean setGiftName(String giftName) { this.giftName = giftName; return this; diff --git a/live/src/main/java/com/yunbao/live/dialog/GiftPopDialog.java b/live/src/main/java/com/yunbao/live/dialog/GiftPopDialog.java index ac1340c5d..4694205e4 100644 --- a/live/src/main/java/com/yunbao/live/dialog/GiftPopDialog.java +++ b/live/src/main/java/com/yunbao/live/dialog/GiftPopDialog.java @@ -217,7 +217,7 @@ public class GiftPopDialog extends AbsDialogPopupWindow implements ActionListene for (int i = 0; i < list.size(); i++) { JSONObject data = list.getJSONObject(i); GiftTopBean giftTopBean = new GiftTopBean(); - giftTopBean.setName(WordUtil.isNewZh()?data.getString("name"):data.getString("en_name")); + giftTopBean.setName(WordUtil.isNewZh() ? data.getString("name") : data.getString("en_name")); name.add(giftTopBean); } @@ -265,17 +265,17 @@ public class GiftPopDialog extends AbsDialogPopupWindow implements ActionListene public void onClick(View view) { int id = view.getId(); if (id == R.id.btn_send) { - DialogUitl.showSimpleInputDialog(mContext, WordUtil.isNewZh() ?"輸入數量":"Input quantity", DialogUitl.INPUT_TYPE_NUMBER, new DialogUitl.SimpleCallback() { + DialogUitl.showSimpleInputDialog(mContext, WordUtil.isNewZh() ? "輸入數量" : "Input quantity", DialogUitl.INPUT_TYPE_NUMBER, new DialogUitl.SimpleCallback() { @Override public void onConfirmClick(Dialog dialog, String content) { try { prangNum = Integer.parseInt(content); if (prangNum <= 0) { - ToastUtil.show(WordUtil.isNewZh() ?"數量不能為0或負數":"The quantity cannot be zero or negative"); + ToastUtil.show(WordUtil.isNewZh() ? "數量不能為0或負數" : "The quantity cannot be zero or negative"); return; } if (prangNum > 999) { - ToastUtil.show(WordUtil.isNewZh() ?"數量不能大於999":"The number cannot be greater than 999"); + ToastUtil.show(WordUtil.isNewZh() ? "數量不能大於999" : "The number cannot be greater than 999"); return; } mBtnSend.setText(content); @@ -285,7 +285,7 @@ public class GiftPopDialog extends AbsDialogPopupWindow implements ActionListene dialog.dismiss(); } catch (Exception e) { e.printStackTrace(); - ToastUtil.show(WordUtil.isNewZh() ? "輸入錯誤":"Input error"); + ToastUtil.show(WordUtil.isNewZh() ? "輸入錯誤" : "Input error"); } } }); @@ -307,29 +307,29 @@ public class GiftPopDialog extends AbsDialogPopupWindow implements ActionListene }); } else if (id == R.id.gift_btn) { if (bean == null) { - ToastUtil.show(WordUtil.isNewZh() ? "整蠱禮物不能為空":"A trick gift can't be empty"); + ToastUtil.show(WordUtil.isNewZh() ? "整蠱禮物不能為空" : "A trick gift can't be empty"); return; } if (StringUtil.isEmpty(prangContext) || prangNum == 0) { - ToastUtil.show(WordUtil.isNewZh() ?"整蠱內容或數量不能為空":"The content or number of pranks cannot be empty"); + ToastUtil.show(WordUtil.isNewZh() ? "整蠱內容或數量不能為空" : "The content or number of pranks cannot be empty"); return; } if (prangNum >= 999) { - ToastUtil.show(WordUtil.isNewZh() ?"整蠱數量不能過大":"The number of pranks should not be too large"); + ToastUtil.show(WordUtil.isNewZh() ? "整蠱數量不能過大" : "The number of pranks should not be too large"); return; } if (WordUtil.isSpecialChar(prangContext)) { - ToastUtil.show(WordUtil.isNewZh() ?"整蠱內容不能包含特殊字符":"The prank content must not contain special characters"); + ToastUtil.show(WordUtil.isNewZh() ? "整蠱內容不能包含特殊字符" : "The prank content must not contain special characters"); return; } if (prangContext.length() > 6) { - ToastUtil.show(WordUtil.isNewZh() ?"整蠱內容過長":"The prank is too long"); + ToastUtil.show(WordUtil.isNewZh() ? "整蠱內容過長" : "The prank is too long"); return; } if (giftBeans != null) { for (PrankGiftBean giftBean : giftBeans) { if (giftBean.getGiftId().equals(bean.getId() + "")) { - ToastUtil.show(WordUtil.isNewZh() ?"整蠱禮物已存在":"Prank gifts already exist"); + ToastUtil.show(WordUtil.isNewZh() ? "整蠱禮物已存在" : "Prank gifts already exist"); return; } } diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveGiftPopup.java b/live/src/main/java/com/yunbao/live/dialog/LiveGiftPopup.java index b6c2c946e..2968d6c60 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveGiftPopup.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveGiftPopup.java @@ -702,7 +702,8 @@ public class LiveGiftPopup extends AbsDialogFragment { } isGetNewWrap = true; if (isWrap) { - Bus.get().post(new LiveParcelItemRefreshEvent().setLiveGiftModel(liveGiftModel)); + //刷新包裹中的礼物数量 + Bus.get().post(new LiveParcelItemRefreshEvent().setLiveGiftModel(liveGiftModel).setSendCount(Integer.parseInt(mCount))); } } } else { @@ -1380,9 +1381,10 @@ public class LiveGiftPopup extends AbsDialogFragment { // //刷新包裹列表wrap_gift_num -1:表示数量没有变化 // mObjGiftSendback = obj; isGetNewWrap = true; - + //是包裹里的礼物 if (isWrap) { - Bus.get().post(new LiveParcelItemRefreshEvent().setLiveGiftModel(liveGiftModel)); + //刷新包裹中礼物的数量 + Bus.get().post(new LiveParcelItemRefreshEvent().setLiveGiftModel(liveGiftModel).setSendCount(Integer.parseInt(mCount))); } } } else if (code == 1007 && mGiftBean.getType() != 0) { diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveNewFunctionDialogFragment.java b/live/src/main/java/com/yunbao/live/dialog/LiveNewFunctionDialogFragment.java index 27bcfbf2b..863c0e2c1 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveNewFunctionDialogFragment.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveNewFunctionDialogFragment.java @@ -58,7 +58,10 @@ public class LiveNewFunctionDialogFragment extends AbsDialogFragment implements private String liveUid; + private TextView red_menu; + // boolean isRy = false; + private boolean isShowRed; @Override protected int getLayoutId() { return R.layout.dialog_live_new_function; @@ -99,6 +102,7 @@ public class LiveNewFunctionDialogFragment extends AbsDialogFragment implements // isRy = bundle.getBoolean("isRy", false); mAnchorLiveTime = bundle.getLong("liveTime"); liveUid = bundle.getString("liveUid"); + isShowRed = bundle.getBoolean("isShowZgRed"); } mWishView = findViewById(R.id.live_tool_wish); mPrankView = findViewById(R.id.live_tool_prank); @@ -111,6 +115,7 @@ public class LiveNewFunctionDialogFragment extends AbsDialogFragment implements mMicView = findViewById(R.id.live_tool_mic); mRandomPk = findViewById(R.id.live_tool_random_pk); mLiveTimeTextView = (TextView) findViewById(R.id.live_time); + red_menu = (TextView) findViewById(R.id.red_menu); mWishView.setOnClickListener(this); mPrankView.setOnClickListener(this); mWksView.setOnClickListener(this); @@ -141,6 +146,7 @@ public class LiveNewFunctionDialogFragment extends AbsDialogFragment implements mLiveRoomHandler = new LiveRoomHandler(); mLiveTimeTextView.setText(StringUtil.getDurationText(mAnchorLiveTime)); startAnchorLiveTime(); + red_menu.setVisibility(isShowRed?View.VISIBLE:View.GONE); } public void setFunctionClickListener(LiveFunctionClickListener functionClickListener) { @@ -169,6 +175,7 @@ public class LiveNewFunctionDialogFragment extends AbsDialogFragment implements mFunctionClickListener.onClick(LIVE_FUNC_WISHLIST); } else if (id == R.id.live_tool_prank) { mFunctionClickListener.onClick(LIVE_FUNC_ZG); + red_menu.setVisibility(View.GONE); } else if (id == R.id.live_tool_wks) { mFunctionClickListener.onClick(LIVE_FUNC_WKS); } else if (id == R.id.live_tool_beauty) { diff --git a/live/src/main/java/com/yunbao/live/dialog/LivePrankAddGiftDialog.java b/live/src/main/java/com/yunbao/live/dialog/LivePrankAddGiftDialog.java new file mode 100644 index 000000000..547c1b0fc --- /dev/null +++ b/live/src/main/java/com/yunbao/live/dialog/LivePrankAddGiftDialog.java @@ -0,0 +1,161 @@ +package com.yunbao.live.dialog; + +import android.content.Context; +import android.widget.EditText; +import android.widget.ImageView; +import android.widget.LinearLayout; +import android.widget.TextView; + +import androidx.annotation.NonNull; + +import com.lxj.xpopup.XPopup; +import com.yunbao.common.bean.PrankGiftBean; +import com.yunbao.common.dialog.AbsDialogPopupWindow; +import com.yunbao.common.interfaces.OnItemClickListener; +import com.yunbao.common.utils.StringUtil; +import com.yunbao.common.utils.ToastUtil; +import com.yunbao.common.utils.WordUtil; +import com.yunbao.common.views.weight.ViewClicksAntiShake; +import com.yunbao.live.R; + +import java.util.ArrayList; +import java.util.List; + +public class LivePrankAddGiftDialog extends AbsDialogPopupWindow { + + private TextView prankBtn; + private ImageView backBtn; + private TextView giftText; + private TextView numberText; + private EditText contentText; + private LinearLayout giftNumberLayout; + private boolean isShowGiftNumber = true; + + private OnItemClickListener onItemClickListener; + + private List giftBeans = new ArrayList<>(); + + + public LivePrankAddGiftDialog(@NonNull Context context) { + super(context); + } + + @Override + public void buildDialog(XPopup.Builder builder) { + + } + + public LivePrankAddGiftDialog setGiftBeans(List giftBeans,boolean isShow) { + this.isShowGiftNumber = isShow; + this.giftBeans = giftBeans; + return this; + } + + @Override + public int bindLayoutId() { + return R.layout.dialog_live_prank_add_gift; + } + + @Override + protected void onCreate() { + super.onCreate(); + initView(); + } + + public void setOnItemClickListener(OnItemClickListener onItemClickListener) { + this.onItemClickListener = onItemClickListener; + } + + void initView() { + prankBtn = findViewById(R.id.prank_btn); + backBtn = findViewById(R.id.back); + giftText = findViewById(R.id.gift_text); + numberText = findViewById(R.id.number_text); + contentText = findViewById(R.id.content_text); + giftNumberLayout= findViewById(R.id.giftNumberLayout); + if(isShowGiftNumber){ + giftNumberLayout.setVisibility(VISIBLE); + } + + ViewClicksAntiShake.clicksAntiShake(backBtn, new ViewClicksAntiShake.ViewClicksCallBack() { + @Override + public void onViewClicks() { + dismiss(); + } + }); + ViewClicksAntiShake.clicksAntiShake(giftText, new ViewClicksAntiShake.ViewClicksCallBack() { + @Override + public void onViewClicks() { + GiftPopDialog dialog = new GiftPopDialog(mContext, new GiftPopDialog.ActionListener() { + + @Override + public void onSelectGift(PrankGiftBean bean) { + if (bean != null) { + giftText.setText(bean.getName()); + /*ImgLoader.displayDrawable(mContext, bean.getIcon(), DpUtil.dp2px(16), DpUtil.dp2px(16), new ImgLoader.DrawableCallback() { + @Override + public void onLoadSuccess(Drawable drawable) { + giftText.setCompoundDrawablesWithIntrinsicBounds(drawable, null, null, null); + } + + @Override + public void onLoadFailed() { + } + });*/ + giftText.setTag(bean); + } + } + + @Override + public void onDismiss() { + + } + }); + dialog.setShowNumber(false); + dialog.setList(giftBeans); + dialog.showDialog(); + } + }); + ViewClicksAntiShake.clicksAntiShake(numberText, new ViewClicksAntiShake.ViewClicksCallBack() { + @Override + public void onViewClicks() { + new LivePrankAddGiftNumberDialog(mContext) + .setOnItemClickListener(new OnItemClickListener() { + @Override + public void onItemClick(Integer bean, int position) { + numberText.setText(String.valueOf(bean)); + numberText.setTag(bean); + } + }) + .showDialog(); + } + }); + ViewClicksAntiShake.clicksAntiShake(prankBtn, new ViewClicksAntiShake.ViewClicksCallBack() { + @Override + public void onViewClicks() { + PrankGiftBean bean = (PrankGiftBean) giftText.getTag(); + String prankContent = contentText.getText().toString(); + if (bean == null) { + ToastUtil.show(WordUtil.isNewZh() ? "整蠱禮物不能為空" : "A trick gift can't be empty"); + return; + } + if(isShowGiftNumber){ + if (numberText.getTag()==null||StringUtil.isEmpty(prankContent)){ + ToastUtil.show(WordUtil.isNewZh() ? "整蠱內容或數量不能為空" : "The content or number of pranks cannot be empty"); + return; + } + bean.setNum(Integer.parseInt(numberText.getText().toString())); + }else{ + if (StringUtil.isEmpty(prankContent)){ + ToastUtil.show(WordUtil.isNewZh() ? "整蠱內容或數量不能為空" : "The content or number of pranks cannot be empty"); + return; + } + } + bean.setTitle(prankContent); + onItemClickListener.onItemClick(bean,0); + dismiss(); + + } + }); + } +} diff --git a/live/src/main/java/com/yunbao/live/dialog/LivePrankAddGiftNumberDialog.java b/live/src/main/java/com/yunbao/live/dialog/LivePrankAddGiftNumberDialog.java new file mode 100644 index 000000000..0ea661e09 --- /dev/null +++ b/live/src/main/java/com/yunbao/live/dialog/LivePrankAddGiftNumberDialog.java @@ -0,0 +1,137 @@ +package com.yunbao.live.dialog; + +import android.app.Dialog; +import android.content.Context; +import android.widget.Button; +import android.widget.EditText; +import android.widget.ImageView; +import android.widget.TextView; + +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.RecyclerView; + +import com.lxj.xpopup.XPopup; +import com.yunbao.common.bean.PrankGiftBean; +import com.yunbao.common.dialog.AbsDialogPopupWindow; +import com.yunbao.common.interfaces.OnItemClickListener; +import com.yunbao.common.utils.DialogUitl; +import com.yunbao.common.utils.WordUtil; +import com.yunbao.common.views.weight.ViewClicksAntiShake; +import com.yunbao.live.R; +import com.yunbao.live.adapter.ItemLivePrankGiftNumberAdapter; + +import java.util.ArrayList; +import java.util.List; + +public class LivePrankAddGiftNumberDialog extends AbsDialogPopupWindow { + + private TextView prankBtn; + private ImageView backBtn; + private Button mBtnNumber; + private RecyclerView numberRecycler; + private ItemLivePrankGiftNumberAdapter mAdapter; + + private OnItemClickListener onItemClickListener; + private int giftNumber = -1; + + private List giftBeans = new ArrayList<>(); + + + public LivePrankAddGiftNumberDialog(@NonNull Context context) { + super(context); + } + + public LivePrankAddGiftNumberDialog setOnItemClickListener(OnItemClickListener onItemClickListener) { + this.onItemClickListener = onItemClickListener; + return this; + } + + @Override + public void buildDialog(XPopup.Builder builder) { + + } + + + @Override + public int bindLayoutId() { + return R.layout.dialog_live_prank_add_gift_number; + } + + @Override + protected void onCreate() { + super.onCreate(); + initView(); + initData(); + } + + @Override + protected void onDismiss() { + super.onDismiss(); + } + + void initView() { + prankBtn = findViewById(R.id.prank_btn); + backBtn = findViewById(R.id.back); + numberRecycler = findViewById(R.id.numberList); + mBtnNumber = findViewById(R.id.btnNumber); + mAdapter = new ItemLivePrankGiftNumberAdapter(); + numberRecycler.setAdapter(mAdapter); + mAdapter.setOnSelectNumberListener(number -> { + if (number > 0) { + giftNumber = number; + mBtnNumber.setText(R.string.live_prank_gift_dialog_number_btn); + } + }); + ViewClicksAntiShake.clicksAntiShake(mBtnNumber, new ViewClicksAntiShake.ViewClicksCallBack() { + @Override + public void onViewClicks() { + DialogUitl.showSimpleInputDialog(mContext, WordUtil.isNewZh() ? "输入数量" : "Input number", DialogUitl.INPUT_TYPE_NUMBER, new DialogUitl.SimpleCallback() { + @Override + public void onConfirmClick(Dialog dialog, String content) { + try { + int number = Integer.parseInt(content); + if (number > 0 && number < 10000) { + mBtnNumber.setText(content); + giftNumber = number; + mAdapter.setSelectNumber(-1); + mAdapter.notifyDataSetChanged(); + dialog.dismiss(); + } + } catch (Exception e) { + e.printStackTrace(); + mBtnNumber.setText(R.string.live_prank_gift_dialog_number_btn); + dialog.dismiss(); + } + } + }); + } + }); + ViewClicksAntiShake.clicksAntiShake(prankBtn, new ViewClicksAntiShake.ViewClicksCallBack() { + @Override + public void onViewClicks() { + if (onItemClickListener != null) { + if (mAdapter.getSelectNumber() > 0) { + giftNumber = mAdapter.getSelectNumber(); + } + onItemClickListener.onItemClick(giftNumber, 0); + dismiss(); + } + } + }); + } + + List mList = new ArrayList<>(); + + void initData() { + mList.add(9999); + mList.add(3344); + mList.add(1314); + mList.add(520); + mList.add(88); + mList.add(68); + mList.add(10); + mList.add(8); + mList.add(1); + mAdapter.setList(mList); + } +} diff --git a/live/src/main/java/com/yunbao/live/dialog/LivePrankDialogFragment.java b/live/src/main/java/com/yunbao/live/dialog/LivePrankDialogFragment.java index 5c4d69ca7..76e2011f8 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LivePrankDialogFragment.java +++ b/live/src/main/java/com/yunbao/live/dialog/LivePrankDialogFragment.java @@ -1,20 +1,30 @@ package com.yunbao.live.dialog; +import static com.yunbao.live.adapter.LivePrankRecyclerAdapter.TYPE_TURNTABLE; + +import android.annotation.SuppressLint; import android.app.Dialog; +import android.graphics.Color; import android.os.Bundle; import android.view.Gravity; import android.view.View; import android.view.Window; import android.view.WindowManager; +import android.widget.Button; import android.widget.ImageView; import android.widget.TextView; +import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; +import com.alibaba.fastjson.JSONArray; import com.google.android.material.tabs.TabLayout; +import com.google.gson.Gson; +import com.google.gson.JsonObject; import com.yunbao.common.bean.PrankGiftBean; +import com.yunbao.common.bean.PrankGiftResultBean; import com.yunbao.common.bean.PrankHttpTurntableBean; import com.yunbao.common.bean.PrankTurntableBean; import com.yunbao.common.dialog.AbsDialogFragment; @@ -24,11 +34,18 @@ import com.yunbao.common.interfaces.OnItemClickListener; import com.yunbao.common.manager.IMLoginManager; import com.yunbao.common.utils.DialogUitl; import com.yunbao.common.utils.DpUtil; +import com.yunbao.common.utils.L; import com.yunbao.common.utils.StringUtil; import com.yunbao.common.utils.ToastUtil; +import com.yunbao.common.utils.ViewUtils; import com.yunbao.common.utils.WordUtil; +import com.yunbao.common.views.weight.ViewClicksAntiShake; import com.yunbao.live.R; import com.yunbao.live.adapter.LivePrankRecyclerAdapter; +import com.yunbao.live.socket.SocketRyChatUtil; + +import org.json.JSONException; +import org.json.JSONObject; import java.util.ArrayList; import java.util.List; @@ -36,7 +53,7 @@ import java.util.Locale; public class LivePrankDialogFragment extends AbsDialogFragment implements View.OnClickListener { private TabLayout mTabLayout; - private View mTurntableConfigLayout; + private View mTurntableConfigLayout, mGiftConfigLayout; private TextView mPrankBtn; private ImageView mTurntableConfigImageView; private TextView mCoinTextView; @@ -45,7 +62,22 @@ public class LivePrankDialogFragment extends AbsDialogFragment implements View.O private LivePrankRecyclerAdapter recyclerAdapter; private String mLiveUid; private PrankHttpTurntableBean bean = new PrankHttpTurntableBean(); - private List giftBeans; + private List giftBeans = new ArrayList<>(); + + private TextView giftSwitch1TitleText; + private TextView giftSwitch1DescText; + private ImageView giftSwitch1Btn; + private TextView giftTypeNowText; + private TextView giftTypeTodoText; + private TextView giftTypeNowSwitchText; + private Button mBtnAddGift; + private ImageView help; + + private onPrankResultListener onPrankResultListener; + + public void setOnPrankResultListener(LivePrankDialogFragment.onPrankResultListener onPrankResultListener) { + this.onPrankResultListener = onPrankResultListener; + } public void setmLiveUid(String mLiveUid) { this.mLiveUid = mLiveUid; @@ -82,11 +114,14 @@ public class LivePrankDialogFragment extends AbsDialogFragment implements View.O initView(); initTab(); initTurntableData(); + initGiftConfigLayoutView(); } private void initView() { + help = (ImageView) findViewById(R.id.help); mTabLayout = (TabLayout) findViewById(R.id.prank_tabLayout); mTurntableConfigLayout = findViewById(R.id.turntable_layout); + mGiftConfigLayout = findViewById(R.id.gift_layout); mTurntableConfigImageView = (ImageView) findViewById(R.id.switch1_btn); mCoinTextView = (TextView) findViewById(R.id.switch2_btn); mPrankRecyclerView = (RecyclerView) findViewById(R.id.prank_config); @@ -97,14 +132,19 @@ public class LivePrankDialogFragment extends AbsDialogFragment implements View.O mPrankRecyclerView.setAdapter(recyclerAdapter); mCoinTextView.setOnClickListener(this); mTurntableConfigImageView.setOnClickListener(this); + help.setOnClickListener(this); if (IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) { - mPrankBtn.setText("保存設置"); + mPrankBtn.setText("發送圖標"); } else { - mPrankBtn.setText("Save Settings"); + mPrankBtn.setText("send icon"); } recyclerAdapter.setOnItemClickListener(new OnItemClickListener() { @Override public void onItemClick(String bean, int position) { + if (position == -2) { + showGiftDialog(); + return; + } if (recyclerAdapter.getViewTypeOfList()) { switch (position) { case 1: @@ -127,21 +167,20 @@ public class LivePrankDialogFragment extends AbsDialogFragment implements View.O break; } } else { - LiveNetManager.get(mContext).deletePrankGift(mLiveUid, position + "", new HttpCallback() { - @Override - public void onSuccess(PrankHttpTurntableBean data) { - initGiftData(); - } - - @Override - public void onError(String error) { - initGiftData(); - } - }); + giftBeans.remove(position); + recyclerAdapter.setList(giftBeans); + recyclerAdapter.notifyDataSetChanged(); + if (giftBeans.size() < 6) { + mBtnAddGift.setVisibility(View.VISIBLE); + mGiftNotDate.setVisibility(View.VISIBLE); + } else { + mBtnAddGift.setVisibility(View.GONE); + mGiftNotDate.setVisibility(View.GONE); + } } } }); - mPrankBtn.setOnClickListener(view -> { +/* mPrankBtn.setOnClickListener(view -> { if ((int) view.getTag() == 1) { if (giftBeans != null && giftBeans.size() >= 20) { @@ -173,6 +212,46 @@ public class LivePrankDialogFragment extends AbsDialogFragment implements View.O } else { setPrankConfig(); } + });*/ + + ViewClicksAntiShake.clicksAntiShake(mPrankBtn, new ViewClicksAntiShake.ViewClicksCallBack() { + @Override + public void onViewClicks() { + if (mPrankBtn.getTag() != null && Integer.parseInt(mPrankBtn.getTag().toString()) == 0) { + SocketRyChatUtil.sendPrankIcon(); + } else { + showGiftDialog(); + } + } + }); + ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.btn_save), new ViewClicksAntiShake.ViewClicksCallBack() { + @Override + public void onViewClicks() { + if ((int) mPrankBtn.getTag() == 0) { + setPrankConfig(false); + } else { + setGiftBean(recyclerAdapter.getList(),"0"); + } + } + }); + ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.btn_clear), new ViewClicksAntiShake.ViewClicksCallBack() { + @Override + public void onViewClicks() { + if ((int) mPrankBtn.getTag() == 0) { + clearPrankConfig(); + setPrankConfig(true); + } else { + giftSwitch1Btn.setTag("false"); + giftSwitch1Btn.setImageResource(R.mipmap.special_icon_off); + giftBeans = new ArrayList<>(); + recyclerAdapter.setList(giftBeans); + recyclerAdapter.notifyDataSetChanged(); + mBtnAddGift.setVisibility(View.VISIBLE); + mGiftNotDate.setVisibility(View.VISIBLE); + setGiftBean(recyclerAdapter.getList(),"1"); + } + ToastUtil.show(WordUtil.isNewZh()?"清空成功!":"Cleared successfully!"); + } }); mPrankBtn.setTag(0); } @@ -183,15 +262,15 @@ public class LivePrankDialogFragment extends AbsDialogFragment implements View.O if (IMLoginManager.get(getContext()).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) { turntable.setText("轉盤整蠱"); gift.setText("禮物整蠱"); - }else { - turntable.setText("Turntable prank"); - gift.setText("Gift prank"); + } else { + turntable.setText("Turntable"); + gift.setText("Gift"); } - turntable.setTag(0); gift.setTag(1); mTabLayout.addTab(turntable); mTabLayout.addTab(gift); + mPrankBtn.setTag(0); mTabLayout.addOnTabSelectedListener(new TabLayout.OnTabSelectedListener() { @Override public void onTabSelected(TabLayout.Tab tab) { @@ -200,32 +279,39 @@ public class LivePrankDialogFragment extends AbsDialogFragment implements View.O } if ((int) tab.getTag() == 0) { mTurntableConfigLayout.setVisibility(View.VISIBLE); + mGiftConfigLayout.setVisibility(View.GONE); mPrankRecyclerView.setVisibility(View.VISIBLE); + mBtnAddGift.setVisibility(View.GONE); mGiftNotDate.setVisibility(View.GONE); - recyclerAdapter.setViewType(LivePrankRecyclerAdapter.TYPE_TURNTABLE); + recyclerAdapter.setViewType(TYPE_TURNTABLE); mPrankBtn.setBackgroundResource(R.drawable.bg_live_prank_turntable_save); if (IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) { - mPrankBtn.setText("保存設置"); + mPrankBtn.setText("發送圖標"); } else { - mPrankBtn.setText("Save Settings"); + mPrankBtn.setText("send icon"); } mPrankBtn.setTag(0); recyclerAdapter.clearList(); initTurntableData(); + mPrankBtn.setVisibility(View.VISIBLE); } else { mTurntableConfigLayout.setVisibility(View.GONE); - mPrankBtn.setBackgroundResource(R.drawable.bg_live_prank_gift_set); + mGiftConfigLayout.setVisibility(View.VISIBLE); + mBtnAddGift.setVisibility(View.VISIBLE); + mGiftNotDate.setVisibility(View.VISIBLE); + recyclerAdapter.setViewType(LivePrankRecyclerAdapter.TYPE_GIFT); + mPrankBtn.setBackgroundResource(R.drawable.bg_live_prank_turntable_save); - if (IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) { + /*if (IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) { mPrankBtn.setText("添加禮物"); } else { mPrankBtn.setText("Add gift"); - } + }*/ mPrankBtn.setTag(1); recyclerAdapter.clearList(); - mGiftNotDate.setVisibility(View.VISIBLE); initGiftData(); + mPrankBtn.setVisibility(View.GONE); } } @@ -241,6 +327,73 @@ public class LivePrankDialogFragment extends AbsDialogFragment implements View.O }); } + private void showGiftDialog() { + LivePrankAddGiftDialog livePrankAddGiftDialog = new LivePrankAddGiftDialog(mContext).setGiftBeans(giftBeans, giftTypeNowText.getTag().equals("1")); + livePrankAddGiftDialog.setOnItemClickListener(new OnItemClickListener() { + @SuppressLint("NotifyDataSetChanged") + @Override + public void onItemClick(PrankGiftBean bean, int position) { + giftBeans.add(bean); + recyclerAdapter.setList(giftBeans); + recyclerAdapter.notifyDataSetChanged(); + if (giftBeans.size() < 6) { + mBtnAddGift.setVisibility(View.VISIBLE); + mGiftNotDate.setVisibility(View.VISIBLE); + } else { + mBtnAddGift.setVisibility(View.GONE); + mGiftNotDate.setVisibility(View.GONE); + } + } + }); + livePrankAddGiftDialog.showDialog(); + } + + private void initGiftConfigLayoutView() { + giftSwitch1TitleText = (TextView) findViewById(R.id.gift_switch1_title_text); + giftSwitch1DescText = (TextView) findViewById(R.id.gift_switch1_desc_text); + giftSwitch1Btn = (ImageView) findViewById(R.id.gift_switch1_btn); + giftTypeNowText = (TextView) findViewById(R.id.gift_type_now_text); + giftTypeTodoText = (TextView) findViewById(R.id.gift_type_todo); + giftTypeNowSwitchText = (TextView) findViewById(R.id.gift_type_now_switch); + giftTypeNowText.setTag("2"); + mBtnAddGift = (Button) findViewById(R.id.gift_add_btn); + mBtnAddGift.setVisibility(View.GONE); + mGiftNotDate.setVisibility(View.GONE); + + ViewClicksAntiShake.clicksAntiShake(giftSwitch1Btn, new ViewClicksAntiShake.ViewClicksCallBack() { + @Override + public void onViewClicks() { + if (giftSwitch1Btn.getTag().equals("true")) { + giftSwitch1Btn.setTag("false"); + giftSwitch1Btn.setImageResource(R.mipmap.special_icon_off); + } else { + giftSwitch1Btn.setTag("true"); + giftSwitch1Btn.setImageResource(R.mipmap.special_icon_on); + } + } + }); + ViewClicksAntiShake.clicksAntiShake(giftTypeNowSwitchText, new ViewClicksAntiShake.ViewClicksCallBack() { + @Override + public void onViewClicks() { + CharSequence tmp = giftTypeNowText.getText(); + giftTypeNowText.setText(giftTypeNowSwitchText.getText()); + giftTypeNowSwitchText.setText(tmp); + if (giftTypeNowText.getTag().equals("1")) { + giftTypeNowText.setTag("2"); + } else { + giftTypeNowText.setTag("1"); + } + initGiftData(); + } + }); + ViewClicksAntiShake.clicksAntiShake(mBtnAddGift, new ViewClicksAntiShake.ViewClicksCallBack() { + @Override + public void onViewClicks() { + showGiftDialog(); + } + }); + } + private void initTurntableData() { LiveNetManager.get(mContext).getAnchorPrankTurntable(mLiveUid, new HttpCallback() { @Override @@ -256,11 +409,23 @@ public class LivePrankDialogFragment extends AbsDialogFragment implements View.O }); } - private void setGiftBean(PrankGiftBean bean) { - LiveNetManager.get(mContext).setPrankGift(mLiveUid, bean.getGiftId(), bean.getNum() + "", bean.getTitle(), new HttpCallback() { + private void setGiftBean(List prankGiftBeans,String is_cleared) { + JSONArray prankJson = getJsonObjects(prankGiftBeans); + LiveNetManager.get(mContext).setPrankGift(mLiveUid, giftSwitch1Btn.getTag().equals("true") ? "1" : "0", new Gson().toJson(prankJson), giftTypeNowText.getTag().toString(),is_cleared, new HttpCallback() { @Override public void onSuccess(PrankHttpTurntableBean data) { initGiftData(); + if(!is_cleared.equals("1")){ + if (WordUtil.isNewZh()) { + ToastUtil.show("保存成功!"); + } else { + ToastUtil.show("successful"); + } + } + //通知主播刷新整蛊信息、 + if(onPrankResultListener!=null){ + onPrankResultListener.OpenAndCloseListener(); + } } @Override @@ -270,26 +435,58 @@ public class LivePrankDialogFragment extends AbsDialogFragment implements View.O }); } + @NonNull + private static JSONArray getJsonObjects(List prankGiftBeans) { + JSONArray prankJson = new JSONArray(); + for (int i = 0; i < prankGiftBeans.size(); i++) { + JsonObject temp = new JsonObject(); + temp.addProperty("gift_id", prankGiftBeans.get(i).getGiftId()); + temp.addProperty("gift_num", prankGiftBeans.get(i).getNum()); + temp.addProperty("prank_content", prankGiftBeans.get(i).getTitle()); + prankJson.add(temp); + } + return prankJson; + } + private void initGiftData() { - LiveNetManager.get(mContext).getPrankGiftList(mLiveUid, new HttpCallback>() { + LiveNetManager.get(mContext).getPrankGiftList(mLiveUid, giftTypeNowText.getTag().toString(), new HttpCallback() { @Override - public void onSuccess(List data) { - if (!data.isEmpty()) { - mGiftNotDate.setVisibility(View.GONE); - mPrankRecyclerView.setVisibility(View.VISIBLE); - recyclerAdapter.setViewType(LivePrankRecyclerAdapter.TYPE_GIFT); - giftBeans = data; - recyclerAdapter.setList(data); - recyclerAdapter.notifyDataSetChanged(); + public void onSuccess(PrankGiftResultBean data) { + if (mPrankBtn.getTag().toString().equals("1")) { + if (data.getPrank_list() != null) { + if (data.getPrank_list().size() < 6) { + mBtnAddGift.setVisibility(View.VISIBLE); + mGiftNotDate.setVisibility(View.VISIBLE); + } else { + mBtnAddGift.setVisibility(View.GONE); + mGiftNotDate.setVisibility(View.GONE); + } + mPrankRecyclerView.setVisibility(View.VISIBLE); + recyclerAdapter.setViewType(LivePrankRecyclerAdapter.TYPE_GIFT); + giftBeans = data.getPrank_list(); + recyclerAdapter.setList(giftBeans); + recyclerAdapter.notifyDataSetChanged(); + if (data.getStatus().equals("1")) { + giftSwitch1Btn.setTag("true"); + giftSwitch1Btn.setImageResource(R.mipmap.special_icon_on); + } else { + giftSwitch1Btn.setTag("false"); + giftSwitch1Btn.setImageResource(R.mipmap.special_icon_off); + } + } + } + + /*if (!data.isEmpty()) { + } else { mPrankRecyclerView.setVisibility(View.GONE); mGiftNotDate.setVisibility(View.VISIBLE); - } + }*/ } @Override public void onError(String error) { - ToastUtil.show(WordUtil.isNewZh()?"抱歉!出錯了!":"i \\'m sorry! An error occurred"); + ToastUtil.show(WordUtil.isNewZh() ? "抱歉!出錯了!" : "i \\'m sorry! An error occurred"); } }); } @@ -303,6 +500,7 @@ public class LivePrankDialogFragment extends AbsDialogFragment implements View.O list.add(buildBean(4, bean.getTurntable4())); list.add(buildBean(5, bean.getTurntable5())); list.add(buildBean(6, bean.getTurntable6())); + recyclerAdapter.setViewType(TYPE_TURNTABLE); recyclerAdapter.setList(list); recyclerAdapter.notifyDataSetChanged(); if (bean.getStatus() == 1) { @@ -324,47 +522,53 @@ public class LivePrankDialogFragment extends AbsDialogFragment implements View.O return bean; } - private void setPrankConfig() { - if (StringUtil.isEmpty(bean.getTurntable1(), bean.getTurntable2(), bean.getTurntable3(), bean.getTurntable4(), bean.getTurntable5(), bean.getTurntable6())) { + private void clearPrankConfig() { + bean = new PrankHttpTurntableBean(); + setCoin(1000); + setDate(bean); + } - if (IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) { - ToastUtil.show("保存失败:所有转盘位置必填"); - } else { - ToastUtil.show("Save failed: all turntable positions must be filled in"); + private void setPrankConfig(boolean isClear) { + if(!isClear){ + if (StringUtil.isEmpty(bean.getTurntable1(), bean.getTurntable2(), bean.getTurntable3(), bean.getTurntable4(), bean.getTurntable5(), bean.getTurntable6())) { + + if (IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) { + ToastUtil.show("保存失败:所有转盘位置必填"); + } else { + ToastUtil.show("Save failed: all turntable positions must be filled in"); + } + return; } - return; } - LiveNetManager.get(mContext).setAnchorPrankTurntable( - mLiveUid, - bean.getCoin() + "", - bean.getTurntable1(), - bean.getTurntable2(), - bean.getTurntable3(), - bean.getTurntable4(), - bean.getTurntable5(), - bean.getTurntable6(), - bean.getStatus() + "", - new HttpCallback() { - @Override - public void onSuccess(Object data) { - - if (IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) { - ToastUtil.show("保存成功"); - } else { - ToastUtil.show("Save success"); - } - } - - @Override - public void onError(String error) { - if (IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) { - ToastUtil.show("保存失败:" + error); - } else { - ToastUtil.show("Save failed" + error); - } + if(isClear){ + bean.setTurntable1(""); + bean.setTurntable2(""); + bean.setTurntable3(""); + bean.setTurntable4(""); + bean.setTurntable5(""); + bean.setTurntable6(""); + } + LiveNetManager.get(mContext).setAnchorPrankTurntable(mLiveUid, bean.getCoin() + "", bean.getTurntable1(), bean.getTurntable2(), bean.getTurntable3(), bean.getTurntable4(), bean.getTurntable5(), bean.getTurntable6(), bean.getStatus() + "", new HttpCallback() { + @Override + public void onSuccess(Object data) { + if(!isClear){ + if (IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) { + ToastUtil.show("保存成功"); + } else { + ToastUtil.show("Save success"); } } - ); + } + + @Override + public void onError(String error) { + if (IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) { + ToastUtil.show("保存失败:" + error); + } else { + ToastUtil.show("Save failed" + error); + } + } + }); } @Override @@ -415,7 +619,13 @@ public class LivePrankDialogFragment extends AbsDialogFragment implements View.O } }); } - + } else if (id == R.id.help) { + LivePrankExplainDialog livePrankExplainDialog = new LivePrankExplainDialog(mContext); + livePrankExplainDialog.showDialog(); } } + + public interface onPrankResultListener{ + void OpenAndCloseListener(); + } } diff --git a/live/src/main/java/com/yunbao/live/dialog/LivePrankExplainDialog.java b/live/src/main/java/com/yunbao/live/dialog/LivePrankExplainDialog.java new file mode 100644 index 000000000..1d9001578 --- /dev/null +++ b/live/src/main/java/com/yunbao/live/dialog/LivePrankExplainDialog.java @@ -0,0 +1,110 @@ +package com.yunbao.live.dialog; + +import android.content.Context; +import android.text.Html; +import android.view.View; +import android.widget.TextView; + +import androidx.annotation.NonNull; + +import com.lxj.xpopup.XPopup; +import com.yunbao.common.dialog.AbsDialogPopupWindow; +import com.yunbao.common.utils.WordUtil; +import com.yunbao.live.R; + +public class LivePrankExplainDialog extends AbsDialogPopupWindow { + TextView content; + public LivePrankExplainDialog(@NonNull Context context) { + super(context); + } + + @Override + public void buildDialog(XPopup.Builder builder) { + + } + + @Override + public int bindLayoutId() { + return R.layout.dialog_live_prank_explain; + } + + @Override + protected void onCreate() { + super.onCreate(); + initView(); + } + + @Override + protected void onDismiss() { + super.onDismiss(); + } + + void initView() { + content = findViewById(R.id.content); + findViewById(R.id.back).setOnClickListener(new OnClickListener() { + @Override + public void onClick(View view) { + dialog.dismiss(); + } + }); + StringBuffer stringBuffer = new StringBuffer(); + if(WordUtil.isNewZh()){ + stringBuffer.append(getHtmlContent(true,"1、當前整蠱分類有哪些?","\"#FFFFFF\"",false)); + stringBuffer.append(getHtmlContent(false,"當前分爲轉盤整蠱和禮物整蠱。可根據實際情況決定,例如都設置或只設置一種。","\"#FFFFFF\"",true)); + + stringBuffer.append(getHtmlContent(true,"2、轉盤整蠱如何填寫?","\"#F9B003\"",false)); + stringBuffer.append(getHtmlContent(false,"打開開關→設置價格→填寫6個整蠱→保存設置。","\"#F9B003\"",true)); + stringBuffer.append(getHtmlContent(false,"注意:若有人發起整蠱,將提示你完成該整蠱,期間若有人花費鑽石拯救你,則不用完成整蠱。","\"#FFFFFF\"",true)); + + stringBuffer.append(getHtmlContent(true,"3、禮物整蠱如何填寫?","\"#FFFFFF\"",false)); + stringBuffer.append(getHtmlContent(false,"當前分爲禮物數達成整蠱和連擊數最高整蠱。","\"#FFFFFF\"",true)); + stringBuffer.append(getHtmlContent(false,"禮物數達成整蠱:打開開關→選擇禮物→填寫數量→填寫整蠱→保存設置。","\"#F9B003\"",true)); + stringBuffer.append(getHtmlContent(false,"連擊數最高整蠱:打開開關→切換→選擇禮物→填寫整蠱→保存設置。","\"#F9B003\"",true)); + + stringBuffer.append(getHtmlContent(true,"4、整蠱如何填寫?","\"#FFFFFF\"",false)); + stringBuffer.append(getHtmlContent(false,"根據你的實際情況決定。例如:唱歌、跳舞、情書、下蹲、吃辣或其他任意才藝。","\"#FFFFFF\"",true)); + + stringBuffer.append(getHtmlContent(true,"5、我怎麽知道該做哪些整蠱?","\"#FFFFFF\"",false)); + stringBuffer.append(getHtmlContent(false,"系統將發送消息至彈幕;","\"#FFFFFF\"",false)); + stringBuffer.append(getHtmlContent(false,"你需要做的整蠱會自動挂起。","\"#FFFFFF\"",false)); + }else{ + stringBuffer.append(getHtmlContent(true,"1. What are the current categories of pranks?","\"#FFFFFF\"",false)); + stringBuffer.append(getHtmlContent(false,"Currently it is divided into turntable tricking and gift tricking. It can be decided according to the actual situation, for example, setting both or only one type.","\"#FFFFFF\"",true)); + + stringBuffer.append(getHtmlContent(true,"2. How to fill in the turntable trick?","\"#F9B003\"",false)); + stringBuffer.append(getHtmlContent(false,"Turn on the switch → set the price → fill in 6 tricks → save the settings.","\"#F9B003\"",true)); + stringBuffer.append(getHtmlContent(false,"Note: If someone initiates a trick, you will be prompted to complete the trick. If someone spends diamonds to save you during this period, you do not need to complete the trick.","\"#FFFFFF\"",true)); + + stringBuffer.append(getHtmlContent(true,"3. How to fill in the gift form?","\"#FFFFFF\"",false)); + stringBuffer.append(getHtmlContent(false,"Currently, it is divided into the number of gifts to reach Tricky and the number of combos to reach Tricky.","\"#FFFFFF\"",true)); + stringBuffer.append(getHtmlContent(false,"The number of gifts reaches Trick: turn on the switch → select the gift → fill in the quantity → fill in the trick → save the settings.","\"#F9B003\"",true)); + stringBuffer.append(getHtmlContent(false,"The trick with the highest number of combos: turn on the switch → switch → select the gift → fill in the trick → save the settings.","\"#F9B003\"",true)); + + stringBuffer.append(getHtmlContent(true,"4. How to fill in Tricky?","\"#FFFFFF\"",false)); + stringBuffer.append(getHtmlContent(false,"Decide based on your actual situation. For example: singing, dancing, love letters, squatting, eating spicy food or any other talent.","\"#FFFFFF\"",true)); + + stringBuffer.append(getHtmlContent(true,"5. How do I know which tricks to do?","\"#FFFFFF\"",false)); + stringBuffer.append(getHtmlContent(false,"The system will send a message to the barrage;","\"#FFFFFF\"",false)); + stringBuffer.append(getHtmlContent(false,"The tricks you need to do will automatically hang.","\"#FFFFFF\"",false)); + } + + content.setText(Html.fromHtml(stringBuffer.toString())); + } + public String getHtmlContent(boolean isTitle, String content, String color, boolean linebreak) { + StringBuffer result = new StringBuffer(); + if (isTitle) { + result.append("
"); + result.append(content); + result.append("
"); + } else { + result.append("
"); + result.append(content); + result.append("
"); + } + if (linebreak) { + result.append("

"); + } + return result.toString(); + } + +} diff --git a/live/src/main/java/com/yunbao/live/event/LiveParcelItemRefreshEvent.java b/live/src/main/java/com/yunbao/live/event/LiveParcelItemRefreshEvent.java index db6797e23..552397276 100644 --- a/live/src/main/java/com/yunbao/live/event/LiveParcelItemRefreshEvent.java +++ b/live/src/main/java/com/yunbao/live/event/LiveParcelItemRefreshEvent.java @@ -6,6 +6,17 @@ import com.yunbao.common.bean.LiveGiftBean; public class LiveParcelItemRefreshEvent extends BaseModel { private LiveGiftBean liveGiftModel; + private int sendCount; + + public int getSendCount() { + return sendCount; + } + + public LiveParcelItemRefreshEvent setSendCount(int sendCount) { + this.sendCount = sendCount; + return this; + } + public LiveGiftBean getLiveGiftModel() { return liveGiftModel; } diff --git a/live/src/main/java/com/yunbao/live/presenter/AbsLinkMicPkPresenter.java b/live/src/main/java/com/yunbao/live/presenter/AbsLinkMicPkPresenter.java index 8b1602252..c99610974 100644 --- a/live/src/main/java/com/yunbao/live/presenter/AbsLinkMicPkPresenter.java +++ b/live/src/main/java/com/yunbao/live/presenter/AbsLinkMicPkPresenter.java @@ -11,6 +11,7 @@ import com.yunbao.common.http.LiveHttpUtil; import com.yunbao.common.interfaces.OnItemClickListener; import com.yunbao.common.manager.IMLoginManager; import com.yunbao.common.utils.AppManager; +import com.yunbao.live.views.LiveRoomViewHolder; public abstract class AbsLinkMicPkPresenter { private boolean isSw = false; @@ -29,6 +30,7 @@ public abstract class AbsLinkMicPkPresenter { protected String mApplyNmae;//正在申请Pk的主播的名字 protected boolean mIsApplyDialogShow;//是否显示了申请PK的弹窗 + public LiveRoomViewHolder mLiveRoomViewHolder; /** * 主播与主播PK 主播收到其他主播发过来的多人PK申请的回调 @@ -38,6 +40,10 @@ public abstract class AbsLinkMicPkPresenter { showDRApplyDialogTmp(u); } + public void setmLiveRoomViewHolder(LiveRoomViewHolder mLiveRoomViewHolder) { + this.mLiveRoomViewHolder = mLiveRoomViewHolder; + } + /** * 主播与主播PK 主播收到其他主播发过来的PK申请的回调 */ diff --git a/live/src/main/java/com/yunbao/live/presenter/LiveRyLinkMicPkPresenter.java b/live/src/main/java/com/yunbao/live/presenter/LiveRyLinkMicPkPresenter.java index 191620881..7a70b0f8c 100644 --- a/live/src/main/java/com/yunbao/live/presenter/LiveRyLinkMicPkPresenter.java +++ b/live/src/main/java/com/yunbao/live/presenter/LiveRyLinkMicPkPresenter.java @@ -72,6 +72,7 @@ import com.yunbao.live.socket.SocketRyLinkMicPkUtil; import com.yunbao.live.socket.SocketSendBean; import com.yunbao.live.views.LiveLinkMicPkViewHolder; import com.yunbao.live.views.LivePushRyViewHolder; +import com.yunbao.live.views.LiveRoomViewHolder; import org.greenrobot.eventbus.EventBus; @@ -247,6 +248,10 @@ public class LiveRyLinkMicPkPresenter extends AbsLinkMicPkPresenter implements V } + + + + public LiveRyLinkMicPkPresenter(Context context, LivePushRyViewHolder linkMicViewHolder, boolean isAnchor, View root) { super(false); mContext = context; @@ -1043,6 +1048,10 @@ public class LiveRyLinkMicPkPresenter extends AbsLinkMicPkPresenter implements V } } } + //收起整蛊列表 + if(mLiveRoomViewHolder!=null){ + mLiveRoomViewHolder.closePrankView(); + } } }); } @@ -1826,6 +1835,10 @@ public class LiveRyLinkMicPkPresenter extends AbsLinkMicPkPresenter implements V } }); + //收起整蛊列表 + if(mLiveRoomViewHolder!=null){ + mLiveRoomViewHolder.closePrankView(); + } } }); diff --git a/live/src/main/java/com/yunbao/live/presenter/LiveSwLinkMicPkPresenter.java b/live/src/main/java/com/yunbao/live/presenter/LiveSwLinkMicPkPresenter.java index 26132c1ab..db9add4f7 100644 --- a/live/src/main/java/com/yunbao/live/presenter/LiveSwLinkMicPkPresenter.java +++ b/live/src/main/java/com/yunbao/live/presenter/LiveSwLinkMicPkPresenter.java @@ -607,6 +607,10 @@ public class LiveSwLinkMicPkPresenter extends AbsLinkMicPkPresenter implements V dRjoinOtherRoom(u); //展示结束连麦按钮 mLiveAnchorViewHolder.showEndPkBt(); + //收起整蛊列表 + if(mLiveRoomViewHolder!=null){ + mLiveRoomViewHolder.closePrankView(); + } } @@ -831,9 +835,15 @@ public class LiveSwLinkMicPkPresenter extends AbsLinkMicPkPresenter implements V //设置多人PK 房主ROOM UID mLiveAnchorViewHolder.setDrpkRoomId(mApplyUid); mLiveAnchorViewHolder.showEndPkBt(); + + //收起整蛊列表 + if(mLiveRoomViewHolder!=null){ + mLiveRoomViewHolder.closePrankView(); + } } } }); + } }); } diff --git a/live/src/main/java/com/yunbao/live/socket/SocketMessageListener.java b/live/src/main/java/com/yunbao/live/socket/SocketMessageListener.java index 98e54cd41..a5442f55f 100644 --- a/live/src/main/java/com/yunbao/live/socket/SocketMessageListener.java +++ b/live/src/main/java/com/yunbao/live/socket/SocketMessageListener.java @@ -346,4 +346,9 @@ public interface SocketMessageListener { * */ void onHourRank(LiveChatBean bean,JSONObject ranks); + + /** + * 整蛊列表数据更新 + */ + void onUpdatePrankProgress(String prankString); } diff --git a/live/src/main/java/com/yunbao/live/socket/SocketRyChatUtil.java b/live/src/main/java/com/yunbao/live/socket/SocketRyChatUtil.java index 0d17466e2..e081551a4 100644 --- a/live/src/main/java/com/yunbao/live/socket/SocketRyChatUtil.java +++ b/live/src/main/java/com/yunbao/live/socket/SocketRyChatUtil.java @@ -14,6 +14,7 @@ import com.yunbao.common.http.LiveHttpUtil; import com.yunbao.common.http.live.LiveNetManager; import com.yunbao.common.manager.IMLoginManager; import com.yunbao.common.manager.imrongcloud.RongcloudIMManager; +import com.yunbao.common.utils.AppManager; import com.yunbao.common.utils.ToastUtil; import com.yunbao.common.utils.WordUtil; import com.yunbao.live.R; @@ -796,5 +797,64 @@ public class SocketRyChatUtil { } }); } + public static void sendPrankIcon() { + IMLoginModel userInfo = IMLoginManager.get(AppManager.getInstance().getMainActivity()).getUserInfo(); + + final SocketSendBean msg = new SocketSendBean() + .param("_method_", Constants.SOCKET_SEND_MSG) + .param("action", 0) + .param("msgtype", 2) + .param("uid", String.valueOf(userInfo.getId())) + .param("uname", userInfo.getUserNicename()) + .param("ugood", String.valueOf(userInfo.getId())) + .param("uname", userInfo.getLevel()) + .param("tougood", "") + .param("touid", "") + .param("touname", "") + .param("liangname", "") + .param("vip_type", userInfo.getVip().getType()) + .param("usertype", Constants.SOCKET_USER_TYPE_ANCHOR) + .param("prankIcon", "https://downs.yaoulive.com/Tricky/prankIcon.png") + .param("ct", "主播发送了转盘整蛊提示,更新到最新版APP后即可查看。" + ); + msg.create(); + String targetId = "g" + userInfo.getId(); + Conversation.ConversationType conversationType = Conversation.ConversationType.CHATROOM; + TextMessage messageContent = TextMessage.obtain(msg.mResult.toString()); + Message message = Message.obtain(targetId, conversationType, messageContent); + + RongcloudIMManager.sendMessage(message, null, null, new IRongCallback.ISendMessageCallback() { + @Override + public void onAttached(Message message) { + + } + + @Override + public void onSuccess(Message message) { + Log.i("tx", "发送成功"); + if (SocketRyClient.mSocketHandler != null) { + SocketRyClient.mSocketHandler.processBroadcast(msg.mResult.toString() + ""); + } + LiveNetManager.get(CommonAppContext.sInstance) + .addChatCount(LiveActivity.mStream, new com.yunbao.common.http.base.HttpCallback() { + @Override + public void onSuccess(HttpCallbackModel data) { + + } + + @Override + public void onError(String error) { + + } + }); + } + + @Override + public void onError(Message message, RongIMClient.ErrorCode errorCode) { + + } + }); + + } } 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 cb6b2340f..e7f54b2fc 100644 --- a/live/src/main/java/com/yunbao/live/socket/SocketRyClient.java +++ b/live/src/main/java/com/yunbao/live/socket/SocketRyClient.java @@ -4,6 +4,7 @@ import static com.blankj.utilcode.util.SnackbarUtils.dismiss; import static com.blankj.utilcode.util.ViewUtils.runOnUiThread; import static com.yunbao.common.Constants.SOCKET_LIVE_MSG_TO_USER; import static com.yunbao.live.activity.LiveRyAnchorActivity.isDRPK; +import static com.yunbao.live.bean.LiveChatBean.TYPE_TO_ANCHOR_PRANK_GIFT; import static com.yunbao.live.views.LiveRoomViewHolder.getIsHot; import android.app.Activity; @@ -14,11 +15,15 @@ import android.text.TextUtils; import android.util.Log; import android.view.View; import android.widget.LinearLayout; +import android.widget.Toast; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.blankj.utilcode.util.GsonUtils; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParser; import com.yunbao.common.CommonAppConfig; import com.yunbao.common.CommonAppContext; import com.yunbao.common.Constants; @@ -55,6 +60,7 @@ import com.yunbao.common.utils.Bus; import com.yunbao.common.utils.DialogUitl; import com.yunbao.common.utils.L; import com.yunbao.common.utils.ToastUtil; +import com.yunbao.common.utils.ToastUtils; import com.yunbao.common.utils.WordUtil; import com.yunbao.live.R; import com.yunbao.live.activity.LiveAudienceActivity; @@ -192,7 +198,7 @@ public class SocketRyClient { SocketReceiveBean received = JSON.parseObject(socketMsg, SocketReceiveBean.class); JSONObject map = received.getMsg().getJSONObject(0); - +// LogUtils.e("yqw=====>收到的socket:"+map.getString("_method_")+","+map.getString("ct")); switch (map.getString("_method_")) { //用户连麦 case Constants.LIAN_MAI: @@ -251,7 +257,7 @@ public class SocketRyClient { // LiveLinkMicPresenter.setHD(map.getString("ct")); break; case Constants.SOCKET_SYSTEM://系统消息 - if (map.getString("ct").contains("甜蜜不停")) { + if (map.getString("ct").contains("甜蜜不停")) { break; } UserBean us = CommonAppConfig.getInstance().getUserBean(); @@ -290,6 +296,45 @@ public class SocketRyClient { } } break; + + case Constants.PrankSendData: + //整蛊礼物刷新 + L.e("整蛊礼物刷新 整蛊礼物刷新 整蛊礼物刷新"); + if (map.getIntValue("action") == 13 && map.getString("msgtype").equals("4")){ + String ctString = map.getString("ct"); + L.e("整蛊礼物刷新 整蛊礼物刷新 整蛊礼物刷新 "+ctString); + JsonElement jsonElement = JsonParser.parseString(ctString); + if (jsonElement == null) break; +// LogUtils.e("yqw=====>整蛊礼物列表:"+ctString); + JsonObject jsonObject = jsonElement.getAsJsonObject(); + String content = WordUtil.isNewZh() ? jsonObject.get("msg").getAsString() : jsonObject.get("msg_en").getAsString(); + if(jsonObject.get("is_complete")!=null){ + String is_complete = jsonObject.get("is_complete").getAsString(); //0.未达成整蛊需要的数量 1.已达成整蛊 + if(is_complete.equals("1")){ + String user_name = jsonObject.get("user_name").getAsString(); //用户昵称 + String prank_content = jsonObject.get("prank_content").getAsString(); //整蛊内容 + String gift_count = jsonObject.get("gift_count").getAsString(); // 礼物数量 + LiveChatBean chatBean = new LiveChatBean(); + chatBean.setUserNiceName(user_name); + chatBean.setGiftName(jsonObject.get("gift_name").getAsString()); + chatBean.setGiftname_en(jsonObject.get("gift_name_en").getAsString()); + chatBean.setHot_num(gift_count); + chatBean.setContent(prank_content); + chatBean.setType(TYPE_TO_ANCHOR_PRANK_GIFT); + mListener.onChat(chatBean, 1); + } + }else{ + if (!TextUtils.isEmpty(content)){ + systemChatMessage2(content); + } + } + if(CommonAppConfig.getInstance().getUid().equals(mLiveUid)&&"完成1次!".equals(jsonObject.get("msg").getAsString())){ + Toast toast = Toast.makeText(mContext,WordUtil.isNewZh()?jsonObject.get("msg").getAsString():jsonObject.get("msg_en").getAsString(),Toast.LENGTH_LONG); + toast.show(); + } + mListener.onUpdatePrankProgress(ctString); + } + break; case Constants.SOCKET_KICK://踢人 systemChatMessage2(map.getString("ct")); mListener.onKick(map.getString("touid")); diff --git a/live/src/main/java/com/yunbao/live/socket/SocketSwClient.java b/live/src/main/java/com/yunbao/live/socket/SocketSwClient.java index 76cd96cf1..69c23c515 100644 --- a/live/src/main/java/com/yunbao/live/socket/SocketSwClient.java +++ b/live/src/main/java/com/yunbao/live/socket/SocketSwClient.java @@ -4,6 +4,7 @@ import static com.yunbao.common.Constants.SOCKET_LINK_MIC_PK; import static com.yunbao.common.Constants.SOCKET_LIVE_MSG_TO_USER; import static com.yunbao.live.activity.LiveSwAnchorActivity.isDRPK; import static com.yunbao.live.activity.LiveSwAnchorActivity.DRPKing; +import static com.yunbao.live.bean.LiveChatBean.TYPE_TO_ANCHOR_PRANK_GIFT; import static com.yunbao.live.views.LiveRoomViewHolder.getIsHot; import android.app.Activity; @@ -14,12 +15,16 @@ import android.text.TextUtils; import android.util.Log; import android.view.View; import android.widget.LinearLayout; +import android.widget.Toast; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.blankj.utilcode.util.GsonUtils; import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParser; import com.yunbao.common.CommonAppConfig; import com.yunbao.common.CommonAppContext; import com.yunbao.common.Constants; @@ -280,6 +285,44 @@ public class SocketSwClient { } } break; + case Constants.PrankSendData: + //整蛊礼物刷新 + L.e("整蛊礼物刷新 整蛊礼物刷新 整蛊礼物刷新"); + if (map.getIntValue("action") == 13 && map.getString("msgtype").equals("4")){ + String ctString = map.getString("ct"); + L.e("整蛊礼物刷新 整蛊礼物刷新 整蛊礼物刷新 "+ctString); + JsonElement jsonElement = JsonParser.parseString(ctString); + if (jsonElement == null) break; +// LogUtils.e("yqw=====>整蛊礼物列表:"+ctString); + JsonObject jsonObject = jsonElement.getAsJsonObject(); + String content = WordUtil.isNewZh() ? jsonObject.get("msg").getAsString() : jsonObject.get("msg_en").getAsString(); + if(jsonObject.get("is_complete")!=null){ + String is_complete = jsonObject.get("is_complete").getAsString(); //0.未达成整蛊需要的数量 1.已达成整蛊 + if(is_complete.equals("1")){ + String user_name = jsonObject.get("user_name").getAsString(); //用户昵称 + String prank_content = jsonObject.get("prank_content").getAsString(); //整蛊内容 + String gift_count = jsonObject.get("gift_count").getAsString(); // 礼物数量 + LiveChatBean chatBean = new LiveChatBean(); + chatBean.setUserNiceName(user_name); + chatBean.setGiftName(jsonObject.get("gift_name").getAsString()); + chatBean.setGiftname_en(jsonObject.get("gift_name_en").getAsString()); + chatBean.setHot_num(gift_count); + chatBean.setContent(prank_content); + chatBean.setType(TYPE_TO_ANCHOR_PRANK_GIFT); + mListener.onChat(chatBean, 1); + } + }else{ + if (!TextUtils.isEmpty(content)){ + systemChatMessage2(content); + } + } + if(CommonAppConfig.getInstance().getUid().equals(mLiveUid)&&"完成1次!".equals(jsonObject.get("msg").getAsString())){ + Toast toast = Toast.makeText(mContext,WordUtil.isNewZh()?jsonObject.get("msg").getAsString():jsonObject.get("msg_en").getAsString(),Toast.LENGTH_LONG); + toast.show(); + } + mListener.onUpdatePrankProgress(ctString); + } + break; case Constants.SOCKET_KICK://踢人 systemChatMessage2(map.getString("ct")); mListener.onKick(map.getString("touid")); diff --git a/live/src/main/java/com/yunbao/live/utils/Zeus.kt b/live/src/main/java/com/yunbao/live/utils/Zeus.kt new file mode 100644 index 000000000..4cce351b0 --- /dev/null +++ b/live/src/main/java/com/yunbao/live/utils/Zeus.kt @@ -0,0 +1,90 @@ +package com.yunbao.live.utils + +import android.graphics.Color +import android.graphics.LinearGradient +import android.graphics.Shader +import android.text.Spannable +import android.text.SpannableString +import android.text.style.ForegroundColorSpan +import android.view.View +import android.widget.TextView +import androidx.core.content.ContextCompat +import androidx.core.view.isGone +import androidx.core.view.isInvisible +import androidx.core.view.isVisible +import java.util.regex.Pattern + +//显示控件 +fun View.visible(){ + isVisible = true +} + +//隐藏控件 +fun View.gone(){ + isGone = true +} + +//隐藏控件 +fun View.inVisible(){ + isInvisible = true +} + +//文字颜色渐变 +fun setGradientFont(view: TextView,floatArray: FloatArray,colors : Array) { + view.measure(View.MeasureSpec.makeMeasureSpec(0,View.MeasureSpec.UNSPECIFIED),0) +// val floats = floatArrayOf(0.5f,1.0f) + val colorsInt = colors.map { Color.parseColor(it) }.toIntArray() + val linearGradient = + LinearGradient(0f, 0f, + view.measuredWidth.toFloat(), + 0f, + colorsInt, + floatArray, + Shader.TileMode.CLAMP) + view.paint.shader = linearGradient + view.invalidate() +} + +/** + *@MethodName: setOnSingleClick + *@Description: 调用控件的点击事件 + *@Author: Yqw + *@Date: 2023/4/21 18:10 + **/ +private var lastClickTime = 0L +private const val internalTime = 500L +interface OnClickListener{ + fun onClick(view : View) +} +fun setOnSingleClick(view: View,onClick : OnClickListener){ + view.setOnClickListener { + if (lastClickTime != 0L && (System.currentTimeMillis()- lastClickTime)< internalTime){ +// lastClickTime = System.currentTimeMillis() +// "Do not click repeatedly!".toastShort + return@setOnClickListener + }else{ + lastClickTime = System.currentTimeMillis() + onClick.onClick(it) + } + } +} + +//设置关键词样式 +fun setSpannable(content: String, keys: Array,color : String): SpannableString { + val msp = SpannableString(content) + for (index in keys.indices){ + val p = Pattern.compile(keys[index]) + val m = p.matcher(msp) + while (m.find()){ + msp.setSpan( + ForegroundColorSpan(Color.parseColor(color)), + m.start(), + m.end(), + Spannable.SPAN_EXCLUSIVE_EXCLUSIVE) +// msp.setSpan(StyleSpan(Typeface.BOLD),m.start(),m.end(),Spannable.SPAN_EXCLUSIVE_EXCLUSIVE) +// msp.setSpan(AbsoluteSizeSpan(25,true),m.start(),m.end(),Spannable.SPAN_EXCLUSIVE_EXCLUSIVE) +// msp.setSpan(UnderlineSpan(),m.start(),m.end(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE) + } + } + return msp +} \ No newline at end of file diff --git a/live/src/main/java/com/yunbao/live/views/LiveGiftItemFragment.java b/live/src/main/java/com/yunbao/live/views/LiveGiftItemFragment.java index ee7c03513..1d151691b 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveGiftItemFragment.java +++ b/live/src/main/java/com/yunbao/live/views/LiveGiftItemFragment.java @@ -56,6 +56,16 @@ public class LiveGiftItemFragment extends BaseFragment { frameGiftList.setLayoutManager(new GridLayoutManager(getActivity(), 4, GridLayoutManager.VERTICAL, false)); frameGiftAdapter = new FrameGiftAdapter(contextLayoutGiftHeight, giftJson, mStream, mLiveUid, wishGiftId); frameGiftList.setAdapter(frameGiftAdapter); + + frameGiftList.post(()->{ + if (!TextUtils.isEmpty(wishGiftId) && !giftJson.isEmpty()){ + for (int i = 0; i < giftJson.size(); i++) { + if (giftJson.get(i).getId()== Integer.parseInt(wishGiftId)){ + frameGiftAdapter.giftSelect(giftJson.get(i)); + } + } + } + }); } @Override diff --git a/live/src/main/java/com/yunbao/live/views/LiveParcelItemFragment.java b/live/src/main/java/com/yunbao/live/views/LiveParcelItemFragment.java index 7127f6753..0a75492bf 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveParcelItemFragment.java +++ b/live/src/main/java/com/yunbao/live/views/LiveParcelItemFragment.java @@ -77,6 +77,6 @@ public class LiveParcelItemFragment extends BaseFragment { @Subscribe(threadMode = ThreadMode.MAIN) public void onLiveParcelItemRefreshEvent(LiveParcelItemRefreshEvent event) { - frameGiftAdapter.refreshWrapListAfterSend(event.getLiveGiftModel()); + frameGiftAdapter.refreshWrapListAfterSend(event); } } diff --git a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java index 57d0be7c7..5fd63fee8 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java @@ -44,6 +44,9 @@ import androidx.recyclerview.widget.RecyclerView; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; +import com.blankj.utilcode.util.GsonUtils; +import com.blankj.utilcode.util.LogUtils; +import com.blankj.utilcode.util.SizeUtils; import com.bumptech.glide.Glide; import com.bumptech.glide.load.DataSource; import com.bumptech.glide.load.engine.GlideException; @@ -51,6 +54,9 @@ import com.bumptech.glide.load.resource.gif.GifDrawable; import com.bumptech.glide.request.RequestListener; import com.bumptech.glide.request.RequestOptions; import com.bumptech.glide.request.target.Target; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.reflect.TypeToken; import com.google.gson.Gson; import com.lxj.xpopup.XPopup; import com.makeramen.roundedimageview.RoundedImageView; @@ -62,6 +68,8 @@ import com.opensource.svgaplayer.SVGADrawable; import com.opensource.svgaplayer.SVGAImageView; import com.opensource.svgaplayer.SVGAParser; import com.opensource.svgaplayer.SVGAVideoEntity; +import com.yunbao.common.bean.PrankProgressBean; +import com.yunbao.common.utils.L; import com.yunbao.common.utils.MobclickAgent; import com.yunbao.common.CommonAppConfig; import com.yunbao.common.Constants; @@ -151,9 +159,11 @@ import com.yunbao.live.activity.LiveAudienceActivity; import com.yunbao.live.activity.LiveRyAnchorActivity; import com.yunbao.live.activity.LiveSwAnchorActivity; import com.yunbao.live.activity.ZhuangBanActivity; +import com.yunbao.live.adapter.ComboAdapter; import com.yunbao.live.adapter.LiveChatAdapter; import com.yunbao.live.adapter.LiveRoomFastMessageRecyclerViewAdapter; import com.yunbao.live.adapter.LiveUserAdapter; +import com.yunbao.live.adapter.PrankAdapter; import com.yunbao.live.bean.DrPkbean; import com.yunbao.live.bean.LiveBuyGuardMsgBean; import com.yunbao.live.bean.LiveChatBean; @@ -175,6 +185,7 @@ import com.yunbao.live.dialog.LiveFaceUnityDialogFragment; import com.yunbao.live.dialog.LiveFansMedalDialogFragment; import com.yunbao.live.dialog.LiveGameDialogFragment; import com.yunbao.live.dialog.LiveHDDialogFragment; +import com.yunbao.live.dialog.LivePrankDialogFragment; import com.yunbao.live.dialog.LiveUserAnchorMailBoxWebInfoPopDialog; import com.yunbao.live.dialog.LiveUserDialogFragment; import com.yunbao.live.dialog.LiveWishListDialogFragment4Audience; @@ -190,6 +201,7 @@ import com.yunbao.live.presenter.LiveLightAnimPresenter; import com.yunbao.live.utils.LiveRoomVoteManager; import com.yunbao.live.utils.LiveTextRender; import com.yunbao.live.utils.LoadDian9TuUtil; +import com.yunbao.live.utils.ZeusKt; import org.greenrobot.eventbus.EventBus; import org.greenrobot.eventbus.Subscribe; @@ -199,6 +211,7 @@ import java.lang.ref.WeakReference; import java.net.MalformedURLException; import java.net.URL; import java.util.ArrayList; +import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Locale; @@ -210,6 +223,7 @@ import io.rong.imkit.userinfo.RongUserInfoManager; import io.rong.imlib.RongIMClient; import io.rong.imlib.model.Conversation; import io.rong.imlib.model.UserInfo; +import com.bumptech.glide.load.resource.gif.GifDrawable; import pl.droidsonroids.gif.GifImageView; /** @@ -402,6 +416,24 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis private View quick_gift_reminder; private int guardType = 0; + //整蛊进度列表功能 + private View prank_group; + public TextView prank_group_title,prank_group_turntable; + private RecyclerView recycler_prank; + private ImageView prank_group_bottom_icon,prank_group_turntable_icon; + private GifImageView prank_small_icon; + private PrankAdapter prankAdapter; + private List prankAndComboList = new ArrayList<>(); + private List completedList = new ArrayList<>(); + private int isPrank; + private boolean prankAnisShow; + private LinearLayout prank_top_layout; + private ImageView prank_group_top_icon; + + private int mPrankType; + + private pl.droidsonroids.gif.GifDrawable mGifDrawable; + private static boolean isSw; public LiveRoomViewHolder setGuardType(int guardType) { @@ -1340,19 +1372,46 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis mLiveChatAdapter.removetItem(bean); ((LiveActivity) mContext).sendChatMessage("Hi~", null, null); } else if (bean.getType() == -5) { - String url = CommonAppConfig.HOST + "/index.php?g=Appapi&m=Turntable&a=tricky"; - url += "&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&anchorUid=" + mLiveUid + "&isZh=" + (WordUtil.isNewZh() ? "1" : 0); + String url = CommonAppConfig.HOST + "/h5/activity/Turntable/index.html"; + url += "?uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + + CommonAppConfig.getInstance().getToken() + + "&active_id=6"; Log.i("tag", url); Bundle bundle1 = new Bundle(); bundle1.putString("url", url); LiveHDDialogFragment liveHDDialogFragment = new LiveHDDialogFragment(); liveHDDialogFragment.setArguments(bundle1); - liveHDDialogFragment.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "LiveHDDialogFragment"); + if(mContext instanceof LiveAudienceActivity){ + liveHDDialogFragment.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "LiveHDDialogFragment"); + }else if(mContext instanceof LiveRyAnchorActivity){ + liveHDDialogFragment.show(((LiveRyAnchorActivity) mContext).getSupportFragmentManager(), "LiveHDDialogFragment"); + }else if(mContext instanceof LiveSwAnchorActivity){ + liveHDDialogFragment.show(((LiveSwAnchorActivity) mContext).getSupportFragmentManager(), "LiveHDDialogFragment"); + } } else if (bean.getType() == RECOMMEND_CARD_NOTIFY) { gotoLive(bean.getMsgModel().getAnchorId()); } else if (bean.getType() == bean.STAR_CHALLENGE_UPGRADE_NOTIFY) { gotoLive(bean.getMsgModel().getLiveUid()); - } else { + } else if(bean.getType()==bean.TYPE_TO_ANCHOR_PRANK){ + LivePrankDialogFragment fragment = new LivePrankDialogFragment(); + fragment.setOnPrankResultListener(new LivePrankDialogFragment.onPrankResultListener() { + @Override + public void OpenAndCloseListener() { + initPrankProgress(); + } + }); + fragment.setmLiveUid(mLiveUid); + if(mContext instanceof LiveRyAnchorActivity){ + fragment.show(((LiveRyAnchorActivity)mContext).getSupportFragmentManager(), "LivePrankDialogFragment"); + }else if(mContext instanceof LiveSwAnchorActivity){ + fragment.show(((LiveSwAnchorActivity)mContext).getSupportFragmentManager(), "LivePrankDialogFragment"); + } + if(mContext instanceof LiveRyAnchorActivity){ + com.yunbao.live.activity.LiveRyAnchorActivity.mLiveAnchorViewHolder.closeMenuRed(); + }else if(mContext instanceof LiveSwAnchorActivity){ + com.yunbao.live.activity.LiveSwAnchorActivity.mLiveAnchorViewHolder.closeMenuRed(); + } + }else{ showUserDialog(bean.getId()); } } @@ -1575,7 +1634,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis findViewById(R.id.btn_follow).setVisibility(View.GONE); findViewById(R.id.live_rank_pk).setVisibility(View.GONE); } - if (mContext instanceof LiveRyAnchorActivity) { + if (mContext instanceof LiveRyAnchorActivity ||mContext instanceof LiveSwAnchorActivity) { findViewById(R.id.open_sidebar).setVisibility(View.GONE); findViewById(R.id.btn_follow).setVisibility(View.GONE); findViewById(R.id.live_rank_pk).setVisibility(View.GONE); @@ -1624,6 +1683,334 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis } }); // dragonImmediateParticipation.setVisibility(View.GONE); + + //整蛊转盘优化更新 + prank_top_layout= (LinearLayout) findViewById(R.id.prank_top_layout); + prank_group_top_icon= (ImageView) findViewById(R.id.prank_group_top_icon); + prank_group = findViewById(R.id.prank_group);//浮窗 + prank_group_title = (TextView) findViewById(R.id.prank_group_title);//浮窗标题 + recycler_prank = (RecyclerView) findViewById(R.id.recycler_prank);//列表 + prank_group_turntable = (TextView) findViewById(R.id.prank_group_turntable);//文字转盘整蛊(用户端已删除,主播端为待完成整蛊按钮) + prank_group_bottom_icon = (ImageView) findViewById(R.id.prank_group_bottom_icon);//收起icon + prank_group_turntable_icon = (ImageView) findViewById(R.id.prank_group_turntable_icon);//转盘图标 + prank_small_icon = (GifImageView) findViewById(R.id.prank_small_icon);//收起后图标 + + try { + if (WordUtil.isNewZh()){ + mGifDrawable = new pl.droidsonroids.gif.GifDrawable(mContext.getResources(),R.drawable.pran_zh); + }else { + mGifDrawable = new pl.droidsonroids.gif.GifDrawable(mContext.getResources(),R.drawable.pran_en); + } + prank_small_icon.setImageDrawable(mGifDrawable); + mGifDrawable.stop(); + }catch (Exception e){ + e.printStackTrace(); + } + + + //点击文字转盘整蛊(跳转转盘整蛊) + prank_group_turntable.setOnClickListener(v->{ + prankAnisShow = !prankAnisShow; + if(isPrank==1){ + prankAdapter.setViewType(PrankAdapter.TYPE_GIFT); + }else{ + prankAdapter.setViewType(PrankAdapter.TYPE_COMBO); + } + if(prankAnisShow){ + prankAdapter.showAnView(completedList,prankAnisShow); + prank_group_turntable.setText(R.string.prank_progress); + if (!completedList.isEmpty()){ + limitItem(1,Math.min(completedList.size(), 4)); + }else { + recycler_prank.setVisibility(View.GONE); + } + prank_group_title.setText(WordUtil.isNewZh()?"待完成整蠱":"To do"); + prank_group_turntable.setText(WordUtil.isNewZh()?"整蠱進度":"progress"); + + }else{ + prankAdapter.showAnView(prankAndComboList,prankAnisShow); + prank_group_title.setText(WordUtil.isNewZh()?"整蠱進度":"progress"); + prank_group_turntable.setText(WordUtil.isNewZh()?"待完成整蠱":"To do"); + recycler_prank.setVisibility(View.VISIBLE); + limitItem(1,Math.min(prankAndComboList.size(), 4)); + } + }); + + //点击收起 + prank_group_bottom_icon.setOnClickListener(v->{ + prank_group.setVisibility(View.GONE); + prank_small_icon.setVisibility(View.VISIBLE); + if (CommonAppConfig.getInstance().getUid().equals(mLiveUid)){ + switchGifDrawable(!completedList.isEmpty()); + }else { + switchGifDrawable(false); + } + }); + + //点击收起整蛊icon + prank_small_icon.setOnClickListener(v->{ + prank_group.setVisibility(View.VISIBLE); + prank_small_icon.setVisibility(View.GONE); + }); + + //点击图片转盘整蛊(跳转转盘整蛊) + prank_group_turntable_icon.setOnClickListener(v->{ + Bus.get().post(new LiveAudienceEvent() + .setType(LiveAudienceEvent.LiveAudienceType.WE_CHEAT)); + }); + + recycler_prank.setLayoutManager(new LinearLayoutManager(mContext)); + + initPrankAdapter(); + } + + /** + * 收起整蛊列表 + */ + public void closePrankView(){ + if(prank_group.getVisibility()==View.VISIBLE){ + prank_group.setVisibility(View.GONE); + prank_small_icon.setVisibility(View.VISIBLE); + } + } + + + public void sendMsgPrank(){ + new Handler().postDelayed(new Runnable() { + @Override + public void run() { + LiveChatBean bean = new LiveChatBean(); + bean.setContent("开播整蛊通知"); + bean.setType(LiveChatBean.TYPE_TO_ANCHOR_PRANK); + mLiveChatAdapter.insertItem(bean); + } + }, 1000); + } + + + //初始化整蛊列表进度 + public void initPrankProgress(){ +// LogUtils.e("yqw=====>主播id:"+mLiveUid); + //获取整蛊列表 + LiveNetManager.get(mContext).getPrankProgressList(mLiveUid, new com.yunbao.common.http.base.HttpCallback() { + @Override + public void onSuccess(PrankProgressBean data) { +// LogUtils.e("yqw=====>整蛊列表:"+data); + + isPrank = data.getPrank_type(); + prankAndComboList.clear(); + prankAndComboList.addAll(data.getPrank_list()); + completedList.clear(); + completedList.addAll(data.getCompleted_list()); + setPrankList(true,data.getStatus(),data.getPrank_type(),data.getPrank_turntable_status()); + } + + @Override + public void onError(String error) { + prank_group.setVisibility(View.GONE); + prank_small_icon.setVisibility(View.GONE); + prank_group_turntable_icon.setVisibility(View.GONE); + ToastUtil.show(WordUtil.isNewZh()?"抱歉!出錯了!":"i \\'m sorry! An error occurred"); + } + }); + } + + //刷新整蛊礼物列表 + public void refreshPrank(String newPrankData){ + try { +// LogUtils.e("yqw=====>整蛊礼物数据1:"+newPrankData); + org.json.JSONObject ctString = new org.json.JSONObject(newPrankData); + if (ctString.getInt("is_update") == 1){ + //列表全部更新 + if (ctString.getInt("status")==1){ + //编辑添加整蛊 + initPrankProgress(); + }else { + //编辑取消整蛊 + prank_group.setVisibility(View.GONE); + prank_small_icon.setVisibility(View.GONE); + } + if(CommonAppConfig.getInstance().getUid().equals(mLiveUid)){ + return; + } + if (Integer.parseInt(ctString.getString("prank_turntable_status")) == 0){ + prank_group_turntable_icon.setVisibility(View.GONE); + }else { + prank_group_turntable_icon.setVisibility(View.VISIBLE); + //ZeusKt.visible(prank_group_turntable_icon); + } + }else { + //送整蛊礼物更新 + String prankListString = ctString.getString("prank_list"); + List prankList = GsonUtils.fromJson(prankListString,new TypeToken>() {}.getType()); +// LogUtils.e("yqw=====>整蛊礼物数据2:"+prankList.toString()); + prankAndComboList.clear(); + prankAndComboList.addAll(prankList); + + String completedString = ctString.getString("completed_list"); + List completeds = GsonUtils.fromJson(completedString,new TypeToken>() {}.getType()); + completedList.clear(); + completedList.addAll(completeds); + + setPrankList(false,Integer.parseInt(ctString.getString("status")), Integer.parseInt(ctString.getString("prank_type")), Integer.parseInt(ctString.getString("prank_turntable_status"))); + } + }catch (Exception e){ + LogUtils.e("yqw=====>转换错误:"+e.getMessage()); + } + + } + private void initPrankAdapter() { + prankAdapter = new PrankAdapter(mContext); + //整蛊礼物点击 + prankAdapter.addOnItemClickListener(new PrankAdapter.OnItemClickListener() { + @Override + public void onItemClick(View view, int giftId) { + if(CommonAppConfig.getInstance().getUid().equals(mLiveUid)){ + return; + } + openGiftDialog(String.valueOf(giftId)); + } + + @Override + public void onItemDel(int giftId) { + LiveNetManager.get(mContext).anchorClickFinish(mLiveUid, String.valueOf(giftId), new com.yunbao.common.http.base.HttpCallback>() { + @Override + public void onSuccess(List data) { + + } + + @Override + public void onError(String error) { + + } + }); + L.e("onItemDel:"+giftId); + } + }); + + } + //设置整蛊礼物数据 + private void setPrankList(boolean isShow,int status,int mPrankType,int prankTurntableStatus){ + this.mPrankType =mPrankType; +// LogUtils.e("yqw=====>显示转盘icon:是否显示:"+(prankTurntableStatus == 1)+",是否在倒计时"+(lt_trickery.getVisibility() == View.VISIBLE)); + if (prankTurntableStatus == 1 && lt_trickery.getVisibility() == View.GONE){ + if(!CommonAppConfig.getInstance().getUid().equals(mLiveUid)){ + prank_group_turntable_icon.setVisibility(View.VISIBLE); + } + }else { + prank_group_turntable_icon.setVisibility(View.GONE); + } +// LogUtils.e("yqw=====>显示整蛊列表或者投票列表:"+status); + if (status == 1){ + if(isShow){ + prank_group.setVisibility(View.VISIBLE); + } + //主播可能打开整蛊功能,但是不设置整蛊礼物,这里会是空列表 + if (!prankAndComboList.isEmpty()){ + initPrankAdapter(); + recycler_prank.setAdapter(prankAdapter); + if (mPrankType == 1){//礼物 +// sortByCompletionRate(prankAndComboList); + prankAdapter.setViewType(PrankAdapter.TYPE_GIFT); + //prankAdapter.setList(prankAndComboList); + if(prankAnisShow){ + prankAdapter.showAnView(completedList,prankAnisShow); + prank_group_title.setText(WordUtil.isNewZh()?"待完成整蠱":"To do"); + prank_group_turntable.setText(WordUtil.isNewZh()?"整蠱進度":"progress"); + if (!completedList.isEmpty()){ + limitItem(1,Math.min(completedList.size(), 4)); + }else { + recycler_prank.setVisibility(View.GONE); + } + + }else{ + prankAdapter.showAnView(prankAndComboList,prankAnisShow); + prank_group_title.setText(WordUtil.isNewZh()?"整蠱進度":"progress"); + prank_group_turntable.setText(WordUtil.isNewZh()?"待完成整蠱":"To do"); + limitItem(1,Math.min(prankAndComboList.size(), 4)); + } + }else { //连击 +// sortBySendNum(prankAndComboList); + prank_group_title.setText(R.string.combo_vote); + prankAdapter.setViewType(PrankAdapter.TYPE_COMBO); + prankAdapter.setList(prankAndComboList); + limitItem(2,Math.min(prankAndComboList.size(), 4)); + } + }else { + prank_group.setVisibility(View.GONE); + prank_small_icon.setVisibility(View.GONE); + } + if(CommonAppConfig.getInstance().getUid().equals(mLiveUid)){ + + prank_top_layout.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + prank_group.setVisibility(View.GONE); + prank_small_icon.setVisibility(View.VISIBLE); + switchGifDrawable(!completedList.isEmpty()); + } + }); + prank_group_top_icon.setVisibility(View.VISIBLE); + if(mPrankType==1){ + prank_group_turntable.setVisibility(View.VISIBLE); + }else{ + prank_group_turntable.setVisibility(View.GONE); + } + prank_group_bottom_icon.setVisibility(View.GONE); + switchGifDrawable(!completedList.isEmpty()); + }else{ + switchGifDrawable(false); + if(mPrankType==1){ + prank_group_title.setText(R.string.prank_progress); + }else{ + prank_group_title.setText(R.string.combo_vote); + } + prank_group_turntable.setVisibility(View.GONE); + prank_group_top_icon.setVisibility(View.GONE); + } + }else { + prank_group.setVisibility(View.GONE); + prank_small_icon.setVisibility(View.GONE); + } + } + + + //根据完成度排序 + private void sortByCompletionRate(List items) { + Collections.sort(items, (item1, item2) -> Double.compare(item2.getCompletionRate(), item1.getCompletionRate())); + } + + //根据连击数排列 + private void sortBySendNum(List items) { + Collections.sort(items, (item1, item2) -> { + return Integer.compare(item2.getSend_num(), item1.getSend_num()); // 从高到低排序 + }); + } + + //设置最多显示4个项目 + private void limitItem(int prankType,int maxItem){ + recycler_prank.post(() -> { + View itemView = recycler_prank.getChildAt(0); + if (itemView != null){ + int gap = prankType == 1 ? SizeUtils.dp2px(3f) : 0; + int height = (itemView.getHeight() + gap)*maxItem; + ViewGroup.LayoutParams layoutParams = recycler_prank.getLayoutParams(); + layoutParams.height = height; + recycler_prank.setLayoutParams(layoutParams); + } + }); + } + + private void switchGifDrawable(boolean start){ +// LogUtils.e("yqw=====>判断闪烁:"+(mGifDrawable != null)+","+start); + if (mGifDrawable != null){ + if (start){ + mGifDrawable.start(); + }else { + mGifDrawable.seekTo(0); + mGifDrawable.stop(); + } + } } int ttttttype = 0; @@ -1637,7 +2024,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis private Runnable timeRunnable = new Runnable() { @Override public void run() { - Log.i("红包", "run: 红包倒计时 "+redTimeCountdown); + Log.i("红包", "run: 红包倒计时 " + redTimeCountdown); if (redTimeCountdown > 1) { timeHandler.postDelayed(timeRunnable, 1000); redPacketCountdown.setText(String.format(mContext.getString(R.string.red_packet_countdown), TimeUtils.getTime(redTimeCountdown))); @@ -1661,7 +2048,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis private Runnable anchorTimeRunnable = new Runnable() { @Override public void run() { - Log.i("红包", "anchorTimeRunnable run: "+mCountdown); + Log.i("红包", "anchorTimeRunnable run: " + mCountdown); if (mCountdown > 0) { mCountdown = mCountdown - 1; anchorTimeHandler.postDelayed(anchorTimeRunnable, 1000); @@ -1685,10 +2072,6 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) dragonImmediateParticipation.getLayoutParams(); layoutParams.topMargin = DpUtil.dp2px(110); dragonImmediateParticipation.setLayoutParams(layoutParams); - } if (dragonImmediateParticipationTime.getVisibility() == View.VISIBLE) { - RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) dragonImmediateParticipation.getLayoutParams(); - layoutParams.topMargin = DpUtil.dp2px(110); - dragonImmediateParticipationTime.setLayoutParams(layoutParams); } if (dragonImmediateParticipationTime.getVisibility() == View.VISIBLE) { RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) dragonImmediateParticipation.getLayoutParams(); @@ -1725,21 +2108,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis layoutParams.topMargin = DpUtil.dp2px(190); dragonImmediateParticipation.setLayoutParams(layoutParams); } - if (dragonImmediateParticipationTime.getVisibility() == View.VISIBLE&&mContext instanceof LiveRyAnchorActivity) { - RelativeLayout.LayoutParams layoutParamsredPacket = (RelativeLayout.LayoutParams) redPacket.getLayoutParams(); - layoutParamsredPacket.topMargin = DpUtil.dp2px(110); - redPacket.setLayoutParams(layoutParamsredPacket); - - RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) dragonImmediateParticipationTime.getLayoutParams(); - layoutParams.topMargin = DpUtil.dp2px(190); - dragonImmediateParticipationTime.setLayoutParams(layoutParams); - } - if (dragonImmediateParticipationTime.getVisibility() == View.GONE&&mContext instanceof LiveRyAnchorActivity){ - RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) redPacket.getLayoutParams(); - layoutParams.topMargin = DpUtil.dp2px(110); - redPacket.setLayoutParams(layoutParams); - } - if (dragonImmediateParticipationTime.getVisibility() == View.VISIBLE && mContext instanceof LiveRyAnchorActivity) { + if (dragonImmediateParticipationTime.getVisibility() == View.VISIBLE && mContext instanceof LiveRyAnchorActivity||mContext instanceof LiveSwAnchorActivity) { RelativeLayout.LayoutParams layoutParamsredPacket = (RelativeLayout.LayoutParams) redPacket.getLayoutParams(); layoutParamsredPacket.topMargin = DpUtil.dp2px(110); redPacket.setLayoutParams(layoutParamsredPacket); @@ -2153,7 +2522,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis public void setLiveUid(String liveUid) { mLiveUid = liveUid; - LiveHttpUtil.getAnchorActiveImgStatus(mLiveUid, new HttpCallback() { + /*LiveHttpUtil.getAnchorActiveImgStatus(mLiveUid, new HttpCallback() { @Override public void onSuccess(int code, String msg, String[] info) { if (code == 0 && imgEvent != null) { @@ -2176,7 +2545,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis } } } - }); + });*/ } //获取心愿单列表 @@ -4618,6 +4987,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis content = jsonObject.getString("content"); name = jsonObject.getString("user_nicename"); lt_trickery.setVisibility(View.VISIBLE); + prank_group_turntable_icon.setVisibility(View.GONE); lt_trickery.setBackground(mContext.getResources().getDrawable(R.mipmap.img_buoy)); isClose = false; starTimeloud(1, time); @@ -4661,6 +5031,9 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis countDownTimerTrickery.cancel(); countDownTimerTrickery = null; lt_trickery.setVisibility(View.GONE); + if(!CommonAppConfig.getInstance().getUid().equals(mLiveUid)){ + prank_group_turntable_icon.setVisibility(View.VISIBLE); + } LiveNetManager.get(mContext).endPrankTurntable(mLiveUid, new com.yunbao.common.http.base.HttpCallback() { @Override public void onSuccess(BaseModel data) { @@ -4695,6 +5068,9 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis starTimeloud(2, time); } else { lt_trickery.setVisibility(View.GONE); + if(!CommonAppConfig.getInstance().getUid().equals(mLiveUid)){ + prank_group_turntable_icon.setVisibility(View.VISIBLE); + } timeOver(); } } diff --git a/live/src/main/java/com/yunbao/live/views/LiveRyAnchorViewHolder.java b/live/src/main/java/com/yunbao/live/views/LiveRyAnchorViewHolder.java index be6be1142..c40d4f83d 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveRyAnchorViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveRyAnchorViewHolder.java @@ -89,6 +89,7 @@ public class LiveRyAnchorViewHolder extends AbsLiveViewHolder { private TextView mLiveTimeTextView;//主播的直播时长 private long mAnchorLiveTime;//主播直播时间 private LiveRoomHandler mLiveRoomHandler; + private TextView menuRed; private static LinearLayout btn_end_pk_dr; private String drpkRoomId; //多人 PK 房主 roomUid private ImageView leaveImg; @@ -237,6 +238,8 @@ public class LiveRyAnchorViewHolder extends AbsLiveViewHolder { mLiveTimeTextView = (TextView) findViewById(R.id.live_time); mLiveTimeTextView.setVisibility(View.VISIBLE); mLiveRoomHandler = new LiveRoomHandler(); + + menuRed = (TextView) findViewById(R.id.red_menu); } private Map yaoqing = new HashMap<>(); @@ -719,4 +722,12 @@ public class LiveRyAnchorViewHolder extends AbsLiveViewHolder { } return now + time + -now % 1000; } + + public void closeMenuRed(){ + menuRed.setVisibility(View.GONE); + } + + public boolean isShowMenuRed(){ + return menuRed.getVisibility()==View.VISIBLE; + } } 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 d7a53c46e..610a94513 100644 --- a/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java +++ b/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java @@ -637,6 +637,9 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe mLiveRoomViewHolder.setVoteData(data.getEnterRoomInfo().getVoteModel()); mLiveRoomViewHolder.updateFansMessageRed(); mLiveRoomViewHolder.setFansGroup(data.getEnterRoomInfo().getIsFans()); + //初始化整蛊进度列表 + mLiveRoomViewHolder.initPrankProgress(); + isattention = Integer.parseInt(data.getEnterRoomInfo().getIsattention()); if (isattention == 0) { @@ -723,6 +726,8 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe mLivePlayViewHolder.setPkView(connection_info.getPkuid()); } } + //收起整蠱列表 + mLiveRoomViewHolder.closePrankView(); } if (mLiveRoomViewHolder != null) { mLiveRoomViewHolder.pkHandler = false; @@ -773,6 +778,8 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe mLiveRoomViewHolder.initPkRank(null); } } + //收起整蠱列表 + mLiveRoomViewHolder.closePrankView(); //多人PK } else if (pkInfo != null && pkInfo.getIntValue("drpk_status") == 1) { if (mLiveRoomViewHolder != null) { @@ -805,6 +812,8 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe } upDataPkScore(pkInfo.getJSONArray("userlist"), pkInfo.getIntValue("drpk_time")); + //收起整蠱列表 + mLiveRoomViewHolder.closePrankView(); } if (data.getEnterRoomInfo().getGuard() != null) { if (mLiveRoomViewHolder != null) { @@ -1945,6 +1954,14 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe } } + //整蛊进度数据更新 + @Override + public void onUpdatePrankProgress(String prankString) { + if (mLiveRoomViewHolder != null){ + mLiveRoomViewHolder.refreshPrank(prankString); + } + } + private PagerAdapter pagerAdapter = new PagerAdapter() { @Override public int getCount() { diff --git a/live/src/main/res/drawable/bg_live_prank_btn_cancel.xml b/live/src/main/res/drawable/bg_live_prank_btn_cancel.xml new file mode 100644 index 000000000..822b6d96e --- /dev/null +++ b/live/src/main/res/drawable/bg_live_prank_btn_cancel.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/live/src/main/res/drawable/bg_live_prank_btn_save.xml b/live/src/main/res/drawable/bg_live_prank_btn_save.xml new file mode 100644 index 000000000..df8e924da --- /dev/null +++ b/live/src/main/res/drawable/bg_live_prank_btn_save.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/live/src/main/res/drawable/bg_live_prank_turntable_save.xml b/live/src/main/res/drawable/bg_live_prank_turntable_save.xml index 212e3cbe0..6e84e1100 100644 --- a/live/src/main/res/drawable/bg_live_prank_turntable_save.xml +++ b/live/src/main/res/drawable/bg_live_prank_turntable_save.xml @@ -2,7 +2,7 @@ - + diff --git a/live/src/main/res/drawable/bg_prank_an_once.xml b/live/src/main/res/drawable/bg_prank_an_once.xml new file mode 100644 index 000000000..0bd004a45 --- /dev/null +++ b/live/src/main/res/drawable/bg_prank_an_once.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/live/src/main/res/drawable/bg_prank_bottom_detail.xml b/live/src/main/res/drawable/bg_prank_bottom_detail.xml new file mode 100644 index 000000000..aa82d3720 --- /dev/null +++ b/live/src/main/res/drawable/bg_prank_bottom_detail.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/live/src/main/res/drawable/bg_prank_btn_gift_add_number.xml b/live/src/main/res/drawable/bg_prank_btn_gift_add_number.xml new file mode 100644 index 000000000..5d55567c7 --- /dev/null +++ b/live/src/main/res/drawable/bg_prank_btn_gift_add_number.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/live/src/main/res/drawable/bg_prank_gift_add_item.xml b/live/src/main/res/drawable/bg_prank_gift_add_item.xml new file mode 100644 index 000000000..abe9f2e32 --- /dev/null +++ b/live/src/main/res/drawable/bg_prank_gift_add_item.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/live/src/main/res/drawable/bg_prank_group.xml b/live/src/main/res/drawable/bg_prank_group.xml new file mode 100644 index 000000000..cae27342f --- /dev/null +++ b/live/src/main/res/drawable/bg_prank_group.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/live/src/main/res/drawable/bg_prank_item.xml b/live/src/main/res/drawable/bg_prank_item.xml new file mode 100644 index 000000000..861ab3d90 --- /dev/null +++ b/live/src/main/res/drawable/bg_prank_item.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/live/src/main/res/drawable/bg_prank_item_subscript.xml b/live/src/main/res/drawable/bg_prank_item_subscript.xml new file mode 100644 index 000000000..eb405431d --- /dev/null +++ b/live/src/main/res/drawable/bg_prank_item_subscript.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/live/src/main/res/drawable/pran_en.gif b/live/src/main/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&l+OO7gOxr~$4Lei#&A!AkuPu{SR)&3?gB9zwU+P?@Aj5h$W4!@Day~- zPQPebas0PDZ%$Ket)e&(D}6nr+3MG`+2Pa%lTb0D!;$h zfYa;jS_2M3FX9#h((iN472&JB5se`G!LLkSqR+8`?}GZKn};aFfzB#lOd7+Ha z7TfAo*Ary7QS+?Zhn=X{+ zg?R4EJ-I!?K@jG8S?Jx4Y?Ra(;_NVhsT|4!Ra<2?2*bV%eJ8pVUK=t`SpV4>5|BaPAco;`K+Fxm*IeFD-O^`4 z-=l8m_zTqx=j%b|-9|a8%?GF5My48Em(tT6fz9&+cahF({B7#DR_hz~UCq$j|NvBCsj&GF-K)lqXE5Wr#>veOK;J#om5$nEmwkd@rMu>@*++#|@mHb;8yBDk?u zkx|d5iz*v9*$>SQ<9>s2)oVmBR`1bBTGSN(#^)enG~p`Bz@Vg)FE2SoPU_bzd?R6# zUi+KExn>j=lZ$|qG$ESsw~WGy;B3i$7RQ7zHbq}tg3EoT^7O&OjxOzuk*O)>PD+gK zMsn$*(~P$H89A|A@h)JT%Wv==*HJ2F+J%d;XeL0jH-mh1zpB8Tn9#RCuS@$O`8v{( z*>>6Y-a-q;++Z{c1+YUU#id5R8XYA;W{NikDgl#MN-Oq> zb$Fg%*V}m~w*_yWqFzZ4z1wc|;mQPqQ4q;Xh4~OvWF@xK5_hP+Y$ literal 0 HcmV?d00001 diff --git a/live/src/main/res/drawable/pran_zh.gif b/live/src/main/res/drawable/pran_zh.gif new file mode 100644 index 0000000000000000000000000000000000000000..27653504a7447e627d688d3905443bfe8e5424f8 GIT binary patch literal 27179 zcmeFZby$>rzxE5#B{`IUbO}f|DnrL03^PMFLl51dbc1v$NOuU*h)RQmbfbWPfPjF2 z1v7gvn^x~7`fhs9EBr~ z*O7gi$YDq1YCh^@q`4HljAFk;_lcYn71mNf+%77gIUNw+~T2zg!H5A=lfGTYVSx zI;ea>)LSp)-Zb)k?ZsR!an~m^p<*$R z8$A~b<;c%-=dWy$yOYS}2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lz*HDRj@&eL7E}1+j>KvP8(QbmT=Cw(DbmQ34W3r@kWYqPUkpO!nR$^ zjVKpfTb)5jn+dR?pVe?M`7GruH(oF!^m3f!WEl6>BvNrtzC0mBM7bnUtOI5z5aEGVd^RcnL&nWB}q~vZ4Wlv0*evIuz;r0F36I>-*)0kC1S< zygV3Hq@c4(?Q;nvJp4*q*(YM<%_icu1MC1?oGA z_Y0<{AHcW|c@bihX0j%eOy8I4fwLaePeE&KyitZ2?WDL|0(`#>FufgA;uRX8b8+{` zq_^UoS|T{DQC<3llPLhgxGsl!+Cn4qqEPoE7HpCqD2gSK?1>pPC>xShzD6hM+ z595sL%G;wd+ozsR8FDGhP8w=wY>ku~H9@8l^u%J0-C6Vhi+X`sZOpOcoZq_VVjmPm z3&iT_U(haJzagu0(korz?F)W27Sj8b#$7d=5Z5w|Q&D1U@3FwuvT|J)$o&$9!e0SD CE0O;I literal 0 HcmV?d00001 diff --git a/live/src/main/res/drawable/prank_msg_goto.xml b/live/src/main/res/drawable/prank_msg_goto.xml new file mode 100644 index 000000000..36658498c --- /dev/null +++ b/live/src/main/res/drawable/prank_msg_goto.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/live/src/main/res/drawable/progress_prank_bg.xml b/live/src/main/res/drawable/progress_prank_bg.xml new file mode 100644 index 000000000..520540726 --- /dev/null +++ b/live/src/main/res/drawable/progress_prank_bg.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/live/src/main/res/layout/dialog_live_prank.xml b/live/src/main/res/layout/dialog_live_prank.xml index f1e719288..274df02ee 100644 --- a/live/src/main/res/layout/dialog_live_prank.xml +++ b/live/src/main/res/layout/dialog_live_prank.xml @@ -1,6 +1,7 @@ @@ -12,9 +13,10 @@ android:layout_marginStart="16dp" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" - app:tabIndicatorColor="#F6F7FB" app:tabIndicator="@drawable/random_pk_shape_tab_indicator" + app:tabIndicatorColor="#F6F7FB" app:tabIndicatorFullWidth="false" + app:tabTextAppearance="@style/PrankTabLayoutTextStyle" app:tabMaxWidth="100dp" app:tabMode="scrollable" app:tabSelectedTextColor="#F6F7FB" @@ -28,20 +30,67 @@ android:layout_width="67dp" android:layout_height="24dp" android:layout_marginTop="16dp" - android:layout_marginEnd="16dp" + android:layout_marginEnd="15dp" android:background="@drawable/bg_live_prank_turntable_save" android:gravity="center" android:textColor="#FFF" android:textSize="10sp" - app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintEnd_toStartOf="@+id/help" app:layout_constraintTop_toTopOf="parent" /> + + + + + + +