add[主播底部功能]

This commit is contained in:
Martin 2024-08-14 15:38:16 +08:00
parent 12749a1183
commit 54ee2fb0b7
34 changed files with 1053 additions and 468 deletions

View File

@ -0,0 +1,25 @@
package com.yunbao.common.bean;
/**
* 开播提示
*/
public class LiveOpenTipsBean extends BaseModel{
private String content;
private String english_content;
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public String getEnglish_content() {
return english_content;
}
public void setEnglish_content(String english_content) {
this.english_content = english_content;
}
}

View File

@ -1,105 +1,7 @@
package com.yunbao.common.http; package com.yunbao.common.http;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.yunbao.common.bean.ActiveBean; import com.yunbao.common.bean.*;
import com.yunbao.common.bean.ActiveModel;
import com.yunbao.common.bean.AnchorRecommendItemModel;
import com.yunbao.common.bean.AnchorRecommendModel;
import com.yunbao.common.bean.AvatarBean;
import com.yunbao.common.bean.BaseModel;
import com.yunbao.common.bean.BattlePassPoints;
import com.yunbao.common.bean.BattlePassTask;
import com.yunbao.common.bean.BattlePassUserInfoBean;
import com.yunbao.common.bean.BlindBoxInfoModel;
import com.yunbao.common.bean.CareerBean;
import com.yunbao.common.bean.CheckLiveModel;
import com.yunbao.common.bean.CheckRemainingBalance;
import com.yunbao.common.bean.CheckUpgradesModel;
import com.yunbao.common.bean.ContributeModel;
import com.yunbao.common.bean.CoolConfig;
import com.yunbao.common.bean.CreateSudRoomModel;
import com.yunbao.common.bean.CustomSidebarInfoModel;
import com.yunbao.common.bean.DiscountsModel;
import com.yunbao.common.bean.EnterRoomNewModel;
import com.yunbao.common.bean.FaceBookUpModel;
import com.yunbao.common.bean.FansCheckRed;
import com.yunbao.common.bean.FansGroupGiftPack;
import com.yunbao.common.bean.FansGroupGiftPackInfo;
import com.yunbao.common.bean.FirstLoginBean;
import com.yunbao.common.bean.GiftAlreadyWallModel;
import com.yunbao.common.bean.GiftGuideModel;
import com.yunbao.common.bean.GiftNamingInfoModel;
import com.yunbao.common.bean.GiftWallBean;
import com.yunbao.common.bean.GiftWallGiftDetail;
import com.yunbao.common.bean.GiftWallInfoBean;
import com.yunbao.common.bean.GiftWallMainTab2ClassicInfoBean;
import com.yunbao.common.bean.GiftWallModel;
import com.yunbao.common.bean.GiftWallTab2Bean;
import com.yunbao.common.bean.GuardGetGuardOpenInfoModel;
import com.yunbao.common.bean.GuardGetGuardUserInfoModel;
import com.yunbao.common.bean.HomeUserExhibitInfoBean;
import com.yunbao.common.bean.HomeUserInfoBean;
import com.yunbao.common.bean.HourRank;
import com.yunbao.common.bean.HttpCallbackModel;
import com.yunbao.common.bean.IMLoginModel;
import com.yunbao.common.bean.LinkMicUserBeanV2;
import com.yunbao.common.bean.ListInfoMessageModel;
import com.yunbao.common.bean.LiveAiRobotBean;
import com.yunbao.common.bean.LiveAnchorCallMeModel;
import com.yunbao.common.bean.LiveAnchorSayModel;
import com.yunbao.common.bean.LiveBattlePassRewardsBean;
import com.yunbao.common.bean.LiveDataInfoModel;
import com.yunbao.common.bean.LiveInfoModel;
import com.yunbao.common.bean.LiveRoomActivityBanner;
import com.yunbao.common.bean.LiveRoomVoteModel;
import com.yunbao.common.bean.LiveStetUpStatusModel;
import com.yunbao.common.bean.LiveTaskModel;
import com.yunbao.common.bean.LiveUserMailBoxModel;
import com.yunbao.common.bean.MainMessageChatListTimer;
import com.yunbao.common.bean.MedalAchievementModel;
import com.yunbao.common.bean.MessageChatIsAnchor;
import com.yunbao.common.bean.MessageChatUserBean;
import com.yunbao.common.bean.MessageHiBean;
import com.yunbao.common.bean.MessageSayHiBean;
import com.yunbao.common.bean.MessageSayHiStartBean;
import com.yunbao.common.bean.MessageUserInfoBean;
import com.yunbao.common.bean.MsgSwitchDetailModel;
import com.yunbao.common.bean.NewPeopleInfo;
import com.yunbao.common.bean.NobleRankHideUserListModel;
import com.yunbao.common.bean.NobleTrumpetModel;
import com.yunbao.common.bean.OpenAdModel;
import com.yunbao.common.bean.PkRankBean;
import com.yunbao.common.bean.PrankGiftResultBean;
import com.yunbao.common.bean.PrankHttpTurntableBean;
import com.yunbao.common.bean.PrankProgressBean;
import com.yunbao.common.bean.QiniuLog;
import com.yunbao.common.bean.QuickGiftSendGiftModel;
import com.yunbao.common.bean.RandomPkUserBean;
import com.yunbao.common.bean.RankPkInfoBean;
import com.yunbao.common.bean.RedPacketDetailsBean;
import com.yunbao.common.bean.RedPacketGiftModel;
import com.yunbao.common.bean.RedPacketInfoModel;
import com.yunbao.common.bean.RedPacketListBean;
import com.yunbao.common.bean.RoomMicStatusModel;
import com.yunbao.common.bean.SearchModel;
import com.yunbao.common.bean.SendMoneyLongModel;
import com.yunbao.common.bean.SetAttentsModel;
import com.yunbao.common.bean.ShareBean;
import com.yunbao.common.bean.SlideInBannerModel;
import com.yunbao.common.bean.StarChallengeStatusModel;
import com.yunbao.common.bean.SudGameInfoBean;
import com.yunbao.common.bean.SudGameScoreBean;
import com.yunbao.common.bean.SudGameUserModel;
import com.yunbao.common.bean.SudRoomListModel;
import com.yunbao.common.bean.SudgameCodeModel;
import com.yunbao.common.bean.SwTokenModel;
import com.yunbao.common.bean.UserAreaBean;
import com.yunbao.common.bean.UserAvatarSelectBean;
import com.yunbao.common.bean.UserBean;
import com.yunbao.common.bean.VipModel;
import com.yunbao.common.bean.WishListGiftConfModel;
import com.yunbao.common.bean.WishListModel;
import com.yunbao.common.bean.sendMoneyLongListModel;
import com.yunbao.common.event.CheckCurrencyModel; import com.yunbao.common.event.CheckCurrencyModel;
import java.util.List; import java.util.List;
@ -1489,4 +1391,10 @@ public interface PDLiveApi {
@Query("live_uid")String liveUid @Query("live_uid")String liveUid
); );
/**
* 获取開播提示
*/
@GET("/api/public/?service=live.getStartTips")
Observable<ResponseModel<List<LiveOpenTipsBean>>> getLiveDataInfo();
} }

View File

@ -54,6 +54,7 @@ import com.yunbao.common.bean.LiveAnchorSayModel;
import com.yunbao.common.bean.LiveBattlePassRewardsBean; import com.yunbao.common.bean.LiveBattlePassRewardsBean;
import com.yunbao.common.bean.LiveDataInfoModel; import com.yunbao.common.bean.LiveDataInfoModel;
import com.yunbao.common.bean.LiveInfoModel; import com.yunbao.common.bean.LiveInfoModel;
import com.yunbao.common.bean.LiveOpenTipsBean;
import com.yunbao.common.bean.LiveRoomActivityBanner; import com.yunbao.common.bean.LiveRoomActivityBanner;
import com.yunbao.common.bean.LiveRoomVoteModel; import com.yunbao.common.bean.LiveRoomVoteModel;
import com.yunbao.common.bean.LiveStetUpStatusModel; import com.yunbao.common.bean.LiveStetUpStatusModel;
@ -4268,6 +4269,31 @@ public class LiveNetManager {
} }
/**
* 获取开播提示信息
*/
public void getLiveOpenTips(HttpCallback<List<LiveOpenTipsBean>> callback) {
API.get().pdLiveApi(mContext)
.getLiveDataInfo()
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(roomMicStatusModelResponseModel -> {
if (callback != null) {
callback.onSuccess(roomMicStatusModelResponseModel.getData().getInfo());
}
}, new Consumer<Throwable>() {
@Override
public void accept(Throwable throwable) throws Exception {
throwable.printStackTrace();
if (callback != null) {
callback.onError(mContext.getString(R.string.net_error));
}
}
}).isDisposed();
}
/** /**
* 直播间取消网络请求 * 直播间取消网络请求
*/ */

View File

