Merge branch 'master' into dev_play_model_exo
This commit is contained in:
@@ -172,6 +172,7 @@ public class Constants {
|
||||
public static final String RECOMMEND_CARD_NOTIFY = "recommendCardNotify";//推荐卡通知消息
|
||||
public static final String STAR_CHALLENGE_UPDATE = "starChallengeUpdate";//星级助力
|
||||
public static final String AI_AUTOMATIC_SPEECH = "aiAutomaticSpeech";//机器人助手
|
||||
public static final String AI_AUTOMATIC_SPEECH_LIVE = "aiAutomaticSpeechNew";//机器人助手
|
||||
public static final String STAR_CHALLENGE_UPGRADE_NOTIFY = "starChallengeUpgradeNotify";//星级挑战成功
|
||||
public static final String SUPER_VISION = "supervision";//超级发言警告
|
||||
public static final String PK_RANK_UPDATE = "RankingRankUpdate";//PK排位赛更新数据
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class LiveStetUpStatusModel extends BaseModel {
|
||||
|
||||
@SerializedName("wishList")
|
||||
private String wishList;
|
||||
@SerializedName("ai_state")
|
||||
private String aiState;
|
||||
|
||||
/**
|
||||
* wishList 1设置 0 未设置
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public boolean getWishListState() {
|
||||
return TextUtils.equals(wishList, "1");
|
||||
}
|
||||
|
||||
/**
|
||||
* aiState 1打开机器人 0 未设置
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public boolean getAiStateState() {
|
||||
return TextUtils.equals(aiState, "1");
|
||||
}
|
||||
|
||||
public String getWishList() {
|
||||
return wishList;
|
||||
}
|
||||
|
||||
public LiveStetUpStatusModel setWishList(String wishList) {
|
||||
this.wishList = wishList;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getAiState() {
|
||||
return aiState;
|
||||
}
|
||||
|
||||
public LiveStetUpStatusModel setAiState(String aiState) {
|
||||
this.aiState = aiState;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -15,6 +15,7 @@ import com.yunbao.common.bean.LinkMicUserBeanV2;
|
||||
import com.yunbao.common.bean.LiveAiRobotBean;
|
||||
import com.yunbao.common.bean.LiveInfoModel;
|
||||
import com.yunbao.common.bean.LiveRoomActivityBanner;
|
||||
import com.yunbao.common.bean.LiveStetUpStatusModel;
|
||||
import com.yunbao.common.bean.MsgSwitchDetailModel;
|
||||
import com.yunbao.common.bean.NewPeopleInfo;
|
||||
import com.yunbao.common.bean.NobleRankHideUserListModel;
|
||||
@@ -522,11 +523,18 @@ public interface PDLiveApi {
|
||||
/**
|
||||
* 机器人修改话术
|
||||
*/
|
||||
@GET("/api/public/?service=Live.updateAiAutomaticSpeech ")
|
||||
@GET("/api/public/?service=Live.updateAiAutomaticSpeech")
|
||||
Observable<ResponseModel<List<String>>> updateAiAutomaticSpeech(
|
||||
@Query("type") String type,
|
||||
@Query("id") String id,
|
||||
@Query("content") String content
|
||||
);
|
||||
|
||||
/**
|
||||
* 开播获取机器人状态和心愿单状态
|
||||
*/
|
||||
@GET("/api/public/?service=Live.getLiveStetUpStatus")
|
||||
Observable<ResponseModel<LiveStetUpStatusModel>> getLiveStetUpStatus(
|
||||
@Query("liveuid") String liveUid
|
||||
);
|
||||
}
|
||||
|
||||
@@ -7,7 +7,6 @@ import android.text.TextUtils;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.cosmos.baseutil.app.AppContext;
|
||||
import com.google.gson.Gson;
|
||||
import com.lzf.easyfloat.EasyFloat;
|
||||
import com.yunbao.common.CommonAppContext;
|
||||
@@ -39,7 +38,25 @@ public class IMLoginManager extends BaseCacheManager {
|
||||
private final String IS_FLOAT = "is_float";
|
||||
private final String IS_HINT = "is_hint";
|
||||
private final String IS_HINT2 = "is_hint2";
|
||||
private final String SELECT_CLARITY = "selectClarity";
|
||||
|
||||
/**
|
||||
* 设置清晰度
|
||||
*
|
||||
* @param selectClarity
|
||||
*/
|
||||
public void setSelectClarity(int selectClarity) {
|
||||
put(SELECT_CLARITY, selectClarity);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取清晰度
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public int getSelectClarity() {
|
||||
return getInt(SELECT_CLARITY, 1);
|
||||
}
|
||||
|
||||
public boolean isHint() {
|
||||
return 1 == getInt(IS_HINT, 0);
|
||||
|
||||
@@ -4,6 +4,7 @@ import android.content.Context;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.widget.EditText;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
@@ -17,14 +18,17 @@ import com.yunbao.common.utils.ToastUtil;
|
||||
*/
|
||||
public class InputCustomPopup extends CenterPopupView {
|
||||
private String message = "";
|
||||
private int title = R.string.dialog_tip;
|
||||
|
||||
public InputCustomPopup(@NonNull Context context, String message) {
|
||||
public InputCustomPopup(@NonNull Context context, String message, int title) {
|
||||
super(context);
|
||||
this.message = message;
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public InputCustomPopup(@NonNull Context context) {
|
||||
public InputCustomPopup(@NonNull Context context,int title) {
|
||||
super(context);
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
// 返回自定义弹窗的布局
|
||||
@@ -38,7 +42,9 @@ public class InputCustomPopup extends CenterPopupView {
|
||||
protected void onCreate() {
|
||||
super.onCreate();
|
||||
EditText content = findViewById(R.id.content);
|
||||
TextView titleText = findViewById(R.id.title);
|
||||
content.setText(message);
|
||||
titleText.setText(title);
|
||||
findViewById(R.id.btn_cancel).setOnClickListener(new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
||||
@@ -0,0 +1,116 @@
|
||||
package com.yunbao.common.views;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.RelativeLayout;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.lxj.xpopup.core.BottomPopupView;
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
|
||||
public class LiveClarityCustomPopup extends BottomPopupView implements View.OnClickListener {
|
||||
private int selectClarity = 1;
|
||||
private RelativeLayout lineSd, lineHd, lineFhd;
|
||||
private ImageView iconSd, iconHd, iconFhd;
|
||||
|
||||
public int getSelectClarity() {
|
||||
return selectClarity;
|
||||
}
|
||||
|
||||
public LiveClarityCustomPopup(@NonNull Context context, int selectClarity) {
|
||||
super(context);
|
||||
this.selectClarity = selectClarity;
|
||||
}
|
||||
|
||||
public LiveClarityCustomPopup(@NonNull Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
||||
}
|
||||
|
||||
// 返回自定义弹窗的布局
|
||||
@Override
|
||||
protected int getImplLayoutId() {
|
||||
return R.layout.dialog_live_clarity;
|
||||
}
|
||||
|
||||
// 执行初始化操作,比如:findView,设置点击,或者任何你弹窗内的业务逻辑
|
||||
@Override
|
||||
protected void onCreate() {
|
||||
super.onCreate();
|
||||
initView();
|
||||
initDate();
|
||||
}
|
||||
|
||||
private void initView() {
|
||||
lineSd = findViewById(R.id.line_sd);
|
||||
lineHd = findViewById(R.id.line_hd);
|
||||
lineFhd = findViewById(R.id.line_fhd);
|
||||
iconSd = findViewById(R.id.icon_sd);
|
||||
iconHd = findViewById(R.id.icon_hd);
|
||||
iconFhd = findViewById(R.id.icon_fhd);
|
||||
selectClarity(selectClarity);
|
||||
//流畅
|
||||
ViewClicksAntiShake.clicksAntiShake(lineSd, () -> {
|
||||
selectClarity = 0;
|
||||
selectClarity(selectClarity);
|
||||
dismiss();
|
||||
});
|
||||
//高清
|
||||
ViewClicksAntiShake.clicksAntiShake(lineHd, () -> {
|
||||
selectClarity = 1;
|
||||
selectClarity(selectClarity);
|
||||
dismiss();
|
||||
|
||||
});
|
||||
//超高清
|
||||
ViewClicksAntiShake.clicksAntiShake(lineFhd, () -> {
|
||||
selectClarity = 2;
|
||||
selectClarity(selectClarity);
|
||||
dismiss();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 状态选择
|
||||
*
|
||||
* @param selectClarity
|
||||
*/
|
||||
private void selectClarity(int selectClarity) {
|
||||
switch (selectClarity) {
|
||||
case 0:
|
||||
lineSd.setSelected(true);
|
||||
lineHd.setSelected(false);
|
||||
lineFhd.setSelected(false);
|
||||
iconSd.setVisibility(VISIBLE);
|
||||
iconHd.setVisibility(GONE);
|
||||
iconFhd.setVisibility(GONE);
|
||||
break;
|
||||
case 1:
|
||||
lineSd.setSelected(false);
|
||||
lineHd.setSelected(true);
|
||||
lineFhd.setSelected(false);
|
||||
iconSd.setVisibility(GONE);
|
||||
iconHd.setVisibility(VISIBLE);
|
||||
iconFhd.setVisibility(GONE);
|
||||
break;
|
||||
case 2:
|
||||
lineSd.setSelected(false);
|
||||
lineHd.setSelected(false);
|
||||
lineFhd.setSelected(true);
|
||||
iconSd.setVisibility(GONE);
|
||||
iconHd.setVisibility(GONE);
|
||||
iconFhd.setVisibility(VISIBLE);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void initDate() {
|
||||
}
|
||||
}
|
||||
@@ -136,7 +136,7 @@ public class LiveRobotMessageCustomPopup extends BottomPopupView {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
new XPopup.Builder(getContext())
|
||||
.asCustom(new InputCustomPopup(getContext()).setListener(new InputCustomPopup.InputCustomListener() {
|
||||
.asCustom(new InputCustomPopup(getContext(),R.string.automatic_message_sending).setListener(new InputCustomPopup.InputCustomListener() {
|
||||
@Override
|
||||
public void onConfirm(String text) {
|
||||
//添加消息语
|
||||
|
||||
@@ -82,7 +82,7 @@ public class LiveRobotSayHelloCustomPopup extends BottomPopupView {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
new XPopup.Builder(getContext())
|
||||
.asCustom(new InputCustomPopup(getContext()).setListener(new InputCustomPopup.InputCustomListener() {
|
||||
.asCustom(new InputCustomPopup(getContext(), R.string.automatic_greeting_setting).setListener(new InputCustomPopup.InputCustomListener() {
|
||||
@Override
|
||||
public void onConfirm(String text) {
|
||||
//添加消息语
|
||||
|
||||
@@ -53,7 +53,7 @@ public class RobotMessageViewHolder extends RecyclerView.ViewHolder {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
new XPopup.Builder(itemView.getContext())
|
||||
.asCustom(new InputCustomPopup(itemView.getContext(), message.getContent()).setListener(new InputCustomPopup.InputCustomListener() {
|
||||
.asCustom(new InputCustomPopup(itemView.getContext(), message.getContent(), R.string.automatic_message_sending).setListener(new InputCustomPopup.InputCustomListener() {
|
||||
@Override
|
||||
public void onConfirm(String text) {
|
||||
LiveNetManager.get(itemView.getContext())
|
||||
|
||||
@@ -53,7 +53,7 @@ public class RobotSayHelloViewHoler extends RecyclerView.ViewHolder {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
new XPopup.Builder(itemView.getContext())
|
||||
.asCustom(new InputCustomPopup(itemView.getContext(), message.getContent()).setListener(new InputCustomPopup.InputCustomListener() {
|
||||
.asCustom(new InputCustomPopup(itemView.getContext(), message.getContent(), R.string.automatic_greeting_setting).setListener(new InputCustomPopup.InputCustomListener() {
|
||||
@Override
|
||||
public void onConfirm(String text) {
|
||||
LiveNetManager.get(itemView.getContext())
|
||||
|
||||
Reference in New Issue
Block a user