add[主播底部功能]
@ -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;
|
||||
}
|
||||
}
|
@ -1,105 +1,7 @@
|
||||
package com.yunbao.common.http;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.yunbao.common.bean.ActiveBean;
|
||||
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.bean.*;
|
||||
import com.yunbao.common.event.CheckCurrencyModel;
|
||||
|
||||
import java.util.List;
|
||||
@ -1489,4 +1391,10 @@ public interface PDLiveApi {
|
||||
@Query("live_uid")String liveUid
|
||||
);
|
||||
|
||||
/**
|
||||
* 获取開播提示
|
||||
*/
|
||||
@GET("/api/public/?service=live.getStartTips")
|
||||
Observable<ResponseModel<List<LiveOpenTipsBean>>> getLiveDataInfo();
|
||||
|
||||
}
|
||||
|
@ -54,6 +54,7 @@ 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.LiveOpenTipsBean;
|
||||
import com.yunbao.common.bean.LiveRoomActivityBanner;
|
||||
import com.yunbao.common.bean.LiveRoomVoteModel;
|
||||
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();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 直播间取消网络请求
|
||||
*/
|
||||
|
338
common/src/main/res/layout/dialog_live_interaction.xml
Normal 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>
|
After Width: | Height: | Size: 6.9 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/icon_interaction_beauty.png
Normal file
After Width: | Height: | Size: 5.6 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/icon_interaction_camera.png
Normal file
After Width: | Height: | Size: 4.9 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/icon_interaction_game.png
Normal file
After Width: | Height: | Size: 8.6 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/icon_interaction_leave.png
Normal file
After Width: | Height: | Size: 7.2 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/icon_interaction_live_data.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/icon_interaction_mic.png
Normal file
After Width: | Height: | Size: 7.6 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/icon_interaction_msg.png
Normal file
After Width: | Height: | Size: 6.6 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/icon_interaction_qa.png
Normal file
After Width: | Height: | Size: 7.4 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/icon_interaction_robot.png
Normal file
After Width: | Height: | Size: 3.2 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/icon_interaction_wish.png
Normal file
After Width: | Height: | Size: 6.9 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/icon_interaction_zg.png
Normal file
After Width: | Height: | Size: 7.7 KiB |
@ -268,8 +268,8 @@
|
||||
<string name="live_cover">Live cover</string>
|
||||
<string name="live_cover_2">Change cover</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_class">channel</string>
|
||||
<string name="live_title_hint">Please write a title for the live broadcast room</string>
|
||||
<string name="live_class">Select 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_set_pwd">Please set room password</string>
|
||||
@ -291,9 +291,9 @@
|
||||
<string name="live_camera_s">Mirroring</string>
|
||||
<string name="live_zg">Trickster</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_zslk">LeaveTemporarily</string>
|
||||
<string name="live_zslk">leave temporarily</string>
|
||||
<string name="live_zslk1">ResumeLive</string>
|
||||
<string name="live_flash">Flash lamp</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="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="clarity">clarity</string>
|
||||
<string name="clarity">Clarity</string>
|
||||
<string name="live_class1">Live channel</string>
|
||||
<string name="broadcast">broadcast</string>
|
||||
<string name="robot">robot</string>
|
||||
<string name="robot">Robot</string>
|
||||
<string name="do_set">set</string>
|
||||
<string name="not_set">Not set</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="traditional_chinese">Traditional Chinese</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="unfollow_cancel">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_guard">Open Guard</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_cancel">cancel</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_free_pk_empty_tips">No match was found</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_game">Game:</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="live_open_wishlive_tips">Set the following functions to receive more rewards</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>
|
||||
|
@ -217,7 +217,7 @@
|
||||
<string name="live_cover">直播封面</string>
|
||||
<string name="live_cover_2">更換封面</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_choose">選擇直播頻道</string>
|
||||
<string name="live_class_tip_title">注意選擇適合自己的頻道。</string>
|
||||
@ -1606,5 +1606,8 @@
|
||||
<string name="live_end_view_ban_timer">處罰時間:</string>
|
||||
<string name="live_open_wishlive_tips">添加以下設定將有機會獲得更多收益</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>
|
||||
|
@ -214,8 +214,8 @@
|
||||
<string name="live_cover">Live cover</string>
|
||||
<string name="live_cover_2">Change cover</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_class">channel</string>
|
||||
<string name="live_title_hint">Please write a title for the live broadcast room</string>
|
||||
<string name="live_class">Select 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_set_pwd">Please set room password</string>
|
||||
@ -234,9 +234,9 @@
|
||||
<string name="live_camera">Flip</string>
|
||||
<string name="live_zg">Trickster</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_zslk">LeaveTemporarily</string>
|
||||
<string name="live_zslk">leave temporarily</string>
|
||||
<string name="live_zslk1">ResumeLive</string>
|
||||
<string name="live_share">share</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="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="clarity">clarity</string>
|
||||
<string name="clarity">Clarity</string>
|
||||
<string name="live_class1">Live channel</string>
|
||||
<string name="broadcast">broadcast</string>
|
||||
<string name="robot">robot</string>
|
||||
<string name="robot">Robot</string>
|
||||
<string name="do_set">set</string>
|
||||
<string name="not_set">Not set</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="traditional_chinese">Traditional Chinese</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="unfollow_cancel">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_guard">Open Guard</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_cancel">cancel</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_free_pk_empty_tips">No match was found</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_game">Game:</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="live_open_wishlive_tips">Set the following functions to receive more rewards</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>
|
||||
|
@ -94,8 +94,10 @@ import com.yunbao.live.bean.LiveReceiveGiftBean;
|
||||
import com.yunbao.live.bean.NewAllServerNotifyGuardEvent;
|
||||
import com.yunbao.live.dialog.FreePkDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveInputDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveInteractionDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveNewFunctionDialogFragment;
|
||||
import com.yunbao.live.dialog.LivePrankDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveTaskDialog;
|
||||
import com.yunbao.live.dialog.LiveWishListDialogFragment4Audience;
|
||||
import com.yunbao.live.dialog.RandomPkDialogFragment;
|
||||
import com.yunbao.live.event.LinkMicTxMixStreamEvent;
|
||||
@ -710,6 +712,38 @@ public class LiveSwAnchorActivity extends LiveActivity implements LiveFunctionCl
|
||||
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");
|
||||
}
|
||||
|
||||
/**
|
||||
* 打开主播连麦窗口
|
||||
*/
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
@ -14,25 +14,33 @@ import android.os.Looper;
|
||||
import android.text.Html;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.Gravity;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
import android.widget.ViewFlipper;
|
||||
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
import androidx.core.content.ContextCompat;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.lxj.xpopup.XPopup;
|
||||
import com.lxj.xpopup.core.BasePopupView;
|
||||
import com.lxj.xpopup.interfaces.XPopupCallback;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
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.LiveAnchorCallMeModel;
|
||||
import com.yunbao.common.bean.LiveAnchorSayModel;
|
||||
import com.yunbao.common.bean.LiveClassBean;
|
||||
import com.yunbao.common.bean.LiveOpenTipsBean;
|
||||
import com.yunbao.common.bean.LiveRoomTypeBean;
|
||||
import com.yunbao.common.bean.UserBean;
|
||||
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.LiveHttpConsts;
|
||||
import com.yunbao.common.http.LiveHttpUtil;
|
||||
import com.yunbao.common.http.live.LiveNetManager;
|
||||
import com.yunbao.common.interfaces.CommonCallback;
|
||||
import com.yunbao.common.interfaces.ImageResultCallback;
|
||||
import com.yunbao.common.interfaces.OnItemClickListener;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.utils.DialogUitl;
|
||||
import com.yunbao.common.utils.DpUtil;
|
||||
import com.yunbao.common.utils.L;
|
||||
import com.yunbao.common.utils.ProcessImageUtil;
|
||||
import com.yunbao.common.utils.RouteUtil;
|
||||
@ -76,6 +86,7 @@ import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import io.agora.beautyapi.faceunity.agora.SWManager;
|
||||
@ -104,6 +115,7 @@ public class LiveNewReadySwViewHolder extends AbsViewHolder implements View.OnCl
|
||||
private LiveOpenCustomPopup liveOpenCustomPopup;
|
||||
private boolean selector = true;
|
||||
private String mLiveUid;
|
||||
private ViewFlipper liveOpenVf;
|
||||
|
||||
public LiveNewReadySwViewHolder(Context context, ViewGroup parentView, int liveSdk) {
|
||||
super(context, parentView, liveSdk);
|
||||
@ -134,7 +146,7 @@ public class LiveNewReadySwViewHolder extends AbsViewHolder implements View.OnCl
|
||||
imm.hideSoftInputFromWindow(view.getWindowToken(), 0);
|
||||
}
|
||||
});
|
||||
|
||||
liveOpenVf = findViewById(R.id.live_open_vf);
|
||||
mAvatar = (ConstraintLayout) findViewById(R.id.avatar);
|
||||
mAvatar.setOnClickListener(this);
|
||||
UserBean u = CommonAppConfig.getInstance().getUserBean();
|
||||
@ -297,6 +309,37 @@ public class LiveNewReadySwViewHolder extends AbsViewHolder implements View.OnCl
|
||||
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) {
|
||||
|
@ -26,6 +26,7 @@ import androidx.core.content.ContextCompat;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.blankj.utilcode.util.GsonUtils;
|
||||
import com.google.gson.Gson;
|
||||
import com.lxj.xpopup.XPopup;
|
||||
import com.ms.banner.Banner;
|
||||
import com.ms.banner.BannerConfig;
|
||||
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.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.activity.ZhuangBanActivity;
|
||||
import com.yunbao.live.bean.WishlistModel;
|
||||
import com.yunbao.live.dialog.LiveHDDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveTaskDialog;
|
||||
import com.yunbao.live.event.LiveAudienceEvent;
|
||||
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
@ -69,10 +72,7 @@ import java.util.Map;
|
||||
public class LiveRyAnchorViewHolder extends AbsLiveViewHolder {
|
||||
|
||||
private ImageView mBtnFunction;
|
||||
private View mBtnGameClose;//关闭游戏的按钮
|
||||
private View mBtnPk;//主播连麦pk按钮
|
||||
private Drawable mDrawable0;
|
||||
private Drawable mDrawable1;
|
||||
private Drawable mDrawableLinkMic0;//允许连麦
|
||||
private Drawable mDrawableLinkMic1;//禁止连麦
|
||||
private ImageView mLinkMicIcon;//是否允许连麦的标记
|
||||
@ -130,18 +130,12 @@ public class LiveRyAnchorViewHolder extends AbsLiveViewHolder {
|
||||
public void init() {
|
||||
super.init();
|
||||
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);
|
||||
mBtnFunction = (ImageView) findViewById(R.id.btn_function);
|
||||
leaveImg = (ImageView) findViewById(R.id.leave_img);
|
||||
btn_dr = (TextView) findViewById(R.id.btn_dr);
|
||||
mBanner = (Banner) findViewById(R.id.banner);
|
||||
mBtnFunction.setImageDrawable(mDrawable0);
|
||||
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.setOnClickListener(this);
|
||||
mDrawableLinkMic0 = ContextCompat.getDrawable(mContext, R.mipmap.icon_live_link_mic);
|
||||
@ -160,9 +154,7 @@ public class LiveRyAnchorViewHolder extends AbsLiveViewHolder {
|
||||
ToastUtil.show("多人PK次数已用完");
|
||||
} else {
|
||||
//開始多人PK
|
||||
HttpClient.getInstance().get("live.startDRPK", "live.startDRPK")
|
||||
.params("roomid", CommonAppConfig.getInstance().getUid())
|
||||
.execute(new HttpCallback() {
|
||||
HttpClient.getInstance().get("live.startDRPK", "live.startDRPK").params("roomid", CommonAppConfig.getInstance().getUid()).execute(new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if (code == 0) {
|
||||
@ -182,13 +174,10 @@ public class LiveRyAnchorViewHolder extends AbsLiveViewHolder {
|
||||
btn_end_pk.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
HttpClient.getInstance().get("live.endDRpk", "live.endDRpk")
|
||||
.params("roomid", CommonAppConfig.getInstance().getUid())
|
||||
.execute(new HttpCallback() {
|
||||
HttpClient.getInstance().get("live.endDRpk", "live.endDRpk").params("roomid", CommonAppConfig.getInstance().getUid()).execute(new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
Bus.get().post(new LiveAudienceEvent()
|
||||
.setType(LiveAudienceEvent.LiveAudienceType.LEAVE_DR_ROOM));
|
||||
Bus.get().post(new LiveAudienceEvent().setType(LiveAudienceEvent.LiveAudienceType.LEAVE_DR_ROOM));
|
||||
PKing = false;
|
||||
|
||||
}
|
||||
@ -201,10 +190,7 @@ public class LiveRyAnchorViewHolder extends AbsLiveViewHolder {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
closeEndPkBt();
|
||||
HttpClient.getInstance().post("live.leaveDRPKroom", "live.leaveDRPKroom")
|
||||
.params("roomid", drpkRoomId)
|
||||
.params("uid", CommonAppConfig.getInstance().getUid())
|
||||
.execute(new HttpCallback() {
|
||||
HttpClient.getInstance().post("live.leaveDRPKroom", "live.leaveDRPKroom").params("roomid", drpkRoomId).params("uid", CommonAppConfig.getInstance().getUid()).execute(new HttpCallback() {
|
||||
@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();
|
||||
|
||||
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<>();
|
||||
@ -261,39 +265,17 @@ public class LiveRyAnchorViewHolder extends AbsLiveViewHolder {
|
||||
int i = v.getId();
|
||||
if (i == R.id.btn_close) {
|
||||
close();
|
||||
|
||||
} else if (i == R.id.btn_function) {
|
||||
showFunctionDialog();
|
||||
|
||||
} else if (i == R.id.btn_close_game) {
|
||||
|
||||
} else if (i == R.id.btn_pk) {
|
||||
applyLinkMicPk();
|
||||
|
||||
} else if (i == R.id.btn_link_mic) {
|
||||
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() {
|
||||
if (mBtnFunction != null) {
|
||||
mBtnFunction.setImageDrawable(mDrawable1);
|
||||
}
|
||||
if (isSw) {
|
||||
((LiveSwAnchorActivity) mContext).showFunctionDialog();
|
||||
} else {
|
||||
((LiveRyAnchorActivity) mContext).showFunctionDialog();
|
||||
}
|
||||
((LiveSwAnchorActivity) mContext).showMenuDialog(false);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -330,7 +305,7 @@ public class LiveRyAnchorViewHolder extends AbsLiveViewHolder {
|
||||
*/
|
||||
public void setBtnFunctionDark() {
|
||||
if (mBtnFunction != null) {
|
||||
mBtnFunction.setImageDrawable(mDrawable0);
|
||||
//mBtnFunction.setImageDrawable(mDrawable0);
|
||||
}
|
||||
}
|
||||
|
||||
@ -405,16 +380,7 @@ public class LiveRyAnchorViewHolder extends AbsLiveViewHolder {
|
||||
public void updateStart(LiveAudienceEvent event) {
|
||||
if (event.getType() == START_MESSAGE) {
|
||||
MsgModel msgModel = event.getMsgModel();
|
||||
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());
|
||||
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());
|
||||
Log.i("测试", "更新星级任务=" + model);
|
||||
showStart(model);
|
||||
} else if (event.getType() == WISH_LIST_UPDATE) {
|
||||
@ -423,8 +389,7 @@ public class LiveRyAnchorViewHolder extends AbsLiveViewHolder {
|
||||
}
|
||||
|
||||
public void initStarData() {
|
||||
LiveNetManager.get(mContext)
|
||||
.getStarChallengeStatus(mLiveUid, new com.yunbao.common.http.base.HttpCallback<StarChallengeStatusModel>() {
|
||||
LiveNetManager.get(mContext).getStarChallengeStatus(mLiveUid, new com.yunbao.common.http.base.HttpCallback<StarChallengeStatusModel>() {
|
||||
@Override
|
||||
public void onSuccess(StarChallengeStatusModel data1) {
|
||||
activityUrl = data1.getActivityUrl();
|
||||
@ -535,11 +500,7 @@ public class LiveRyAnchorViewHolder extends AbsLiveViewHolder {
|
||||
public void showBanner() {
|
||||
if (mBannerList != null && mBanner != null) {
|
||||
if (mBannerList.size() == 1) {
|
||||
mBanner.setAutoPlay(false)
|
||||
.setPages(mBannerList, new CustomViewHolder())
|
||||
.setDelayTime(3200)
|
||||
.setBannerStyle(BannerConfig.NOT_INDICATOR)
|
||||
.setOnBannerClickListener(new OnBannerClickListener() {
|
||||
mBanner.setAutoPlay(false).setPages(mBannerList, new CustomViewHolder()).setDelayTime(3200).setBannerStyle(BannerConfig.NOT_INDICATOR).setOnBannerClickListener(new OnBannerClickListener() {
|
||||
@Override
|
||||
public void onBannerClick(List datas, int p) {
|
||||
if (mBannerList != null) {
|
||||
@ -551,32 +512,10 @@ public class LiveRyAnchorViewHolder extends AbsLiveViewHolder {
|
||||
//判断是否是星级活动
|
||||
if (bean.isStart()) {
|
||||
type = bean.getModel().getType();
|
||||
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);
|
||||
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 {
|
||||
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);
|
||||
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);
|
||||
@ -590,14 +529,9 @@ public class LiveRyAnchorViewHolder extends AbsLiveViewHolder {
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
.start();
|
||||
}).start();
|
||||
} else {
|
||||
mBanner.setAutoPlay(true)
|
||||
.setPages(mBannerList, new CustomViewHolder())
|
||||
.setDelayTime(3200)
|
||||
.setBannerStyle(BannerConfig.NOT_INDICATOR)
|
||||
.setOnBannerClickListener(new OnBannerClickListener() {
|
||||
mBanner.setAutoPlay(true).setPages(mBannerList, new CustomViewHolder()).setDelayTime(3200).setBannerStyle(BannerConfig.NOT_INDICATOR).setOnBannerClickListener(new OnBannerClickListener() {
|
||||
@Override
|
||||
public void onBannerClick(List datas, int p) {
|
||||
if (mBannerList != null) {
|
||||
@ -609,35 +543,10 @@ public class LiveRyAnchorViewHolder extends AbsLiveViewHolder {
|
||||
//判断是否是星级活动
|
||||
if (bean.isStart()) {
|
||||
type = bean.getModel().getType();
|
||||
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);
|
||||
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 {
|
||||
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);
|
||||
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);
|
||||
@ -651,8 +560,7 @@ public class LiveRyAnchorViewHolder extends AbsLiveViewHolder {
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
.start();
|
||||
}).start();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -723,11 +631,11 @@ public class LiveRyAnchorViewHolder extends AbsLiveViewHolder {
|
||||
return now + time + -now % 1000;
|
||||
}
|
||||
|
||||
public void closeMenuRed(){
|
||||
public void closeMenuRed() {
|
||||
menuRed.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
public boolean isShowMenuRed(){
|
||||
return menuRed.getVisibility()==View.VISIBLE;
|
||||
public boolean isShowMenuRed() {
|
||||
return menuRed.getVisibility() == View.VISIBLE;
|
||||
}
|
||||
}
|
||||
|
@ -17,6 +17,6 @@
|
||||
android:scrollHorizontally="true"
|
||||
android:singleLine="true"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="10sp" />
|
||||
android:textSize="12sp" />
|
||||
|
||||
</LinearLayout>
|
22
live/src/main/res/layout/view_live_open_tips.xml
Normal 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>
|
@ -57,12 +57,12 @@
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/contentLayout"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="79dp"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginTop="18dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:id="@+id/contentLayout"
|
||||
android:background="@drawable/border_grey1"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
@ -109,25 +109,27 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="22dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="15dp"
|
||||
android:background="@null"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:ellipsize="end"
|
||||
android:hint="@string/live_title_hint"
|
||||
android:paddingRight="10dp"
|
||||
android:singleLine="true"
|
||||
android:textColor="#FFFFFF"
|
||||
android:layout_marginTop="15dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:textColorHint="#FFFFFF"
|
||||
android:textSize="15sp"
|
||||
app:layout_constraintStart_toEndOf="@+id/avatar"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:ignore="MissingConstraints" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/btn_live_class"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="25dp"
|
||||
android:gravity="center"
|
||||
android:layout_marginTop="7dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="7dp"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintStart_toEndOf="@+id/avatar"
|
||||
app:layout_constraintTop_toBottomOf="@+id/edit_title">
|
||||
@ -162,32 +164,33 @@
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/tips"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="37dp"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:background="@drawable/border_grey1_tips"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:gravity="center"
|
||||
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">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginStart="12dp"
|
||||
app:srcCompat="@mipmap/icon_tips" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
<ViewFlipper
|
||||
android:id="@+id/live_open_vf"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:layout_weight="1"
|
||||
android:text="開播前發一條動態,將會給您的直播帶來更高人氣哦~"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp" />
|
||||
android:flipInterval="5000"
|
||||
android:inAnimation="@anim/anim_marquee_in"
|
||||
android:outAnimation="@anim/anim_marquee_out" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@ -195,9 +198,9 @@
|
||||
android:id="@+id/btn_live_anchor_say"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:background="@drawable/border_grey1_50"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
@ -232,8 +235,8 @@
|
||||
<LinearLayout
|
||||
android:id="@+id/btn_wishlist"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:background="@drawable/border_grey1_50"
|
||||
android:gravity="center"
|
||||
@ -252,8 +255,8 @@
|
||||
android:id="@+id/text_wishlist"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/live_wish_list"
|
||||
android:textColor="@color/white"
|
||||
@ -262,8 +265,8 @@
|
||||
<ImageView
|
||||
android:layout_width="5dp"
|
||||
android:layout_height="10dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:layout_weight="1"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@mipmap/icon_live_more" />
|
||||
</LinearLayout>
|
||||
|
@ -164,92 +164,61 @@
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<ImageView
|
||||
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" />
|
||||
<LinearLayout
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_width="match_parent"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<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" />
|
||||
android:id="@+id/et_input"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_width="70dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="35dp"
|
||||
android:src="@mipmap/live_anchor_msg" />
|
||||
|
||||
<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_weight="1.5"
|
||||
android:layout_width="100dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:alpha="0.5"
|
||||
android:background="@drawable/bg_live_item"
|
||||
android:hint="@string/live_anchor_send"
|
||||
android:padding="5dp"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/textColor"
|
||||
android:textColorHint="@color/gray3"
|
||||
android:textSize="14sp" />
|
||||
android:layout_height="35dp"
|
||||
android:src="@mipmap/live_anchor_pk" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/btn_chat"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:padding="5dp"
|
||||
android:src="@mipmap/icon_live_chat"
|
||||
android:visibility="gone" />
|
||||
android:id="@+id/btn_fz"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="75dp"
|
||||
android:layout_height="35dp"
|
||||
android:src="@mipmap/live_anchor_fz" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/btn_close_game"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_toRightOf="@id/btn_chat"
|
||||
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" />
|
||||
<ImageView
|
||||
android:id="@+id/btn_task"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="75dp"
|
||||
android:layout_height="35dp"
|
||||
android:src="@mipmap/live_anchor_task" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="75dp"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_weight="1"
|
||||
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_alignTop="@id/btn_msg"
|
||||
android:layout_alignRight="@id/btn_msg"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:background="@drawable/bg_red_point"
|
||||
android:gravity="center"
|
||||
android:includeFontPadding="false"
|
||||
@ -260,8 +229,45 @@
|
||||
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
|
||||
android:id="@+id/live_time"
|
||||
android:layout_width="wrap_content"
|
||||
@ -269,7 +275,6 @@
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginStart="42dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_toEndOf="@id/et_input"
|
||||
android:background="@drawable/bg_live_push_time"
|
||||
android:drawablePadding="5dp"
|
||||
android:gravity="center_vertical"
|
||||
@ -283,23 +288,5 @@
|
||||
app:dt_left_height="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>
|
||||
</LinearLayout>
|
BIN
live/src/main/res/mipmap-xhdpi/live_anchor_fz.png
Normal file
After Width: | Height: | Size: 5.9 KiB |
BIN
live/src/main/res/mipmap-xhdpi/live_anchor_menu.png
Normal file
After Width: | Height: | Size: 7.2 KiB |
BIN
live/src/main/res/mipmap-xhdpi/live_anchor_msg.png
Normal file
After Width: | Height: | Size: 7.0 KiB |
BIN
live/src/main/res/mipmap-xhdpi/live_anchor_msg_notify.png
Normal file
After Width: | Height: | Size: 5.6 KiB |
BIN
live/src/main/res/mipmap-xhdpi/live_anchor_pk.png
Normal file
After Width: | Height: | Size: 30 KiB |
BIN
live/src/main/res/mipmap-xhdpi/live_anchor_task.png
Normal file
After Width: | Height: | Size: 5.4 KiB |
BIN
live/src/main/res/mipmap-zh/live_anchor_pk.png
Normal file
After Width: | Height: | Size: 30 KiB |