@ -0,0 +1,338 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/bg_live_tota"
android:orientation="vertical">
<LinearLayout
android:id="@+id/interactionLayout"
android:layout_width="match_parent"
android:orientation="vertical"
android:layout_height="wrap_content">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="17dp"
android:text="@string/live_interaction_Interaction"
android:textColor="@color/white"
android:textSize="14sp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="13dp"
android:layout_marginBottom="20dp"
android:paddingEnd="16dp">
<LinearLayout
android:id="@+id/live_tool_prank"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:layout_width="50dp"
android:layout_height="50dp"
android:src="@mipmap/icon_interaction_zg" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:text="@string/live_zg"
android:textColor="#FF9A9A9A"
android:textSize="12sp" />
</LinearLayout>
<LinearLayout
android:id="@+id/live_tool_wish"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:layout_width="50dp"
android:layout_height="50dp"
android:src="@mipmap/icon_interaction_wish" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:text="@string/live_wishlist"
android:textColor="#FF9A9A9A"
android:textSize="12sp" />
</LinearLayout>
<LinearLayout
android:id="@+id/live_tool_mic"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="vertical"
android:visibility="visible">
<ImageView
android:layout_width="50dp"
android:layout_height="50dp"
android:src="@mipmap/icon_interaction_mic" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:text="@string/live_mic"
android:textColor="#FF9A9A9A"
android:textSize="12sp" />
</LinearLayout>
<LinearLayout
android:id="@+id/live_tool_game"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:layout_width="50dp"
android:layout_height="50dp"
android:src="@mipmap/icon_interaction_game" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:text="@string/interactive_game"
android:textColor="#FF9A9A9A"
android:textSize="12sp" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="20dp"
android:paddingEnd="16dp">
<LinearLayout
android:id="@+id/live_tool_anchor_say"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:layout_width="50dp"
android:layout_height="50dp"
android:src="@mipmap/icon_interaction_anchor_say" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:text="@string/live_fun_anchor_say"
android:textColor="#FF9A9A9A"
android:textSize="12sp" />
</LinearLayout>
<LinearLayout
android:id="@+id/live_tool_qa"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:layout_width="50dp"
android:layout_height="50dp"
android:src="@mipmap/icon_interaction_qa" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:text="@string/dialog_live_function_qa"
android:textColor="#FF9A9A9A"
android:textSize="12sp" />
</LinearLayout>
<View
android:layout_width="0dp"
android:layout_weight="2"
android:layout_height="match_parent"/>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/equityLayout"
android:layout_width="match_parent"
android:orientation="vertical"
android:layout_height="wrap_content">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="17dp"
android:text="@string/live_interaction_broadcaster_rights"
android:textColor="@color/white"
android:textSize="14sp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:paddingEnd="16dp">
<LinearLayout
android:id="@+id/live_tool_live_data"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:layout_width="50dp"
android:layout_height="50dp"
android:src="@mipmap/icon_interaction_live_data" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:text="@string/broadcast_data"
android:textColor="#FF9A9A9A"
android:textSize="12sp" />
</LinearLayout>
<LinearLayout
android:id="@+id/live_tool_robot"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:layout_width="50dp"
android:layout_height="50dp"
android:src="@mipmap/icon_interaction_robot" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:text="@string/robot_setup"
android:textColor="#FF9A9A9A"
android:textSize="12sp" />
</LinearLayout>
<View
android:layout_width="0dp"
android:layout_weight="2"
android:layout_height="match_parent"/>
</LinearLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="14dp"
android:text="@string/live_interaction_tools"
android:textColor="@color/white"
android:textSize="14sp" />
<LinearLayout
android:layout_marginTop="14dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="20dp"
android:paddingEnd="16dp">
<LinearLayout
android:id="@+id/live_tool_beauty"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:layout_width="50dp"
android:layout_height="50dp"
android:src="@mipmap/icon_interaction_anchor_say" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:text="@string/live_beauty"
android:textColor="#FF9A9A9A"
android:textSize="12sp" />
</LinearLayout>
<LinearLayout
android:id="@+id/live_tool_camera"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:layout_width="50dp"
android:layout_height="50dp"
android:src="@mipmap/icon_interaction_camera" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:text="@string/live_camera"
android:textColor="#FF9A9A9A"
android:textSize="12sp" />
</LinearLayout>
<LinearLayout
android:id="@+id/live_tool_leave"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:id="@+id/live_tool_leave_img"
android:layout_width="50dp"
android:layout_height="50dp"
android:src="@mipmap/icon_interaction_leave" />
<TextView
android:id="@+id/live_tool_leave_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:text="@string/live_zslk"
android:textColor="#FF9A9A9A"
android:textSize="12sp" />
</LinearLayout>
<View
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="match_parent"/>
</LinearLayout>
</LinearLayout>
</LinearLayout>

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

View File

@ -268,8 +268,8 @@
<string name="live_cover">Live cover</string> <string name="live_cover">Live cover</string>
<string name="live_cover_2">Change cover</string> <string name="live_cover_2">Change cover</string>
<string name="live_title">Live broadcast title</string> <string name="live_title">Live broadcast title</string>
<string name="live_title_hint">Write a title for the live broadcast</string> <string name="live_title_hint">Please write a title for the live broadcast room</string>
<string name="live_class">channel</string> <string name="live_class">Select Channel</string>
<string name="live_class_choose">Select live channel</string> <string name="live_class_choose">Select live channel</string>
<string name="live_class_tip">During the live broadcast, if the operator finds that the selected channel does not match the live content, he / she will adjust your live channel.</string> <string name="live_class_tip">During the live broadcast, if the operator finds that the selected channel does not match the live content, he / she will adjust your live channel.</string>
<string name="live_set_pwd">Please set room password</string> <string name="live_set_pwd">Please set room password</string>
@ -291,9 +291,9 @@
<string name="live_camera_s">Mirroring</string> <string name="live_camera_s">Mirroring</string>
<string name="live_zg">Trickster</string> <string name="live_zg">Trickster</string>
<string name="live_dr">MultiplayerPK</string> <string name="live_dr">MultiplayerPK</string>
<string name="live_mic">Voice Link</string> <string name="live_mic">Voice connection</string>
<string name="live_wks">billboard</string> <string name="live_wks">billboard</string>
<string name="live_zslk">LeaveTemporarily</string> <string name="live_zslk">leave temporarily</string>
<string name="live_zslk1">ResumeLive</string> <string name="live_zslk1">ResumeLive</string>
<string name="live_flash">Flash lamp</string> <string name="live_flash">Flash lamp</string>
<string name="live_music">accompaniment</string> <string name="live_music">accompaniment</string>
@ -1004,10 +1004,10 @@ Limited ride And limited avatar frame</string>
<string name="ultra_hd">Ultra hd</string> <string name="ultra_hd">Ultra hd</string>
<string name="clarity_hint">After determining the definition of the broadcast, you need to restart the broadcast to change</string> <string name="clarity_hint">After determining the definition of the broadcast, you need to restart the broadcast to change</string>
<string name="confirmation_of_broadcast">Confirmation of broadcast Settings</string> <string name="confirmation_of_broadcast">Confirmation of broadcast Settings</string>
<string name="clarity">clarity</string> <string name="clarity">Clarity</string>
<string name="live_class1">Live channel</string> <string name="live_class1">Live channel</string>
<string name="broadcast">broadcast</string> <string name="broadcast">broadcast</string>
<string name="robot">robot</string> <string name="robot">Robot</string>
<string name="do_set">set</string> <string name="do_set">set</string>
<string name="not_set">Not set</string> <string name="not_set">Not set</string>
<string name="robot_no">no</string> <string name="robot_no">no</string>
@ -1127,7 +1127,7 @@ Limited ride And limited avatar frame</string>
<string name="live_language_setting">language setting</string> <string name="live_language_setting">language setting</string>
<string name="traditional_chinese">Traditional Chinese</string> <string name="traditional_chinese">Traditional Chinese</string>
<string name="add_gift2">Add gifts, nobles, and guardian wishes</string> <string name="add_gift2">Add gifts, nobles, and guardian wishes</string>
<string name="live_fun_anchor_say">GoddessSaid</string> <string name="live_fun_anchor_say">goddess say</string>
<string name="live_fun_call_me">Contact information</string> <string name="live_fun_call_me">Contact information</string>
<string name="unfollow_cancel">unfollow</string> <string name="unfollow_cancel">unfollow</string>
<string name="unfollow"> Where is the host doing badly~\nBrother, are you sure you want to unfollow?</string> <string name="unfollow"> Where is the host doing badly~\nBrother, are you sure you want to unfollow?</string>
@ -1173,7 +1173,7 @@ Limited ride And limited avatar frame</string>
<string name="dialog_live_gift_open_noble">VIP</string> <string name="dialog_live_gift_open_noble">VIP</string>
<string name="dialog_live_gift_open_guard">Open Guard</string> <string name="dialog_live_gift_open_guard">Open Guard</string>
<string name="dialog_live_gift_open_fans">Open Fan group</string> <string name="dialog_live_gift_open_fans">Open Fan group</string>
<string name="dialog_live_function_qa">QA</string> <string name="dialog_live_function_qa">Ask a question</string>
<string name="dialog_anchor_create_qa_submit">submit</string> <string name="dialog_anchor_create_qa_submit">submit</string>
<string name="dialog_anchor_create_qa_cancel">cancel</string> <string name="dialog_anchor_create_qa_cancel">cancel</string>
<string name="dialog_anchor_create_qa_question">question:</string> <string name="dialog_anchor_create_qa_question">question:</string>
@ -1328,7 +1328,7 @@ Limited ride And limited avatar frame</string>
<string name="live_user_dialog_tips">say something</string> <string name="live_user_dialog_tips">say something</string>
<string name="live_free_pk_empty_tips">No match was found</string> <string name="live_free_pk_empty_tips">No match was found</string>
<string name="live_gift_dialog_select_add">Add</string> <string name="live_gift_dialog_select_add">Add</string>
<string name="interactive_game">Interactive Games</string> <string name="interactive_game">Interaction Game</string>
<string name="interactive_game_room_list">Room list</string> <string name="interactive_game_room_list">Room list</string>
<string name="interactive_game_room_game">Game:</string> <string name="interactive_game_room_game">Game:</string>
<string name="interactive_game_room_game_all">All</string> <string name="interactive_game_room_game_all">All</string>
@ -1476,4 +1476,7 @@ Limited ride And limited avatar frame</string>
<string name="activity_msg_list_title_chat_records">Chat Records</string> <string name="activity_msg_list_title_chat_records">Chat Records</string>
<string name="live_open_wishlive_tips">Set the following functions to receive more rewards</string> <string name="live_open_wishlive_tips">Set the following functions to receive more rewards</string>
<string name="live_open">Get Started</string> <string name="live_open">Get Started</string>
<string name="live_interaction_Interaction">Interaction</string>
<string name="live_interaction_broadcaster_rights">Broadcaster Rights</string>
<string name="live_interaction_tools">Live streaming tools</string>
</resources> </resources>

View File

@ -217,7 +217,7 @@
<string name="live_cover">直播封面</string> <string name="live_cover">直播封面</string>
<string name="live_cover_2">更換封面</string> <string name="live_cover_2">更換封面</string>
<string name="live_title">直播標題</string> <string name="live_title">直播標題</string>
<string name="live_title_hint">給直播寫個標題吧</string> <string name="live_title_hint">給直播寫個標題吧~</string>
<string name="live_class">選擇頻道</string> <string name="live_class">選擇頻道</string>
<string name="live_class_choose">選擇直播頻道</string> <string name="live_class_choose">選擇直播頻道</string>
<string name="live_class_tip_title">注意選擇適合自己的頻道。</string> <string name="live_class_tip_title">注意選擇適合自己的頻道。</string>
@ -1606,5 +1606,8 @@
<string name="live_end_view_ban_timer">處罰時間:</string> <string name="live_end_view_ban_timer">處罰時間:</string>
<string name="live_open_wishlive_tips">添加以下設定將有機會獲得更多收益</string> <string name="live_open_wishlive_tips">添加以下設定將有機會獲得更多收益</string>
<string name="live_open">馬上開播!</string> <string name="live_open">馬上開播!</string>
<string name="live_interaction_Interaction">互動</string>
<string name="live_interaction_broadcaster_rights">主播權益</string>
<string name="live_interaction_tools">直播工具</string>
</resources> </resources>

View File

@ -214,8 +214,8 @@
<string name="live_cover">Live cover</string> <string name="live_cover">Live cover</string>
<string name="live_cover_2">Change cover</string> <string name="live_cover_2">Change cover</string>
<string name="live_title">Live broadcast title</string> <string name="live_title">Live broadcast title</string>
<string name="live_title_hint">Write a title for the live broadcast</string> <string name="live_title_hint">Please write a title for the live broadcast room</string>
<string name="live_class">channel</string> <string name="live_class">Select Channel</string>
<string name="live_class_choose">Select live channel</string> <string name="live_class_choose">Select live channel</string>
<string name="live_class_tip">During the live broadcast, if the operator finds that the selected channel does not match the live content, he / she will adjust your live channel.</string> <string name="live_class_tip">During the live broadcast, if the operator finds that the selected channel does not match the live content, he / she will adjust your live channel.</string>
<string name="live_set_pwd">Please set room password</string> <string name="live_set_pwd">Please set room password</string>
@ -234,9 +234,9 @@
<string name="live_camera">Flip</string> <string name="live_camera">Flip</string>
<string name="live_zg">Trickster</string> <string name="live_zg">Trickster</string>
<string name="live_dr">MultiplayerPK</string> <string name="live_dr">MultiplayerPK</string>
<string name="live_mic">Voice Link</string> <string name="live_mic">Voice connection</string>
<string name="live_wks">billboard</string> <string name="live_wks">billboard</string>
<string name="live_zslk">LeaveTemporarily</string> <string name="live_zslk">leave temporarily</string>
<string name="live_zslk1">ResumeLive</string> <string name="live_zslk1">ResumeLive</string>
<string name="live_share">share</string> <string name="live_share">share</string>
<string name="live_link_pk">SinglePK</string> <string name="live_link_pk">SinglePK</string>
@ -837,10 +837,10 @@ Limited ride And limited avatar frame</string>
<string name="ultra_hd">Ultra hd</string> <string name="ultra_hd">Ultra hd</string>
<string name="clarity_hint">After determining the definition of the broadcast, you need to restart the broadcast to change</string> <string name="clarity_hint">After determining the definition of the broadcast, you need to restart the broadcast to change</string>
<string name="confirmation_of_broadcast">Confirmation of broadcast Settings</string> <string name="confirmation_of_broadcast">Confirmation of broadcast Settings</string>
<string name="clarity">clarity</string> <string name="clarity">Clarity</string>
<string name="live_class1">Live channel</string> <string name="live_class1">Live channel</string>
<string name="broadcast">broadcast</string> <string name="broadcast">broadcast</string>
<string name="robot">robot</string> <string name="robot">Robot</string>
<string name="do_set">set</string> <string name="do_set">set</string>
<string name="not_set">Not set</string> <string name="not_set">Not set</string>
<string name="robot_no">no</string> <string name="robot_no">no</string>
@ -951,7 +951,7 @@ Limited ride And limited avatar frame</string>
<string name="live_language_setting">language setting</string> <string name="live_language_setting">language setting</string>
<string name="traditional_chinese">Traditional Chinese</string> <string name="traditional_chinese">Traditional Chinese</string>
<string name="add_gift2">Add gifts, nobles, and guardian wishes</string> <string name="add_gift2">Add gifts, nobles, and guardian wishes</string>
<string name="live_fun_anchor_say">GoddessSaid</string> <string name="live_fun_anchor_say">goddess say</string>
<string name="live_fun_call_me">Contact information</string> <string name="live_fun_call_me">Contact information</string>
<string name="unfollow_cancel">unfollow</string> <string name="unfollow_cancel">unfollow</string>
<string name="unfollow"> Where is the host doing badly~\nBrother, are you sure you want to unfollow?</string> <string name="unfollow"> Where is the host doing badly~\nBrother, are you sure you want to unfollow?</string>
@ -987,7 +987,7 @@ Limited ride And limited avatar frame</string>
<string name="dialog_live_gift_open_noble">VIP</string> <string name="dialog_live_gift_open_noble">VIP</string>
<string name="dialog_live_gift_open_guard">Open Guard</string> <string name="dialog_live_gift_open_guard">Open Guard</string>
<string name="dialog_live_gift_open_fans">Open Fan group</string> <string name="dialog_live_gift_open_fans">Open Fan group</string>
<string name="dialog_live_function_qa">QA</string> <string name="dialog_live_function_qa">Ask a question</string>
<string name="dialog_anchor_create_qa_submit">submit</string> <string name="dialog_anchor_create_qa_submit">submit</string>
<string name="dialog_anchor_create_qa_cancel">cancel</string> <string name="dialog_anchor_create_qa_cancel">cancel</string>
<string name="dialog_anchor_create_qa_question">question:</string> <string name="dialog_anchor_create_qa_question">question:</string>
@ -1153,7 +1153,7 @@ Limited ride And limited avatar frame</string>
<string name="live_user_dialog_tips">say something</string> <string name="live_user_dialog_tips">say something</string>
<string name="live_free_pk_empty_tips">No match was found</string> <string name="live_free_pk_empty_tips">No match was found</string>
<string name="live_gift_dialog_select_add">Add</string> <string name="live_gift_dialog_select_add">Add</string>
<string name="interactive_game">Interactive Games</string> <string name="interactive_game">Interaction Game</string>
<string name="interactive_game_room_list">Room list</string> <string name="interactive_game_room_list">Room list</string>
<string name="interactive_game_room_game">Game:</string> <string name="interactive_game_room_game">Game:</string>
<string name="interactive_game_room_sill">Threshold:</string> <string name="interactive_game_room_sill">Threshold:</string>
@ -1414,5 +1414,8 @@ Limited ride And limited avatar frame</string>
<string name="dialog_gift_wall_text_honors">Honors</string> <string name="dialog_gift_wall_text_honors">Honors</string>
<string name="live_open_wishlive_tips">Set the following functions to receive more rewards</string> <string name="live_open_wishlive_tips">Set the following functions to receive more rewards</string>
<string name="live_open">Get Started</string> <string name="live_open">Get Started</string>
<string name="live_interaction_Interaction">Interaction</string>
<string name="live_interaction_broadcaster_rights">Broadcaster Rights</string>
<string name="live_interaction_tools">Live streaming tools</string>
</resources> </resources>

View File

@ -94,8 +94,10 @@ import com.yunbao.live.bean.LiveReceiveGiftBean;
import com.yunbao.live.bean.NewAllServerNotifyGuardEvent; import com.yunbao.live.bean.NewAllServerNotifyGuardEvent;
import com.yunbao.live.dialog.FreePkDialogFragment; import com.yunbao.live.dialog.FreePkDialogFragment;
import com.yunbao.live.dialog.LiveInputDialogFragment; import com.yunbao.live.dialog.LiveInputDialogFragment;
import com.yunbao.live.dialog.LiveInteractionDialogFragment;
import com.yunbao.live.dialog.LiveNewFunctionDialogFragment; import com.yunbao.live.dialog.LiveNewFunctionDialogFragment;
import com.yunbao.live.dialog.LivePrankDialogFragment; import com.yunbao.live.dialog.LivePrankDialogFragment;
import com.yunbao.live.dialog.LiveTaskDialog;
import com.yunbao.live.dialog.LiveWishListDialogFragment4Audience; import com.yunbao.live.dialog.LiveWishListDialogFragment4Audience;
import com.yunbao.live.dialog.RandomPkDialogFragment; import com.yunbao.live.dialog.RandomPkDialogFragment;
import com.yunbao.live.event.LinkMicTxMixStreamEvent; import com.yunbao.live.event.LinkMicTxMixStreamEvent;
@ -710,6 +712,38 @@ public class LiveSwAnchorActivity extends LiveActivity implements LiveFunctionCl
fragment.show(getSupportFragmentManager(), "LiveFunctionDialogFragment"); fragment.show(getSupportFragmentManager(), "LiveFunctionDialogFragment");
} }
/**
* 打开主播任务弹窗
*/
public void showTaskDialog() {
LiveTaskDialog taskDialog = new LiveTaskDialog(mContext);
taskDialog.setLiveUid(mLiveUid);
taskDialog.updateLiveTimer(mLiveAnchorViewHolder.getmAnchorLiveTime());
taskDialog.showDialog();
}
/**
* 打开功能栏
*/
public void showMenuDialog(boolean isInteraction) {
LiveInteractionDialogFragment fragment = new LiveInteractionDialogFragment();
Bundle bundle = new Bundle();
boolean hasGame = false;
if (CommonAppConfig.GAME_ENABLE && mGameList != null) {
hasGame = mGameList.size() > 0;
}
bundle.putBoolean(Constants.HAS_GAME, hasGame);
bundle.putInt("leave", leave);
bundle.putString("liveUid", mLiveUid);
bundle.putBoolean("isPk", isDRPK == 1 || PKing || mLivePushViewHolder.isPking());
bundle.putBoolean(Constants.OPEN_FLASH, mLivePushViewHolder != null && mLivePushViewHolder.isFlashOpen());
bundle.putBoolean("isShowZgRed",mLiveAnchorViewHolder.isShowMenuRed());
bundle.putBoolean("isInteraction",isInteraction);
fragment.setArguments(bundle);
fragment.setFunctionClickListener(this);
fragment.show(getSupportFragmentManager(), "LiveInteractionDialogFragment");
}
/** /**
* 打开主播连麦窗口 * 打开主播连麦窗口
*/ */

View File

@ -0,0 +1,282 @@
package com.yunbao.live.dialog;
import static com.yunbao.common.Constants.LIVE_FUNC_BEAUTY;
import static com.yunbao.common.Constants.LIVE_FUNC_CAMERA;
import static com.yunbao.common.Constants.LIVE_FUNC_MIC;
import static com.yunbao.common.Constants.LIVE_FUNC_WISHLIST;
import static com.yunbao.common.Constants.LIVE_FUNC_ZG;
import static com.yunbao.common.Constants.LIVE_FUNC_ZSLK;
import static com.yunbao.common.Constants.LIVE_ROBOT;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.os.SystemClock;
import android.view.Gravity;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.lxj.xpopup.XPopup;
import com.yunbao.common.Constants;
import com.yunbao.common.bean.CustomSidebarInfoModel;
import com.yunbao.common.bean.LiveAnchorSayModel;
import com.yunbao.common.dialog.AbsDialogFragment;
import com.yunbao.common.dialog.SudGameListPopup;
import com.yunbao.common.http.base.HttpCallback;
import com.yunbao.common.http.live.LiveNetManager;
import com.yunbao.common.interfaces.OnItemClickListener;
import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.utils.WordUtil;
import com.yunbao.common.views.LiveAnchorMessageCustomPopup;
import com.yunbao.live.R;
import com.yunbao.live.activity.LiveRyAnchorActivity;
import com.yunbao.live.activity.LiveSwAnchorActivity;
import com.yunbao.live.interfaces.LiveFunctionClickListener;
import java.util.List;
/**
* Created by cxf on 2018/10/9.
*/
public class LiveInteractionDialogFragment extends AbsDialogFragment implements View.OnClickListener {
private View mWishView, mPrankView, mBeautyView, mCameraView, mLeaveView, mMicView,liveToolLiveData;
private LiveFunctionClickListener mFunctionClickListener;
private int leave = 0;
private boolean isPk;
private LinearLayout equityLayout,interactionLayout;
private String liveUid;
private boolean isInteraction;
// boolean isRy = false;
private boolean isShowRed;
@Override
protected int getLayoutId() {
return R.layout.dialog_live_interaction;
}
@Override
protected int getDialogStyle() {
return R.style.dialog2;
}
@Override
protected boolean canCancel() {
return true;
}
@Override
protected void setWindowAttributes(Window window) {
window.setWindowAnimations(R.style.bottomToTopAnim);
WindowManager.LayoutParams params = window.getAttributes();
params.width = WindowManager.LayoutParams.MATCH_PARENT;
params.height = WindowManager.LayoutParams.WRAP_CONTENT;
params.gravity = Gravity.BOTTOM;
window.setAttributes(params);
}
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
boolean hasGame = false;
boolean openFlash = false;
Bundle bundle = getArguments();
if (bundle != null) {
hasGame = bundle.getBoolean(Constants.HAS_GAME, false);
openFlash = bundle.getBoolean(Constants.OPEN_FLASH, false);
leave = bundle.getInt("leave", 0);
isPk = bundle.getBoolean("isPk", false);
// isRy = bundle.getBoolean("isRy", false);
mAnchorLiveTime = bundle.getLong("liveTime");
liveUid = bundle.getString("liveUid");
isShowRed = bundle.getBoolean("isShowZgRed");
isInteraction = bundle.getBoolean("isInteraction",false);
}
equityLayout= (LinearLayout) findViewById(R.id.equityLayout);
interactionLayout= (LinearLayout) findViewById(R.id.interactionLayout);
if(isInteraction){
interactionLayout.setVisibility(View.VISIBLE);
equityLayout.setVisibility(View.GONE);
}else{
interactionLayout.setVisibility(View.GONE);
equityLayout.setVisibility(View.VISIBLE);
}
mWishView = findViewById(R.id.live_tool_wish);
mPrankView = findViewById(R.id.live_tool_prank);
mBeautyView = findViewById(R.id.live_tool_beauty);
mCameraView = findViewById(R.id.live_tool_camera);
mLeaveView = findViewById(R.id.live_tool_leave);
mMicView = findViewById(R.id.live_tool_mic);
liveToolLiveData = findViewById(R.id.live_tool_live_data);
mWishView.setOnClickListener(this);
mPrankView.setOnClickListener(this);
mBeautyView.setOnClickListener(this);
mCameraView.setOnClickListener(this);
mLeaveView.setOnClickListener(this);
mMicView.setOnClickListener(this);
liveToolLiveData.setOnClickListener(this);
findViewById(R.id.live_tool_robot).setOnClickListener(this);
findViewById(R.id.live_tool_anchor_say).setOnClickListener(this);
findViewById(R.id.live_tool_qa).setOnClickListener(this);
findViewById(R.id.live_tool_game).setOnClickListener(this);
if (leave == 0) {
((ImageView) mLeaveView.findViewById(R.id.live_tool_leave_img)).setImageResource(R.mipmap.icon_leave);
((TextView) mLeaveView.findViewById(R.id.live_tool_leave_text)).setText(mContext.getString(R.string.live_zslk));
} else {
((ImageView) mLeaveView.findViewById(R.id.live_tool_leave_img)).setImageResource(R.mipmap.icon_leave_p);
((TextView) mLeaveView.findViewById(R.id.live_tool_leave_text)).setText(mContext.getString(R.string.live_zslk1));
}
mLiveRoomHandler = new LiveRoomHandler();
startAnchorLiveTime();
}
public void setFunctionClickListener(LiveFunctionClickListener functionClickListener) {
mFunctionClickListener = functionClickListener;
}
@Override
public void onDestroy() {
// if(isRy == false) {
// ((LiveAnchorActivity) mContext).setBtnFunctionDark();
// }else{
if (mContext instanceof LiveSwAnchorActivity) {
((LiveSwAnchorActivity) mContext).setBtnFunctionDark();
} else {
((LiveRyAnchorActivity) mContext).setBtnFunctionDark();
}
// }
super.onDestroy();
}
@Override
public void onClick(View view) {
dismiss();
int id = view.getId();
if (id == R.id.live_tool_wish) {
mFunctionClickListener.onClick(LIVE_FUNC_WISHLIST);
} else if (id == R.id.live_tool_prank) {
mFunctionClickListener.onClick(LIVE_FUNC_ZG);
} else if (id == R.id.live_tool_beauty) {
mFunctionClickListener.onClick(LIVE_FUNC_BEAUTY);
} else if (id == R.id.live_tool_camera) {
mFunctionClickListener.onClick(LIVE_FUNC_CAMERA);
} else if (id == R.id.live_tool_leave) {
if (isPk) {
ToastUtil.show(WordUtil.isNewZh() ? "PK中禁止离开" : "Do not leave in PK");
return;
}
mFunctionClickListener.onClick(LIVE_FUNC_ZSLK);
} else if (id == R.id.live_tool_mic) {
mFunctionClickListener.onClick(LIVE_FUNC_MIC);
}else if(id == R.id.live_tool_live_data) {
//主播数据
new LiveDataInfoDialog(mContext, liveUid).showDialog();
dismiss();
}else if (id == R.id.live_tool_robot) {
mFunctionClickListener.onClick(LIVE_ROBOT);
dismiss();
} else if (id == R.id.message_linear) {
new XPopup.Builder(getContext()).asCustom(new LiveAnchorMessageCustomPopup(getContext(), liveUid)).show();
dismiss();
} else if (id == R.id.broadcast_data) {
//主播数据
new LiveDataInfoDialog(mContext, liveUid).showDialog();
dismiss();
} else if (id == R.id.anchor_task) {
//主播任务
taskDialog = new LiveTaskDialog(mContext);
taskDialog.setLiveUid(liveUid);
taskDialog.updateLiveTimer(mAnchorLiveTime);
taskDialog.showDialog();
} else if (id == R.id.live_tool_call_me) {
new LiveAnchorEditCallMeDialog(mContext).setLiveUid(liveUid).showDialog();
} else if (id == R.id.live_tool_anchor_say) {
new LiveAnchorSayPopDialog(mContext).setLiveUid(liveUid).setOnItemClickListener(new OnItemClickListener<LiveAnchorSayModel>() {
@Override
public void onItemClick(LiveAnchorSayModel bean, int position) {
mLiveRoomHandler.postDelayed(new Runnable() {
@Override
public void run() {
if (mContext instanceof LiveSwAnchorActivity) {
((LiveSwAnchorActivity) (mContext)).mLiveRoomViewHolder.initAnchorSayData();
} else {
((LiveRyAnchorActivity) (mContext)).mLiveRoomViewHolder.initAnchorSayData();
}
}
}, 1000);
}
}).showDialog();
} else if (id == R.id.live_tool_qa) {
new LiveAnchorCreateQADialog(mContext).setLiveUid(liveUid).showDialog();
} else if (id == R.id.live_tool_game) {
LiveNetManager.get(mContext).getCustomSidebarInfo("1", new HttpCallback<List<CustomSidebarInfoModel>>() {
@Override
public void onSuccess(List<CustomSidebarInfoModel> data) {
for (CustomSidebarInfoModel datum : data) {
if (datum.getType().equals("6")) {
//直播间来的
new XPopup.Builder(mContext).enableDrag(false).moveUpToKeyboard(false)
// .dismissOnTouchOutside(false)
// .dismissOnBackPressed(false)
.asCustom(new SudGameListPopup(mContext, 0, datum.getChild(), liveUid))
.show();
return;
}
}
}
@Override
public void onError(String error) {
}
});
dismiss();
}
}
private final int WHAT_ANCHOR_LIVE_TIME = 3;//直播间主播计时
private LiveRoomHandler mLiveRoomHandler;
private long mAnchorLiveTime;//主播直播时间
private LiveTaskDialog taskDialog;
public void startAnchorLiveTime() {
if (mLiveRoomHandler != null) {
mLiveRoomHandler.sendEmptyMessageAtTime(WHAT_ANCHOR_LIVE_TIME, getNextTime(1000));
}
}
private class LiveRoomHandler extends Handler {
@Override
public void handleMessage(Message msg) {
switch (msg.what) {
case WHAT_ANCHOR_LIVE_TIME:
break;
}
}
public void release() {
removeCallbacksAndMessages(null);
}
}
private long getNextTime(int time) {
long now = SystemClock.uptimeMillis();
if (time < 1000) {
return now + time;
}
return now + time + -now % 1000;
}
}

View File

@ -14,25 +14,33 @@ import android.os.Looper;
import android.text.Html; import android.text.Html;
import android.text.TextUtils; import android.text.TextUtils;
import android.util.Log; import android.util.Log;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.view.inputmethod.InputMethodManager; import android.view.inputmethod.InputMethodManager;
import android.widget.EditText; import android.widget.EditText;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView; import android.widget.TextView;
import android.widget.ViewFlipper;
import androidx.constraintlayout.widget.ConstraintLayout; import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.core.content.ContextCompat; import androidx.core.content.ContextCompat;
import com.alibaba.fastjson.JSON;
import com.lxj.xpopup.XPopup; import com.lxj.xpopup.XPopup;
import com.lxj.xpopup.core.BasePopupView; import com.lxj.xpopup.core.BasePopupView;
import com.lxj.xpopup.interfaces.XPopupCallback; import com.lxj.xpopup.interfaces.XPopupCallback;
import com.yunbao.common.CommonAppConfig; import com.yunbao.common.CommonAppConfig;
import com.yunbao.common.Constants; import com.yunbao.common.Constants;
import com.yunbao.common.activity.WebViewActivity;
import com.yunbao.common.bean.HotStrategyBean;
import com.yunbao.common.bean.IMLoginModel; import com.yunbao.common.bean.IMLoginModel;
import com.yunbao.common.bean.LiveAnchorCallMeModel; import com.yunbao.common.bean.LiveAnchorCallMeModel;
import com.yunbao.common.bean.LiveAnchorSayModel; import com.yunbao.common.bean.LiveAnchorSayModel;
import com.yunbao.common.bean.LiveClassBean; import com.yunbao.common.bean.LiveClassBean;
import com.yunbao.common.bean.LiveOpenTipsBean;
import com.yunbao.common.bean.LiveRoomTypeBean; import com.yunbao.common.bean.LiveRoomTypeBean;
import com.yunbao.common.bean.UserBean; import com.yunbao.common.bean.UserBean;
import com.yunbao.common.event.LiveNewWishListCloseEvent; import com.yunbao.common.event.LiveNewWishListCloseEvent;
@ -41,12 +49,14 @@ import com.yunbao.common.glide.ImgLoader;
import com.yunbao.common.http.HttpCallback; import com.yunbao.common.http.HttpCallback;
import com.yunbao.common.http.LiveHttpConsts; import com.yunbao.common.http.LiveHttpConsts;
import com.yunbao.common.http.LiveHttpUtil; import com.yunbao.common.http.LiveHttpUtil;
import com.yunbao.common.http.live.LiveNetManager;
import com.yunbao.common.interfaces.CommonCallback; import com.yunbao.common.interfaces.CommonCallback;
import com.yunbao.common.interfaces.ImageResultCallback; import com.yunbao.common.interfaces.ImageResultCallback;
import com.yunbao.common.interfaces.OnItemClickListener; import com.yunbao.common.interfaces.OnItemClickListener;
import com.yunbao.common.manager.IMLoginManager; import com.yunbao.common.manager.IMLoginManager;
import com.yunbao.common.utils.Bus; import com.yunbao.common.utils.Bus;
import com.yunbao.common.utils.DialogUitl; import com.yunbao.common.utils.DialogUitl;
import com.yunbao.common.utils.DpUtil;
import com.yunbao.common.utils.L; import com.yunbao.common.utils.L;
import com.yunbao.common.utils.ProcessImageUtil; import com.yunbao.common.utils.ProcessImageUtil;
import com.yunbao.common.utils.RouteUtil; import com.yunbao.common.utils.RouteUtil;
@ -76,6 +86,7 @@ import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode; import org.greenrobot.eventbus.ThreadMode;
import java.io.File; import java.io.File;
import java.util.List;
import java.util.Locale; import java.util.Locale;
import io.agora.beautyapi.faceunity.agora.SWManager; import io.agora.beautyapi.faceunity.agora.SWManager;
@ -104,6 +115,7 @@ public class LiveNewReadySwViewHolder extends AbsViewHolder implements View.OnCl
private LiveOpenCustomPopup liveOpenCustomPopup; private LiveOpenCustomPopup liveOpenCustomPopup;
private boolean selector = true; private boolean selector = true;
private String mLiveUid; private String mLiveUid;
private ViewFlipper liveOpenVf;
public LiveNewReadySwViewHolder(Context context, ViewGroup parentView, int liveSdk) { public LiveNewReadySwViewHolder(Context context, ViewGroup parentView, int liveSdk) {
super(context, parentView, liveSdk); super(context, parentView, liveSdk);
@ -134,7 +146,7 @@ public class LiveNewReadySwViewHolder extends AbsViewHolder implements View.OnCl
imm.hideSoftInputFromWindow(view.getWindowToken(), 0); imm.hideSoftInputFromWindow(view.getWindowToken(), 0);
} }
}); });
liveOpenVf = findViewById(R.id.live_open_vf);
mAvatar = (ConstraintLayout) findViewById(R.id.avatar); mAvatar = (ConstraintLayout) findViewById(R.id.avatar);
mAvatar.setOnClickListener(this); mAvatar.setOnClickListener(this);
UserBean u = CommonAppConfig.getInstance().getUserBean(); UserBean u = CommonAppConfig.getInstance().getUserBean();
@ -297,6 +309,37 @@ public class LiveNewReadySwViewHolder extends AbsViewHolder implements View.OnCl
selectorProtocol.setSelected(selector); selectorProtocol.setSelected(selector);
} }
}); });
//获取开播提示信息
getOpenLiveTips();
}
private void getOpenLiveTips() {
LiveNetManager.get(mContext).getLiveOpenTips(new com.yunbao.common.http.base.HttpCallback<List<LiveOpenTipsBean>>() {
@Override
public void onSuccess(List<LiveOpenTipsBean> data) {
if(data!=null){
for (int i = 0; i <data.size(); i++) {
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(DpUtil.dp2px(16), DpUtil.dp2px(16));
LinearLayout.LayoutParams textParams = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
textParams.leftMargin = DpUtil.dp2px(5);
textParams.rightMargin = DpUtil.dp2px(5);
params.leftMargin = DpUtil.dp2px(5);
View weekView = LayoutInflater.from(mContext).inflate(R.layout.view_live_open_tips, null);
TextView week = weekView.findViewById(R.id.wish_index);
week.setLayoutParams(textParams);
week.setGravity(Gravity.CENTER_VERTICAL);
week.setText(WordUtil.isNewZh()?data.get(i).getContent():data.get(i).getEnglish_content());
liveOpenVf.addView(weekView);
}
liveOpenVf.startFlipping();
}
}
@Override
public void onError(String error) {
}
});
} }
public void setManager(FaceManager manager) { public void setManager(FaceManager manager) {

View File

@ -26,6 +26,7 @@ import androidx.core.content.ContextCompat;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.blankj.utilcode.util.GsonUtils; import com.blankj.utilcode.util.GsonUtils;
import com.google.gson.Gson; import com.google.gson.Gson;
import com.lxj.xpopup.XPopup;
import com.ms.banner.Banner; import com.ms.banner.Banner;
import com.ms.banner.BannerConfig; import com.ms.banner.BannerConfig;
import com.ms.banner.listener.OnBannerClickListener; import com.ms.banner.listener.OnBannerClickListener;
@ -45,12 +46,14 @@ import com.yunbao.common.utils.L;
import com.yunbao.common.utils.StringUtil; import com.yunbao.common.utils.StringUtil;
import com.yunbao.common.utils.ToastUtil; import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.utils.WordUtil; import com.yunbao.common.utils.WordUtil;
import com.yunbao.common.views.LiveAnchorMessageCustomPopup;
import com.yunbao.live.R; import com.yunbao.live.R;
import com.yunbao.live.activity.LiveRyAnchorActivity; import com.yunbao.live.activity.LiveRyAnchorActivity;
import com.yunbao.live.activity.LiveSwAnchorActivity; import com.yunbao.live.activity.LiveSwAnchorActivity;
import com.yunbao.live.activity.ZhuangBanActivity; import com.yunbao.live.activity.ZhuangBanActivity;
import com.yunbao.live.bean.WishlistModel; import com.yunbao.live.bean.WishlistModel;
import com.yunbao.live.dialog.LiveHDDialogFragment; import com.yunbao.live.dialog.LiveHDDialogFragment;
import com.yunbao.live.dialog.LiveTaskDialog;
import com.yunbao.live.event.LiveAudienceEvent; import com.yunbao.live.event.LiveAudienceEvent;
import org.greenrobot.eventbus.Subscribe; import org.greenrobot.eventbus.Subscribe;
@ -69,10 +72,7 @@ import java.util.Map;
public class LiveRyAnchorViewHolder extends AbsLiveViewHolder { public class LiveRyAnchorViewHolder extends AbsLiveViewHolder {
private ImageView mBtnFunction; private ImageView mBtnFunction;
private View mBtnGameClose;//关闭游戏的按钮
private View mBtnPk;//主播连麦pk按钮 private View mBtnPk;//主播连麦pk按钮
private Drawable mDrawable0;
private Drawable mDrawable1;
private Drawable mDrawableLinkMic0;//允许连麦 private Drawable mDrawableLinkMic0;//允许连麦
private Drawable mDrawableLinkMic1;//禁止连麦 private Drawable mDrawableLinkMic1;//禁止连麦
private ImageView mLinkMicIcon;//是否允许连麦的标记 private ImageView mLinkMicIcon;//是否允许连麦的标记
@ -130,18 +130,12 @@ public class LiveRyAnchorViewHolder extends AbsLiveViewHolder {
public void init() { public void init() {
super.init(); super.init();
Bus.getOn(this); Bus.getOn(this);
mDrawable0 = ContextCompat.getDrawable(mContext, R.mipmap.icon_live_func_0);
mDrawable1 = ContextCompat.getDrawable(mContext, R.mipmap.icon_live_func_1);
btn_end_pk_dr = (LinearLayout) findViewById(R.id.btn_end_pk_dr); btn_end_pk_dr = (LinearLayout) findViewById(R.id.btn_end_pk_dr);
mBtnFunction = (ImageView) findViewById(R.id.btn_function); mBtnFunction = (ImageView) findViewById(R.id.btn_function);
leaveImg = (ImageView) findViewById(R.id.leave_img); leaveImg = (ImageView) findViewById(R.id.leave_img);
btn_dr = (TextView) findViewById(R.id.btn_dr); btn_dr = (TextView) findViewById(R.id.btn_dr);
mBanner = (Banner) findViewById(R.id.banner); mBanner = (Banner) findViewById(R.id.banner);
mBtnFunction.setImageDrawable(mDrawable0);
mBtnFunction.setOnClickListener(this); mBtnFunction.setOnClickListener(this);
mBtnGameClose = findViewById(R.id.btn_close_game);
mBtnGameClose.setOnClickListener(this);
findViewById(R.id.btn_close).setOnClickListener(this);
mBtnPk = findViewById(R.id.btn_pk); mBtnPk = findViewById(R.id.btn_pk);
mBtnPk.setOnClickListener(this); mBtnPk.setOnClickListener(this);
mDrawableLinkMic0 = ContextCompat.getDrawable(mContext, R.mipmap.icon_live_link_mic); mDrawableLinkMic0 = ContextCompat.getDrawable(mContext, R.mipmap.icon_live_link_mic);
@ -160,20 +154,18 @@ public class LiveRyAnchorViewHolder extends AbsLiveViewHolder {
ToastUtil.show("多人PK次数已用完"); ToastUtil.show("多人PK次数已用完");
} else { } else {
//開始多人PK //開始多人PK
HttpClient.getInstance().get("live.startDRPK", "live.startDRPK") HttpClient.getInstance().get("live.startDRPK", "live.startDRPK").params("roomid", CommonAppConfig.getInstance().getUid()).execute(new HttpCallback() {
.params("roomid", CommonAppConfig.getInstance().getUid()) @Override
.execute(new HttpCallback() { public void onSuccess(int code, String msg, String[] info) {
@Override if (code == 0) {
public void onSuccess(int code, String msg, String[] info) { PKing = true;
if (code == 0) { pk_nub = pk_nub - 1;
PKing = true; btn_dr_pk_nub.setText("剩餘次數:" + pk_nub);
pk_nub = pk_nub - 1; } else {
btn_dr_pk_nub.setText("剩餘次數:" + pk_nub); ToastUtil.show(msg);
} else { }
ToastUtil.show(msg); }
} });
}
});
} }
} }
}); });
@ -182,17 +174,14 @@ public class LiveRyAnchorViewHolder extends AbsLiveViewHolder {
btn_end_pk.setOnClickListener(new View.OnClickListener() { btn_end_pk.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View view) { public void onClick(View view) {
HttpClient.getInstance().get("live.endDRpk", "live.endDRpk") HttpClient.getInstance().get("live.endDRpk", "live.endDRpk").params("roomid", CommonAppConfig.getInstance().getUid()).execute(new HttpCallback() {
.params("roomid", CommonAppConfig.getInstance().getUid()) @Override
.execute(new HttpCallback() { public void onSuccess(int code, String msg, String[] info) {
@Override Bus.get().post(new LiveAudienceEvent().setType(LiveAudienceEvent.LiveAudienceType.LEAVE_DR_ROOM));
public void onSuccess(int code, String msg, String[] info) { PKing = false;
Bus.get().post(new LiveAudienceEvent()
.setType(LiveAudienceEvent.LiveAudienceType.LEAVE_DR_ROOM));
PKing = false;
} }
}); });
btn_start_dr_pk_view.setVisibility(View.GONE); btn_start_dr_pk_view.setVisibility(View.GONE);
yaoqing.clear(); yaoqing.clear();
} }
@ -201,16 +190,13 @@ public class LiveRyAnchorViewHolder extends AbsLiveViewHolder {
@Override @Override
public void onClick(View view) { public void onClick(View view) {
closeEndPkBt(); closeEndPkBt();
HttpClient.getInstance().post("live.leaveDRPKroom", "live.leaveDRPKroom") HttpClient.getInstance().post("live.leaveDRPKroom", "live.leaveDRPKroom").params("roomid", drpkRoomId).params("uid", CommonAppConfig.getInstance().getUid()).execute(new HttpCallback() {
.params("roomid", drpkRoomId) @Override
.params("uid", CommonAppConfig.getInstance().getUid()) public void onSuccess(int code, String msg, String[] info) {
.execute(new HttpCallback() { L.eSw("live.leaveDRPKroom:code:" + code + " info" + new Gson().toJson(info));
@Override
public void onSuccess(int code, String msg, String[] info) {
L.eSw("live.leaveDRPKroom:code:" + code + " info" + new Gson().toJson(info));
} }
}); });
} }
}); });
@ -240,6 +226,24 @@ public class LiveRyAnchorViewHolder extends AbsLiveViewHolder {
mLiveRoomHandler = new LiveRoomHandler(); mLiveRoomHandler = new LiveRoomHandler();
menuRed = (TextView) findViewById(R.id.red_menu); menuRed = (TextView) findViewById(R.id.red_menu);
findViewById(R.id.btn_task).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
((LiveSwAnchorActivity) mContext).showTaskDialog();
}
});
findViewById(R.id.btn_fz).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
((LiveSwAnchorActivity) mContext).showMenuDialog(true);
}
});
findViewById(R.id.btn_msg).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
new XPopup.Builder(mContext).asCustom(new LiveAnchorMessageCustomPopup(mContext, mLiveUid)).show();
}
});
} }
private Map<String, String> yaoqing = new HashMap<>(); private Map<String, String> yaoqing = new HashMap<>();
@ -261,39 +265,17 @@ public class LiveRyAnchorViewHolder extends AbsLiveViewHolder {
int i = v.getId(); int i = v.getId();
if (i == R.id.btn_close) { if (i == R.id.btn_close) {
close(); close();
} else if (i == R.id.btn_function) { } else if (i == R.id.btn_function) {
showFunctionDialog(); showFunctionDialog();
} else if (i == R.id.btn_close_game) { } else if (i == R.id.btn_close_game) {
} else if (i == R.id.btn_pk) { } else if (i == R.id.btn_pk) {
applyLinkMicPk(); applyLinkMicPk();
} else if (i == R.id.btn_link_mic) { } else if (i == R.id.btn_link_mic) {
changeLinkMicEnable(); changeLinkMicEnable();
} }
} }
/**
* 设置游戏按钮是否可见
*/
public void setGameBtnVisible(boolean show) {
if (mBtnGameClose != null) {
if (show) {
if (mBtnGameClose.getVisibility() != View.VISIBLE) {
mBtnGameClose.setVisibility(View.VISIBLE);
}
} else {
if (mBtnGameClose.getVisibility() == View.VISIBLE) {
mBtnGameClose.setVisibility(View.INVISIBLE);
}
}
}
}
/** /**
* 关闭直播 * 关闭直播
*/ */
@ -315,14 +297,7 @@ public class LiveRyAnchorViewHolder extends AbsLiveViewHolder {
* 显示功能弹窗 * 显示功能弹窗
*/ */
private void showFunctionDialog() { private void showFunctionDialog() {
if (mBtnFunction != null) { ((LiveSwAnchorActivity) mContext).showMenuDialog(false);
mBtnFunction.setImageDrawable(mDrawable1);
}
if (isSw) {
((LiveSwAnchorActivity) mContext).showFunctionDialog();
} else {
((LiveRyAnchorActivity) mContext).showFunctionDialog();
}
} }
/** /**
@ -330,7 +305,7 @@ public class LiveRyAnchorViewHolder extends AbsLiveViewHolder {
*/ */
public void setBtnFunctionDark() { public void setBtnFunctionDark() {
if (mBtnFunction != null) { if (mBtnFunction != null) {
mBtnFunction.setImageDrawable(mDrawable0); //mBtnFunction.setImageDrawable(mDrawable0);
} }
} }
@ -405,16 +380,7 @@ public class LiveRyAnchorViewHolder extends AbsLiveViewHolder {
public void updateStart(LiveAudienceEvent event) { public void updateStart(LiveAudienceEvent event) {
if (event.getType() == START_MESSAGE) { if (event.getType() == START_MESSAGE) {
MsgModel msgModel = event.getMsgModel(); MsgModel msgModel = event.getMsgModel();
StarChallengeStatusModel model = new StarChallengeStatusModel(activityUrl) StarChallengeStatusModel model = new StarChallengeStatusModel(activityUrl).setTaskNum(msgModel.getTaskNum()).setTaskName1(msgModel.getTaskName1()).setTaskName2(msgModel.getTaskName2()).setStarSrc(msgModel.getStarSrc()).setCurrentStarVal(msgModel.getCurrentStarVal()).setTargetStarVal(msgModel.getTargetStarVal()).setAssistSrc(msgModel.getAssistSrc()).setTargetAssistNum(msgModel.getTargetAssistNum()).setCurrentAssistNum(msgModel.getCurrentAssistNum());
.setTaskNum(msgModel.getTaskNum())
.setTaskName1(msgModel.getTaskName1())
.setTaskName2(msgModel.getTaskName2())
.setStarSrc(msgModel.getStarSrc())
.setCurrentStarVal(msgModel.getCurrentStarVal())
.setTargetStarVal(msgModel.getTargetStarVal())
.setAssistSrc(msgModel.getAssistSrc())
.setTargetAssistNum(msgModel.getTargetAssistNum())
.setCurrentAssistNum(msgModel.getCurrentAssistNum());
Log.i("测试", "更新星级任务=" + model); Log.i("测试", "更新星级任务=" + model);
showStart(model); showStart(model);
} else if (event.getType() == WISH_LIST_UPDATE) { } else if (event.getType() == WISH_LIST_UPDATE) {
@ -423,21 +389,20 @@ public class LiveRyAnchorViewHolder extends AbsLiveViewHolder {
} }
public void initStarData() { public void initStarData() {
LiveNetManager.get(mContext) LiveNetManager.get(mContext).getStarChallengeStatus(mLiveUid, new com.yunbao.common.http.base.HttpCallback<StarChallengeStatusModel>() {
.getStarChallengeStatus(mLiveUid, new com.yunbao.common.http.base.HttpCallback<StarChallengeStatusModel>() { @Override
@Override public void onSuccess(StarChallengeStatusModel data1) {
public void onSuccess(StarChallengeStatusModel data1) { activityUrl = data1.getActivityUrl();
activityUrl = data1.getActivityUrl(); showStart(data1);
showStart(data1); Log.e("PortraitLiveManager", data1.toString());
Log.e("PortraitLiveManager", data1.toString()); }
}
@Override @Override
public void onError(String error) { public void onError(String error) {
Log.e("PortraitLiveManager", error); Log.e("PortraitLiveManager", error);
ToastUtil.show(mContext.getString(R.string.net_error)); ToastUtil.show(mContext.getString(R.string.net_error));
} }
}); });
} }
public void initWishList() { public void initWishList() {
@ -535,124 +500,67 @@ public class LiveRyAnchorViewHolder extends AbsLiveViewHolder {
public void showBanner() { public void showBanner() {
if (mBannerList != null && mBanner != null) { if (mBannerList != null && mBanner != null) {
if (mBannerList.size() == 1) { if (mBannerList.size() == 1) {
mBanner.setAutoPlay(false) mBanner.setAutoPlay(false).setPages(mBannerList, new CustomViewHolder()).setDelayTime(3200).setBannerStyle(BannerConfig.NOT_INDICATOR).setOnBannerClickListener(new OnBannerClickListener() {
.setPages(mBannerList, new CustomViewHolder()) @Override
.setDelayTime(3200) public void onBannerClick(List datas, int p) {
.setBannerStyle(BannerConfig.NOT_INDICATOR) if (mBannerList != null) {
.setOnBannerClickListener(new OnBannerClickListener() { if (p >= 0 && p < mBannerList.size()) {
@Override IMLoginModel userInfo = IMLoginManager.get(mContext).getUserInfo();
public void onBannerClick(List datas, int p) { BannerBean bean = mBannerList.get(p);
if (mBannerList != null) { String type = "";
if (p >= 0 && p < mBannerList.size()) { StringBuffer htmlUrl = new StringBuffer();
IMLoginModel userInfo = IMLoginManager.get(mContext).getUserInfo(); //判断是否是星级活动
BannerBean bean = mBannerList.get(p); if (bean.isStart()) {
String type = ""; type = bean.getModel().getType();
StringBuffer htmlUrl = new StringBuffer(); htmlUrl.append(CommonAppConfig.HOST).append("/").append(bean.getModel().getActivityUrl()).append("&nickname=").append(userInfo.getUserNicename()).append("&token=").append(userInfo.getToken()).append("&anchorUid=").append(mLiveUid).append("&uid=").append(userInfo.getId()).append("&k=").append(System.currentTimeMillis()).append("&isZh=").append(WordUtil.isNewZh() ? "1" : 0);
//判断是否是星级活动 } else {
if (bean.isStart()) { type = bean.getShow_type();
type = bean.getModel().getType(); htmlUrl.append(bean.getLink()).append("?uid=").append(userInfo.getId()).append("&token=").append(userInfo.getToken()).append("&anchorUid=").append(mLiveUid).append("&t=").append(System.currentTimeMillis()).append("&isZh=").append(WordUtil.isNewZh() ? "1" : 0);
htmlUrl.append(CommonAppConfig.HOST) }
.append("/") if (TextUtils.equals(type, "1")) {
.append(bean.getModel().getActivityUrl()) ZhuangBanActivity.forward(mContext, htmlUrl.toString(), false, 0);
.append("&nickname=") } else {
.append(userInfo.getUserNicename()) Bundle bundle = new Bundle();
.append("&token=") bundle.putString("url", htmlUrl.toString());
.append(userInfo.getToken()) LiveHDDialogFragment fragment = new LiveHDDialogFragment();
.append("&anchorUid=") fragment.setArguments(bundle);
.append(mLiveUid) fragment.show(((LiveSwAnchorActivity) mContext).getSupportFragmentManager(), "LiveHDDialogFragment");
.append("&uid=")
.append(userInfo.getId())
.append("&k=")
.append(System.currentTimeMillis()).append("&isZh=")
.append(WordUtil.isNewZh() ? "1" : 0);
} else {
type = bean.getShow_type();
htmlUrl.append(bean.getLink())
.append("?uid=")
.append(userInfo.getId())
.append("&token=")
.append(userInfo.getToken())
.append("&anchorUid=")
.append(mLiveUid)
.append("&t=")
.append(System.currentTimeMillis()).append("&isZh=")
.append(WordUtil.isNewZh() ? "1" : 0);
}
if (TextUtils.equals(type, "1")) {
ZhuangBanActivity.forward(mContext, htmlUrl.toString(), false, 0);
} else {
Bundle bundle = new Bundle();
bundle.putString("url", htmlUrl.toString());
LiveHDDialogFragment fragment = new LiveHDDialogFragment();
fragment.setArguments(bundle);
fragment.show(((LiveSwAnchorActivity) mContext).getSupportFragmentManager(), "LiveHDDialogFragment");
}
}
} }
} }
}) }
.start(); }
}).start();
} else { } else {
mBanner.setAutoPlay(true) mBanner.setAutoPlay(true).setPages(mBannerList, new CustomViewHolder()).setDelayTime(3200).setBannerStyle(BannerConfig.NOT_INDICATOR).setOnBannerClickListener(new OnBannerClickListener() {
.setPages(mBannerList, new CustomViewHolder()) @Override
.setDelayTime(3200) public void onBannerClick(List datas, int p) {
.setBannerStyle(BannerConfig.NOT_INDICATOR) if (mBannerList != null) {
.setOnBannerClickListener(new OnBannerClickListener() { if (p >= 0 && p < mBannerList.size()) {
@Override IMLoginModel userInfo = IMLoginManager.get(mContext).getUserInfo();
public void onBannerClick(List datas, int p) { BannerBean bean = mBannerList.get(p);
if (mBannerList != null) { String type = "";
if (p >= 0 && p < mBannerList.size()) { StringBuffer htmlUrl = new StringBuffer();
IMLoginModel userInfo = IMLoginManager.get(mContext).getUserInfo(); //判断是否是星级活动
BannerBean bean = mBannerList.get(p); if (bean.isStart()) {
String type = ""; type = bean.getModel().getType();
StringBuffer htmlUrl = new StringBuffer(); htmlUrl.append(CommonAppConfig.HOST).append("/").append(bean.getModel().getActivityUrl()).append("&nickname=").append(userInfo.getUserNicename()).append("&token=").append(userInfo.getToken()).append("&anchorUid=").append(mLiveUid).append("&uid=").append(userInfo.getId()).append("&k=").append(System.currentTimeMillis()).append("&isZh=").append(WordUtil.isNewZh() ? "1" : 0);
//判断是否是星级活动 } else {
if (bean.isStart()) { type = bean.getShow_type();
type = bean.getModel().getType(); htmlUrl.append(bean.getLink()).append(bean.getLink().contains("?") ? "&uid=" : "?uid=").append(userInfo.getId()).append("&token=").append(userInfo.getToken()).append("&anchorUid=").append(mLiveUid).append("&liveUid=").append(mLiveUid).append("&t=").append(System.currentTimeMillis()).append("&g=Appapi&m=Wish&a=index").append("&isZh=").append(WordUtil.isNewZh() ? "1" : 0);
htmlUrl.append(CommonAppConfig.HOST) }
.append("/") if (TextUtils.equals(type, "1")) {
.append(bean.getModel().getActivityUrl()) ZhuangBanActivity.forward(mContext, htmlUrl.toString(), false, 0);
.append("&nickname=") } else {
.append(userInfo.getUserNicename()) Bundle bundle = new Bundle();
.append("&token=") bundle.putString("url", htmlUrl.toString());
.append(userInfo.getToken()) LiveHDDialogFragment fragment = new LiveHDDialogFragment();
.append("&anchorUid=") fragment.setArguments(bundle);
.append(mLiveUid) fragment.show(((LiveSwAnchorActivity) mContext).getSupportFragmentManager(), "LiveHDDialogFragment");
.append("&uid=")
.append(userInfo.getId())
.append("&k=")
.append(System.currentTimeMillis()).append("&isZh=")
.append(WordUtil.isNewZh() ? "1" : 0);
} else {
type = bean.getShow_type();
htmlUrl.append(bean.getLink())
.append(bean.getLink().contains("?") ? "&uid=" : "?uid=")
.append(userInfo.getId())
.append("&token=")
.append(userInfo.getToken())
.append("&anchorUid=")
.append(mLiveUid)
.append("&liveUid=")
.append(mLiveUid)
.append("&t=")
.append(System.currentTimeMillis())
.append("&g=Appapi&m=Wish&a=index").append("&isZh=")
.append(WordUtil.isNewZh() ? "1" : 0);
}
if (TextUtils.equals(type, "1")) {
ZhuangBanActivity.forward(mContext, htmlUrl.toString(), false, 0);
} else {
Bundle bundle = new Bundle();
bundle.putString("url", htmlUrl.toString());
LiveHDDialogFragment fragment = new LiveHDDialogFragment();
fragment.setArguments(bundle);
fragment.show(((LiveSwAnchorActivity) mContext).getSupportFragmentManager(), "LiveHDDialogFragment");
}
}
} }
} }
}) }
.start(); }
}).start();
} }
} }
} }
@ -723,11 +631,11 @@ public class LiveRyAnchorViewHolder extends AbsLiveViewHolder {
return now + time + -now % 1000; return now + time + -now % 1000;
} }
public void closeMenuRed(){ public void closeMenuRed() {
menuRed.setVisibility(View.GONE); menuRed.setVisibility(View.GONE);
} }
public boolean isShowMenuRed(){ public boolean isShowMenuRed() {
return menuRed.getVisibility()==View.VISIBLE; return menuRed.getVisibility() == View.VISIBLE;
} }
} }

View File

@ -17,6 +17,6 @@
android:scrollHorizontally="true" android:scrollHorizontally="true"
android:singleLine="true" android:singleLine="true"
android:textColor="#FFFFFFFF" android:textColor="#FFFFFFFF"
android:textSize="10sp" /> android:textSize="12sp" />
</LinearLayout> </LinearLayout>

View File

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@color/transparent"
android:gravity="center_vertical">
<com.yunbao.common.views.weight.MarqueeTextView
android:id="@+id/wish_index"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="marquee"
android:focusable="true"
android:gravity="center"
android:focusableInTouchMode="true"
android:marqueeRepeatLimit="marquee_forever"
android:scrollHorizontally="true"
android:singleLine="true"
android:textColor="#FFFFFFFF"
android:textSize="12sp" />
</LinearLayout>

View File

@ -57,12 +57,12 @@
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/contentLayout"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="79dp" android:layout_height="79dp"
android:layout_marginStart="15dp" android:layout_marginStart="15dp"
android:layout_marginTop="18dp"
android:layout_marginEnd="15dp" android:layout_marginEnd="15dp"
android:layout_marginTop="10dp"
android:id="@+id/contentLayout"
android:background="@drawable/border_grey1" android:background="@drawable/border_grey1"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
@ -109,25 +109,27 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="22dp" android:layout_height="22dp"
android:layout_marginStart="8dp" android:layout_marginStart="8dp"
android:layout_marginTop="15dp"
android:background="@null" android:background="@null"
android:layout_marginEnd="20dp"
android:ellipsize="end"
android:hint="@string/live_title_hint" android:hint="@string/live_title_hint"
android:paddingRight="10dp" android:paddingRight="10dp"
android:singleLine="true" android:singleLine="true"
android:textColor="#FFFFFF" android:textColor="#FFFFFF"
android:layout_marginTop="15dp"
app:layout_constraintTop_toTopOf="parent"
android:textColorHint="#FFFFFF" android:textColorHint="#FFFFFF"
android:textSize="15sp" android:textSize="15sp"
app:layout_constraintStart_toEndOf="@+id/avatar" app:layout_constraintStart_toEndOf="@+id/avatar"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="MissingConstraints" /> tools:ignore="MissingConstraints" />
<LinearLayout <LinearLayout
android:id="@+id/btn_live_class" android:id="@+id/btn_live_class"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="25dp" android:layout_height="25dp"
android:gravity="center"
android:layout_marginTop="7dp"
android:layout_marginStart="8dp" android:layout_marginStart="8dp"
android:layout_marginTop="7dp"
android:gravity="center"
android:orientation="horizontal" android:orientation="horizontal"
app:layout_constraintStart_toEndOf="@+id/avatar" app:layout_constraintStart_toEndOf="@+id/avatar"
app:layout_constraintTop_toBottomOf="@+id/edit_title"> app:layout_constraintTop_toBottomOf="@+id/edit_title">
@ -162,32 +164,33 @@
<LinearLayout <LinearLayout
android:id="@+id/tips" android:id="@+id/tips"
android:layout_width="wrap_content" android:layout_width="match_parent"
android:layout_height="37dp" android:layout_height="37dp"
android:layout_marginStart="15dp"
android:layout_marginTop="10dp" android:layout_marginTop="10dp"
android:layout_marginEnd="15dp"
android:background="@drawable/border_grey1_tips" android:background="@drawable/border_grey1_tips"
android:layout_marginLeft="15dp"
android:gravity="center" android:gravity="center"
android:orientation="horizontal" android:orientation="horizontal"
app:layout_constraintStart_toStartOf="parent" android:paddingEnd="20dp"
app:layout_constraintEnd_toEndOf="@+id/contentLayout"
app:layout_constraintStart_toStartOf="@+id/contentLayout"
app:layout_constraintTop_toBottomOf="@+id/contentLayout"> app:layout_constraintTop_toBottomOf="@+id/contentLayout">
<ImageView <ImageView
android:layout_width="16dp" android:layout_width="16dp"
android:layout_height="16dp" android:layout_height="16dp"
android:layout_marginStart="5dp" android:layout_marginStart="12dp"
android:layout_weight="1"
app:srcCompat="@mipmap/icon_tips" /> app:srcCompat="@mipmap/icon_tips" />
<TextView <ViewFlipper
android:layout_width="wrap_content" android:id="@+id/live_open_vf"
android:layout_height="wrap_content" android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginStart="5dp" android:layout_marginStart="5dp"
android:layout_marginEnd="4dp" android:flipInterval="5000"
android:layout_weight="1" android:inAnimation="@anim/anim_marquee_in"
android:text="開播前發一條動態,將會給您的直播帶來更高人氣哦~" android:outAnimation="@anim/anim_marquee_out" />
android:textColor="@color/white"
android:textSize="12sp" />
</LinearLayout> </LinearLayout>
@ -195,9 +198,9 @@
android:id="@+id/btn_live_anchor_say" android:id="@+id/btn_live_anchor_say"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="30dp" android:layout_height="30dp"
android:layout_marginLeft="15dp"
android:layout_marginTop="10dp" android:layout_marginTop="10dp"
android:background="@drawable/border_grey1_50" android:background="@drawable/border_grey1_50"
android:layout_marginLeft="15dp"
android:gravity="center" android:gravity="center"
android:orientation="horizontal" android:orientation="horizontal"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
@ -232,8 +235,8 @@
<LinearLayout <LinearLayout
android:id="@+id/btn_wishlist" android:id="@+id/btn_wishlist"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_marginLeft="10dp"
android:layout_height="30dp" android:layout_height="30dp"
android:layout_marginLeft="10dp"
android:layout_marginTop="10dp" android:layout_marginTop="10dp"
android:background="@drawable/border_grey1_50" android:background="@drawable/border_grey1_50"
android:gravity="center" android:gravity="center"
@ -252,8 +255,8 @@
android:id="@+id/text_wishlist" android:id="@+id/text_wishlist"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginEnd="4dp"
android:layout_marginStart="5dp" android:layout_marginStart="5dp"
android:layout_marginEnd="4dp"
android:layout_weight="1" android:layout_weight="1"
android:text="@string/live_wish_list" android:text="@string/live_wish_list"
android:textColor="@color/white" android:textColor="@color/white"
@ -262,8 +265,8 @@
<ImageView <ImageView
android:layout_width="5dp" android:layout_width="5dp"
android:layout_height="10dp" android:layout_height="10dp"
android:layout_weight="1"
android:layout_marginEnd="5dp" android:layout_marginEnd="5dp"
android:layout_weight="1"
android:scaleType="centerCrop" android:scaleType="centerCrop"
android:src="@mipmap/icon_live_more" /> android:src="@mipmap/icon_live_more" />
</LinearLayout> </LinearLayout>

View File

@ -164,103 +164,109 @@
android:visibility="gone" android:visibility="gone"
tools:visibility="visible" /> tools:visibility="visible" />
<ImageView <LinearLayout
android:id="@+id/btn_close"
android:layout_width="1dp"
android:layout_height="1dp"
android:layout_alignParentRight="true"
android:layout_marginRight="5dp"
android:padding="5dp"
android:src="@mipmap/icon_live_close"
android:visibility="invisible" />
<ImageView
android:id="@+id/btn_msg"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_marginRight="5dp"
android:layout_toLeftOf="@id/btn_function"
android:padding="5dp"
android:src="@mipmap/icon_live_msg" />
<ImageView
android:id="@+id/btn_function"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_marginRight="5dp"
android:layout_toLeftOf="@id/btn_close"
android:padding="5dp" />
<ImageView
android:id="@+id/btn_pk"
android:layout_width="80dp"
android:layout_height="40dp"
android:layout_toLeftOf="@id/btn_function"
android:padding="6dp"
android:src="@mipmap/icon_live_pk"
android:visibility="gone" />
<TextView
android:id="@+id/et_input"
android:layout_width="134dp"
android:layout_height="30dp"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_marginLeft="10dp" android:layout_width="match_parent"
android:alpha="0.5" android:gravity="center_vertical"
android:background="@drawable/bg_live_item" android:layout_height="match_parent">
android:hint="@string/live_anchor_send"
android:padding="5dp"
android:singleLine="true"
android:textColor="@color/textColor"
android:textColorHint="@color/gray3"
android:textSize="14sp" />
<ImageView <ImageView
android:id="@+id/btn_chat" android:id="@+id/et_input"
android:layout_width="40dp" android:layout_marginStart="10dp"
android:layout_height="40dp" android:layout_width="70dp"
android:layout_centerVertical="true" android:layout_weight="1"
android:layout_marginLeft="5dp" android:layout_height="35dp"
android:padding="5dp" android:src="@mipmap/live_anchor_msg" />
android:src="@mipmap/icon_live_chat"
android:visibility="gone" />
<TextView <ImageView
android:id="@+id/btn_close_game" android:id="@+id/btn_pk"
android:layout_width="wrap_content" android:layout_weight="1.5"
android:layout_height="wrap_content" android:layout_width="100dp"
android:layout_marginLeft="10dp" android:layout_centerVertical="true"
android:layout_marginTop="5dp" android:layout_height="35dp"
android:layout_toRightOf="@id/btn_chat" android:src="@mipmap/live_anchor_pk" />
android:background="@drawable/bg_btn_game"
android:paddingLeft="8dp"
android:paddingTop="5dp"
android:paddingRight="8dp"
android:paddingBottom="5dp"
android:text="@string/end"
android:textColor="@color/white"
android:textSize="13sp"
android:visibility="invisible" />
<TextView <ImageView
android:id="@+id/red_point" android:id="@+id/btn_fz"
android:layout_width="wrap_content" android:layout_weight="1"
android:layout_height="14dp" android:layout_width="75dp"
android:layout_alignTop="@id/btn_msg" android:layout_height="35dp"
android:layout_alignRight="@id/btn_msg" android:src="@mipmap/live_anchor_fz" />
android:layout_marginTop="5dp"
android:layout_marginRight="5dp" <ImageView
android:background="@drawable/bg_red_point" android:id="@+id/btn_task"
android:gravity="center" android:layout_weight="1"
android:includeFontPadding="false" android:layout_width="75dp"
android:minWidth="14dp" android:layout_height="35dp"
android:paddingLeft="3dp" android:src="@mipmap/live_anchor_task" />
android:paddingRight="3dp"
android:text="1" <RelativeLayout
android:textColor="#fff" android:layout_width="75dp"
android:textSize="10sp" android:gravity="center_vertical"
android:translationY="-4dp" android:layout_weight="1"
android:visibility="invisible" /> android:layout_height="match_parent">
<ImageView
android:id="@+id/btn_msg"
android:layout_width="75dp"
android:layout_height="35dp"
android:src="@mipmap/live_anchor_msg_notify" />
<TextView
android:id="@+id/red_point"
android:layout_width="wrap_content"
android:layout_height="14dp"
android:layout_marginTop="4dp"
android:layout_alignParentEnd="true"
android:layout_marginEnd="10dp"
android:background="@drawable/bg_red_point"
android:gravity="center"
android:includeFontPadding="false"
android:minWidth="14dp"
android:paddingLeft="3dp"
android:paddingRight="3dp"
android:text="1"
android:textColor="#fff"
android:textSize="10sp"
android:translationY="-4dp"
tools:visibility="visible"
android:visibility="invisible" />
</RelativeLayout>
<RelativeLayout
android:layout_weight="1"
android:gravity="center_vertical"
android:layout_width="75dp"
android:layout_height="match_parent">
<ImageView
android:id="@+id/btn_function"
android:layout_width="75dp"
android:layout_height="35dp"
android:src="@mipmap/live_anchor_menu" />
<TextView
android:id="@+id/red_menu"
android:layout_width="6dp"
android:layout_height="6dp"
android:layout_alignParentEnd="true"
android:layout_marginTop="4dp"
android:layout_marginEnd="18dp"
android:background="@drawable/live_room_menu_red"
android:gravity="center"
android:includeFontPadding="false"
android:minWidth="14dp"
android:paddingLeft="3dp"
android:paddingRight="3dp"
android:textColor="#fff"
android:textSize="10sp"
android:translationY="-4dp"
android:visibility="visible" />
</RelativeLayout>
</LinearLayout>
<com.yunbao.common.custom.DrawableTextView <com.yunbao.common.custom.DrawableTextView
android:id="@+id/live_time" android:id="@+id/live_time"
@ -269,7 +275,6 @@
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_marginStart="42dp" android:layout_marginStart="42dp"
android:layout_marginEnd="10dp" android:layout_marginEnd="10dp"
android:layout_toEndOf="@id/et_input"
android:background="@drawable/bg_live_push_time" android:background="@drawable/bg_live_push_time"
android:drawablePadding="5dp" android:drawablePadding="5dp"
android:gravity="center_vertical" android:gravity="center_vertical"
@ -283,23 +288,5 @@
app:dt_left_height="4dp" app:dt_left_height="4dp"
app:dt_left_width="4dp" /> app:dt_left_width="4dp" />
<TextView
android:id="@+id/red_menu"
android:layout_width="6dp"
android:layout_height="6dp"
android:layout_alignTop="@id/btn_function"
android:layout_alignRight="@id/btn_function"
android:layout_marginTop="8dp"
android:layout_marginRight="8dp"
android:background="@drawable/live_room_menu_red"
android:gravity="center"
android:includeFontPadding="false"
android:minWidth="14dp"
android:paddingLeft="3dp"
android:paddingRight="3dp"
android:textColor="#fff"
android:textSize="10sp"
android:translationY="-4dp"
android:visibility="visible" />
</RelativeLayout> </RelativeLayout>
</LinearLayout> </LinearLayout>

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB