Merge branch 'master' into dev_share

This commit is contained in:
2023-03-30 11:47:44 +08:00
155 changed files with 4555 additions and 338 deletions

View File

@@ -16,6 +16,7 @@ public class BannerBean {
private int type;
private String name;
private int activityId=0;
private int mIconRes;
private StarChallengeStatusModel model;
@@ -100,6 +101,14 @@ public class BannerBean {
this.activityId = activityId;
}
public int getIconRes() {
return mIconRes;
}
public void setIconRes(int mIconRes) {
this.mIconRes = mIconRes;
}
@Override
public String toString() {
return "BannerBean{" +

View File

@@ -28,4 +28,12 @@ public class HttpCallbackModel extends BaseModel {
public void setMsg(String msg) {
this.msg = msg;
}
@Override
public String toString() {
return "HttpCallbackModel{" +
"code=" + code +
", msg='" + msg + '\'' +
'}';
}
}

View File

@@ -0,0 +1,162 @@
package com.yunbao.common.bean;
import androidx.annotation.NonNull;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.google.gson.annotations.SerializedName;
/**
* 联系方式
*/
public class LiveAnchorCallMeModel extends BaseModel {
@SerializedName("id")
private int id;
@SerializedName("isShow")
private int isShow;
@SerializedName("gift_id")
private int giftId;
@SerializedName("giftImage")
private String giftImage;
@SerializedName("content")
private String content;
@SerializedName("wechat")
private AppBean wechat;
@SerializedName("line")
private AppBean line;
@SerializedName("whatsApp")
private AppBean whatsApp;
public LiveAnchorCallMeModel() {
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getGiftImage() {
return giftImage;
}
public void setGiftImage(String giftImage) {
this.giftImage = giftImage;
}
public int getIsShow() {
return isShow;
}
public void setIsShow(int isShow) {
this.isShow = isShow;
}
public int getGiftId() {
return giftId;
}
public void setGiftId(int giftId) {
this.giftId = giftId;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public AppBean getWechat() {
if (wechat == null) {
wechat = new AppBean();
}
return wechat;
}
public void setWechat(AppBean wechat) {
this.wechat = wechat;
}
public AppBean getLine() {
if (line == null) {
line = new AppBean();
}
return line;
}
public void setLine(AppBean line) {
this.line = line;
}
public AppBean getWhatsApp() {
if (whatsApp == null) {
whatsApp = new AppBean();
}
return whatsApp;
}
public void setWhatsApp(AppBean whatsApp) {
this.whatsApp = whatsApp;
}
@Override
public String toString() {
return "LiveAnchorCallMeModel{" +
"id=" + id +
", isShow=" + isShow +
", giftId=" + giftId +
", giftImage='" + giftImage + '\'' +
", content='" + content + '\'' +
", wechat=" + wechat +
", line=" + line +
", whatsApp=" + whatsApp +
'}';
}
public static class AppBean {
private String number;
private int isShow;
public AppBean() {
}
public AppBean(String number, int isShow) {
this.number = number;
this.isShow = isShow;
}
public String getNumber() {
return number;
}
public void setNumber(String number) {
this.number = number;
}
public int getIsShow() {
return isShow;
}
public void setIsShow(int isShow) {
this.isShow = isShow;
}
@NonNull
@Override
public String toString() {
return "AppBean{" +
"number='" + number + '\'' +
", isShow=" + isShow +
'}';
}
public JSONObject toJSONObject() {
return (JSONObject) JSON.toJSON(this);
}
}
}

View File

@@ -0,0 +1,80 @@
package com.yunbao.common.bean;
import com.google.gson.annotations.SerializedName;
import java.util.List;
public class LiveAnchorSayModel extends BaseModel{
@SerializedName("livePreview")
private LivePreview livePreview;
@SerializedName("style")
private List<String> style;
public LiveAnchorSayModel() {
}
public LivePreview getLivePreview() {
return livePreview;
}
public void setLivePreview(LivePreview livePreview) {
this.livePreview = livePreview;
}
public List<String> getStyle() {
return style;
}
public void setStyle(List<String> style) {
this.style = style;
}
public class LivePreview{
private int isShow;
private String content;
private String styleImage;
public LivePreview() {
}
public int getIsShow() {
return isShow;
}
public void setIsShow(int isShow) {
this.isShow = isShow;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public String getStyleImage() {
return styleImage;
}
public void setStyleImage(String styleImage) {
this.styleImage = styleImage;
}
@Override
public String toString() {
return "LivePreview{" +
"isShow=" + isShow +
", content='" + content + '\'' +
", styleImage='" + styleImage + '\'' +
'}';
}
}
@Override
public String toString() {
return "LiveAnchorSayModel{" +
"livePreview=" + livePreview +
", style=" + style +
'}';
}
}

View File

@@ -0,0 +1,155 @@
package com.yunbao.common.bean;
import androidx.annotation.NonNull;
import com.google.gson.annotations.SerializedName;
import com.yunbao.common.CommonAppConfig;
import com.yunbao.common.utils.StringUtil;
public class LiveUserMailBoxModel extends BaseModel {
@SerializedName("id")
private int id;
@SerializedName("uid")
private int uid;
@SerializedName("liveuid")
private int liveUid;
@SerializedName("is_read")
private int isRead;
@SerializedName("content")
private String content;
@SerializedName("create_time")
private String createTime;
@SerializedName("gift_id")
private int giftId;
@SerializedName("userName")
private String userName;
@SerializedName("anchorName")
private String anchorName;
@SerializedName("url")
private String url;
public LiveUserMailBoxModel() {
}
public LiveUserMailBoxModel(int id, int uid, int liveUid, String content, String createTime, int giftId, String userName, String anchorName) {
this.id = id;
this.uid = uid;
this.liveUid = liveUid;
this.content = content;
this.createTime = createTime;
this.giftId = giftId;
this.userName = userName;
this.anchorName = anchorName;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public int getUid() {
return uid;
}
public void setUid(int uid) {
this.uid = uid;
}
public int getLiveUid() {
return liveUid;
}
public void setLiveUid(int liveUid) {
this.liveUid = liveUid;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public String getCreateTime() {
return createTime;
}
public void setCreateTime(String createTime) {
this.createTime = createTime;
}
public int getGiftId() {
return giftId;
}
public void setGiftId(int giftId) {
this.giftId = giftId;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getAnchorName() {
return anchorName;
}
public void setAnchorName(String anchorName) {
this.anchorName = anchorName;
}
public int getIsRead() {
return isRead;
}
public void setIsRead(int isRead) {
this.isRead = isRead;
}
public String getUrl() {
if (StringUtil.isEmpty(url)) {
url = "http://www.baidu.com";
} else {
if (!url.startsWith("http")) {
url = CommonAppConfig.HOST + "/" + url;
}
if (url.contains("?")) {
url += "&";
} else {
url += "?";
}
url += "uid=" + CommonAppConfig.getInstance().getUid() + "&token="
+ CommonAppConfig.getInstance().getToken();
}
return url;
}
public void setUrl(String url) {
this.url = url;
}
@NonNull
@Override
public String toString() {
return "LiveUserMailBoxModel{" +
"id=" + id +
", uid=" + uid +
", liveUid=" + liveUid +
", isRead=" + isRead +
", content='" + content + '\'' +
", createTime='" + createTime + '\'' +
", giftId=" + giftId +
", userName='" + userName + '\'' +
", anchorName='" + anchorName + '\'' +
", url='" + url + '\'' +
'}';
}
}

View File

@@ -2,6 +2,7 @@ package com.yunbao.common.bean;
import android.text.TextUtils;
import com.google.gson.Gson;
import com.google.gson.annotations.SerializedName;
/**
@@ -17,6 +18,17 @@ public class NewLevelModel extends BaseModel {
private String levemax;
@SerializedName("thumb")
private String thumb;
@SerializedName("icon")
private String icon;
@SerializedName("colour")
private String colour;
@SerializedName("live_icon")
private String liveIcon = "https://downs.yaoulive.com/level1/img_1-9.png";
public static NewLevelModel objectFromData(String str) {
return new Gson().fromJson(str, NewLevelModel.class);
}
public String getId() {
return id;
@@ -67,4 +79,28 @@ public class NewLevelModel extends BaseModel {
this.thumb = thumb;
return this;
}
public String getIcon() {
return icon;
}
public void setIcon(String icon) {
this.icon = icon;
}
public String getColour() {
return colour;
}
public void setColour(String colour) {
this.colour = colour;
}
public String getLiveIcon() {
return liveIcon;
}
public void setLiveIcon(String liveIcon) {
this.liveIcon = liveIcon;
}
}

View File

@@ -27,6 +27,7 @@ public abstract class AbsDialogPopupWindow extends BottomPopupView {
public void showDialog() {
XPopup.Builder builder = new XPopup.Builder(mContext);
builder.isDestroyOnDismiss(true);
builder.enableDrag(false);
buildDialog(builder);
builder.asCustom(this).show();
}

View File

@@ -44,7 +44,7 @@ public class API extends BaseApi {
public PDLiveApi pdLiveApi(Context context) {
if (null == pdLiveApi) {
//实例化gson
pdLiveApi=createPDLiveApi(true);
pdLiveApi = createPDLiveApi(true, true);
}
return pdLiveApi;
}
@@ -52,10 +52,23 @@ public class API extends BaseApi {
/**
* 创建新的PDLiveApi兼容部分接口需要控制是否添加UID参数
* 仅有需要不添加uid的接口使用默认请用pdLiveApi()
*
* @param isNeedUid 是否需要用户uid参数
* @return PDLiveApi
*/
public PDLiveApi createPDLiveApi(boolean isNeedUid){
public PDLiveApi createPDLiveApi(boolean isNeedUid) {
return createPDLiveApi(isNeedUid, true);
}
/**
* 创建新的PDLiveApi兼容部分接口需要控制是否添加UID参数
* 仅有需要不添加uid或token的接口使用默认请用pdLiveApi()
*
* @param isNeedUid 是否需要用户uid参数
* @param isNeedToken 是否需要用户Token
* @return PDLiveApi
*/
public PDLiveApi createPDLiveApi(boolean isNeedUid, boolean isNeedToken) {
Gson gson = new GsonBuilder()
.registerTypeAdapter(Date.class, new DateTypeAdapter())
.create();
@@ -64,20 +77,20 @@ public class API extends BaseApi {
OkHttpClient.Builder builder = new OkHttpClient()
.newBuilder()
.addInterceptor(initQuery(isNeedUid,CommonAppContext.sInstance.getApplicationContext()))
.addInterceptor(initQuery(isNeedUid, isNeedToken, CommonAppContext.sInstance.getApplicationContext()))
.addInterceptor(loggingInterceptor);
return create(builder.build(),
GsonConverterFactory.create(gson), RxJava2CallAdapterFactory.create(), CommonAppConfig.HOST, PDLiveApi.class);
}
//公共参数
public Interceptor initQuery(boolean isNeedUid,final Context context) {
public Interceptor initQuery(boolean isNeedUid, boolean isNeedToken, final Context context) {
Interceptor addQueryParameterInterceptor = new Interceptor() {
@Override
public Response intercept(Chain chain) throws IOException {
Request request = chain.request();
//配置公共参数
request = new ParamsContext(request, context).getInRequest(isNeedUid);
request = new ParamsContext(request, context).getInRequest(isNeedUid, isNeedToken);
return chain.proceed(request);
}
};

View File

@@ -217,6 +217,8 @@ public class CommonHttpUtil {
}
if (obj.containsKey("clarity")) {
IMLoginManager.get(context).setClarity(obj.getString("clarity"));
} if (obj.containsKey("defaultBubbleUrl")) {
IMLoginManager.get(context).setDefaultBubbleUrl(obj.getString("defaultBubbleUrl"));
}
} catch (Exception e) {
String error = "info[0]:" + info[0] + "\n\n\n" + "Exception:" + e.getClass() + "---message--->" + e.getMessage();

View File

@@ -1,5 +1,6 @@
package com.yunbao.common.http;
import com.alibaba.fastjson.JSONObject;
import com.yunbao.common.bean.ActiveModel;
import com.yunbao.common.bean.AnchorRecommendModel;
import com.yunbao.common.bean.BaseModel;
@@ -14,11 +15,14 @@ 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.LiveDataInfoModel;
import com.yunbao.common.bean.LiveInfoModel;
import com.yunbao.common.bean.LiveRoomActivityBanner;
import com.yunbao.common.bean.LiveStetUpStatusModel;
import com.yunbao.common.bean.LiveTaskModel;
import com.yunbao.common.bean.LiveUserMailBoxModel;
import com.yunbao.common.bean.MsgSwitchDetailModel;
import com.yunbao.common.bean.NewPeopleInfo;
import com.yunbao.common.bean.NobleRankHideUserListModel;
@@ -575,4 +579,61 @@ public interface PDLiveApi {
Observable<ResponseModel<List<ListInfoMessageModel>>> getAnchorMsg(
@Query("liveuid") String liveUid, @Query("page") int page, @Query("limit") int limit
);
/**
* 获取女神说数据
*/
@GET("/api/public/?service=Live.getLivePreviewInfo")
Observable<ResponseModel<LiveAnchorSayModel>> getLivePreviewInfo(
@Query("liveuid") String liveUid
);
/**
* 设置女神说
*
* @param isShow 是否显示
* @param content 内容
* @param styleImage 女神说底图地址
*
*/
@GET("/api/public/?service=Live.setLivePreview")
Observable<ResponseModel<String>> setLivePreviewInfo(
@Query("liveuid") String liveUid,
@Query("isShow") int isShow,
@Query("content") String content,
@Query("styleImage")String styleImage
);
/**
* 设置主播联系方式
*/
@GET("/api/public/?service=Live.setAnchorContact")
Observable<ResponseModel<String>> setAnchorContact(
@Query("liveuid") String liveUid,
@Query("isShow") int show,
@Query("gift_id") int giftId,
@Query("content") String content,
@Query("wechat") JSONObject wechat,
@Query("line") JSONObject line,
@Query("whatsApp") JSONObject whatsApp
);
/**
* 获取主播联系方式
*/
@GET("/api/public/?service=Live.getContactInfo")
Observable<ResponseModel<LiveAnchorCallMeModel>> getContactInfo(
@Query("liveuid") String liveUid
);
/**
* 获取收件箱信息
*/
@GET("/api/public/?service=Live.getContactMsg")
Observable<ResponseModel<List<LiveUserMailBoxModel>>> getContactMsg();
/**
* 删除联系方式信件
*/
@GET("/api/public/?service=Live.delContactMsg")
Observable<ResponseModel<String>> delContactMsg(
@Query("msgId") int msgId
);
}

View File

@@ -20,7 +20,7 @@ public class GetRequestParams implements IRequestParam {
* @return
*/
@Override
public Request getRequest(boolean isNeedUid, Request request, Context context) {
public Request getRequest(boolean isNeedUid,boolean isNeedToken, Request request, Context context) {
//添加公共参数
if (IMLoginManager.isLogin(context)) {
IMLoginModel model = IMLoginManager.get(context).getUserInfo();
@@ -36,7 +36,9 @@ public class GetRequestParams implements IRequestParam {
if (isNeedUid) {
builder.addQueryParameter("uid", String.valueOf(model.getId()));
}
builder.addQueryParameter("token", model.getToken());
if(isNeedToken) {
builder.addQueryParameter("token", model.getToken());
}
}
return request.newBuilder().url(builder.build()).build();

View File

@@ -5,5 +5,5 @@ import android.content.Context;
import okhttp3.Request;
public interface IRequestParam {
Request getRequest(boolean isNeedUid,Request request, Context context);
Request getRequest(boolean isNeedUid,boolean isNeedToken, Request request, Context context);
}

View File

@@ -14,7 +14,7 @@ public class ParamsContext {
this.request = request;
}
public Request getInRequest(boolean isNeedUid) {
public Request getInRequest(boolean isNeedUid,boolean isNeedToken) {
switch (request.method()) {
case "GET":
iRequestParam = new GetRequestParams();
@@ -23,6 +23,6 @@ public class ParamsContext {
iRequestParam = new PostRequestParams();
break;
}
return iRequestParam.getRequest(isNeedUid,request, context);
return iRequestParam.getRequest(isNeedUid,isNeedToken,request, context);
}
}

View File

@@ -12,7 +12,7 @@ import okhttp3.Request;
public class PostRequestParams implements IRequestParam {
@Override
public Request getRequest(boolean isNeedUid, Request request, Context context) {
public Request getRequest(boolean isNeedUid,boolean isNeedToken, Request request, Context context) {
if (request.body() instanceof FormBody) {
FormBody.Builder bodyBuilder = new FormBody.Builder();
@@ -32,7 +32,9 @@ public class PostRequestParams implements IRequestParam {
if (isNeedUid) {
bodyBuilder.addEncoded("uid", String.valueOf(model.getId()));
}
bodyBuilder.addEncoded("token", model.getToken());
if(isNeedToken) {
bodyBuilder.addEncoded("token", model.getToken());
}
formBody = bodyBuilder.build();
}
}

View File

@@ -4,6 +4,7 @@ import android.content.Context;
import android.text.TextUtils;
import android.util.Log;
import com.alibaba.fastjson.JSONObject;
import com.yunbao.common.Constants;
import com.yunbao.common.R;
import com.yunbao.common.bean.ActiveModel;
@@ -16,11 +17,14 @@ import com.yunbao.common.bean.LinkMicUserBean;
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.LiveDataInfoModel;
import com.yunbao.common.bean.LiveInfoModel;
import com.yunbao.common.bean.LiveRoomActivityBanner;
import com.yunbao.common.bean.LiveStetUpStatusModel;
import com.yunbao.common.bean.LiveTaskModel;
import com.yunbao.common.bean.LiveUserMailBoxModel;
import com.yunbao.common.bean.NobleRankHideUserListModel;
import com.yunbao.common.bean.NobleTrumpetModel;
import com.yunbao.common.bean.PkRankBean;
@@ -45,6 +49,7 @@ import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.disposables.Disposable;
import io.reactivex.functions.Consumer;
import io.reactivex.schedulers.Schedulers;
import retrofit2.http.Query;
/**
@@ -1145,6 +1150,143 @@ public class LiveNetManager {
}).isDisposed();
}
/**
* 获取女神说数据
*/
public void getLivePreviewInfo(String liveUid, HttpCallback<LiveAnchorSayModel> callback) {
API.get().pdLiveApi(mContext)
.getLivePreviewInfo(liveUid)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(listResponseModel -> {
callback.onSuccess(listResponseModel.getData().getInfo());
}, throwable -> {
callback.onError(throwable.getMessage());
}).isDisposed();
}
/**
* 设置女神说
*
* @param isShow 是否显示
* @param content 内容
* @param styleImage 女神说底图地址
*/
public void setLivePreviewInfo(String liveUid,
int isShow,
String content,
String styleImage, HttpCallback<String> callback) {
API.get().pdLiveApi(mContext)
.setLivePreviewInfo(liveUid, isShow, content, styleImage)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(listResponseModel -> {
if (callback != null) {
callback.onSuccess(listResponseModel.getData().getInfo());
}
}, throwable -> {
if (callback != null) {
callback.onError(throwable.getMessage());
}
}).isDisposed();
}
/**
* 设置主播联系方式
*
* @param liveUid 直播间id
* @param callMe 载体
* @param callback 回调
*/
public void setAnchorCallMe(String liveUid,
LiveAnchorCallMeModel callMe,
HttpCallback<String> callback) {
API.get().createPDLiveApi(false, false)
.setAnchorContact(liveUid,
callMe.getIsShow(),
callMe.getGiftId(),
callMe.getContent(),
callMe.getWechat().toJSONObject(),
callMe.getLine().toJSONObject(),
callMe.getWhatsApp().toJSONObject())
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(listResponseModel -> {
if (callback != null) {
callback.onSuccess(listResponseModel.getData().getInfo());
}
}, throwable -> {
if (callback != null) {
callback.onError(throwable.getMessage());
}
}).isDisposed();
}
/**
* 获取收件箱信息
*
* @param callback 回调
*/
public void getContactMsg(HttpCallback<List<LiveUserMailBoxModel>> callback) {
API.get().pdLiveApi(mContext)
.getContactMsg()
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(listResponseModel -> {
if (callback != null) {
callback.onSuccess(listResponseModel.getData().getInfo());
}
}, throwable -> {
if (callback != null) {
callback.onError(throwable.getMessage());
}
}).isDisposed();
}
/**
* 获取主播联系方式
*
* @param liveUid 直播间id
* @param callback 回调
*/
public void getContactInfo(String liveUid, HttpCallback<LiveAnchorCallMeModel> callback) {
API.get().pdLiveApi(mContext)
.getContactInfo(liveUid)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(listResponseModel -> {
if (callback != null) {
callback.onSuccess(listResponseModel.getData().getInfo());
}
}, throwable -> {
if (callback != null) {
callback.onError(throwable.getMessage());
}
}).isDisposed();
}
/**
* 删除联系方式信件
*
* @param msgId 信息id
* @param callback 回调
*/
public void delContactInfo(int msgId, HttpCallback<String> callback) {
API.get().pdLiveApi(mContext)
.delContactMsg(msgId)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(listResponseModel -> {
if (callback != null) {
callback.onSuccess(listResponseModel.getData().getInfo());
}
}, throwable -> {
if (callback != null) {
callback.onError(throwable.getMessage());
}
}).isDisposed();
}
/**
* 直播间取消网络请求
*/

View File

@@ -42,6 +42,19 @@ public class IMLoginManager extends BaseCacheManager {
private final String SELECT_CLARITY = "selectClarity";
private final String CLARITY = "clarity";
private final String xiaJBG = "xiaJBG";
private final String keyDefaultBubbleUrl = "defaultBubbleUrl";
private final String STATUS_ANCHOR_SAY = "anchorSay";
private final String STATUS_ANCHOR_CALL = "anchorCallMe";
public void setDefaultBubbleUrl(String defaultBubbleUrl) {
put(keyDefaultBubbleUrl, defaultBubbleUrl);
}
public String getKeyDefaultBubbleUrl() {
return getString(keyDefaultBubbleUrl);
}
public void setXiaJBG(boolean xjbg) {
put(xiaJBG, xjbg);
@@ -84,6 +97,34 @@ public class IMLoginManager extends BaseCacheManager {
}
/**
* 获取女神说设置状态
*/
public int getAnchorSayStatus() {
return getInt(STATUS_ANCHOR_SAY, 0);
}
/**
* 获取联系主播方式设置状态
*/
public int getAnchorCallStatus() {
return getInt(STATUS_ANCHOR_CALL, 0);
}
/**
* 设置女神说设置状态
*/
public void setAnchorSayStatus(int status) {
put(STATUS_ANCHOR_SAY, status);
}
/**
* 设置联系主播方式设置状态
*/
public void setAnchorCallMeStatus(int status) {
put(STATUS_ANCHOR_CALL, status);
}
public boolean isHint() {
return 1 == getInt(IS_HINT, 0);
}

View File

@@ -16,6 +16,8 @@ import java.util.List;
public class NewLevelManager extends BaseCacheManager {
private final String KEY_USER_LEVEL = "keyUserLevel";
private final String KEY_ANCHOR_LEVEL = "keyAnchorLevel";
private final String KEY_LIVE_LEVEL = "keyLiveLevel";
private List<NewLevelModel> newLevelModels = new ArrayList<>();
private List<NewLevelModel> keyAnchorLevel = new ArrayList<>();

View File

@@ -24,7 +24,9 @@ public class LiveOpenCustomPopup extends CenterPopupView {
//房间类型
private LiveRoomTypeBean liveRoomTypeBean;
private TextView textClarity, textLiveRoomType, textLiveClass, textLiveWishlist, textRobot;
private TextView textClarity, textLiveRoomType, textLiveClass, textLiveWishlist, textRobot, textSay, textCall;
private int status_say, status_call;
public LiveOpenCustomPopup setClassBean(LiveClassBean classBean) {
this.classBean = classBean;
@@ -65,6 +67,8 @@ public class LiveOpenCustomPopup extends CenterPopupView {
textLiveClass = findViewById(R.id.text_live_class);
textLiveWishlist = findViewById(R.id.text_live_wishlist);
textRobot = findViewById(R.id.text_robot);
textSay = findViewById(R.id.text_say);
textCall = findViewById(R.id.text_call);
if (classBean != null) {
textLiveClass.setText(classBean.getName());
}
@@ -114,6 +118,24 @@ public class LiveOpenCustomPopup extends CenterPopupView {
}
}
});
//设置女神说
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.line_say), new ViewClicksAntiShake.ViewClicksCallBack() {
@Override
public void onViewClicks() {
if (callBack != null) {
callBack.openAnchorSay();
}
}
});
//设置联系方式
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.line_call), new ViewClicksAntiShake.ViewClicksCallBack() {
@Override
public void onViewClicks() {
if (callBack != null) {
callBack.openCallMe();
}
}
});
}
public void setSelectClarity(int selectClarity) {
@@ -130,7 +152,27 @@ public class LiveOpenCustomPopup extends CenterPopupView {
}
}
public void setSayStatus(boolean isShow) {
textSay.setText(isShow ? R.string.do_set : R.string.not_set);
}
public void setCallMeStatus(boolean isShow) {
textCall.setText(isShow ? R.string.robot_yes : R.string.robot_no);
}
public LiveOpenCustomPopup setSayStatus(int status) {
this.status_say = status;
return this;
}
public LiveOpenCustomPopup setCallMeStatus(int status) {
this.status_call = status;
return this;
}
public void initDate() {
textSay.setText(status_say == 1 ? R.string.do_set : R.string.not_set);
textCall.setText(status_call == 1 ? R.string.robot_yes : R.string.robot_no);
LiveNetManager.get(getContext())
.getLiveStetUpStatus(String.valueOf(IMLoginManager.get(getContext()).getUserInfo().getId()),
new HttpCallback<LiveStetUpStatusModel>() {
@@ -142,7 +184,7 @@ public class LiveOpenCustomPopup extends CenterPopupView {
@Override
public void onError(String error) {
ToastUtil.show( R.string.net_error);
ToastUtil.show(R.string.net_error);
}
});
@@ -174,5 +216,11 @@ public class LiveOpenCustomPopup extends CenterPopupView {
//打開心願單
void openWishlist();
//设置女神说
void openAnchorSay();
//设置联系方式
void openCallMe();
}
}

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle">
<corners android:radius="11.67dp" />
<solid android:color="#E6000000" />
</shape>
</item>
</selector>

View File

@@ -335,7 +335,48 @@
android:textColor="#FF9A9A9A"
android:textSize="12sp" />
</LinearLayout>
<LinearLayout
android:id="@+id/live_tool_anchor_say"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="23dp"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:layout_width="40dp"
android:layout_height="40dp"
android:src="@mipmap/ic_live_fun_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_call_me"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="23dp"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:layout_width="40dp"
android:layout_height="40dp"
android:src="@mipmap/ic_live_fun_anchor_letter" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:text="@string/live_fun_call_me"
android:textColor="#FF9A9A9A"
android:textSize="12sp" />
</LinearLayout>
</LinearLayout>
</HorizontalScrollView>

View File

@@ -0,0 +1,55 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="72dp"
android:background="@color/white"
android:paddingTop="24dp">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/titleView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_centerHorizontal="true"
android:gravity="center"
android:textColor="@color/textColor"
android:textSize="18sp"
android:textStyle="bold" />
<ImageView
android:id="@+id/btn_back"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_centerVertical="true"
android:padding="9dp"
android:src="@mipmap/icon_back"
android:tint="@color/textColor" />
<ImageView
android:id="@+id/img_more"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:padding="9dp"
android:src="@mipmap/btn_more_black"
android:tint="@color/textColor"
android:visibility="gone" />
<TextView
android:id="@+id/rView"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentRight="true"
android:gravity="center"
android:textColor="@color/textColor"
android:textSize="13sp"
android:layout_marginRight="25dp"
android:text="充值未到账?"
android:visibility="gone"
android:textStyle="bold" />
</RelativeLayout>
</FrameLayout>

View File

@@ -2,7 +2,7 @@
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="280dp"
android:layout_height="340dp"
android:layout_height="440dp"
android:orientation="vertical"
app:cardCornerRadius="12dp"
app:cardElevation="16dp">
@@ -206,6 +206,80 @@
</LinearLayout>
<LinearLayout
android:id="@+id/line_say"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="29dp"
android:layout_marginTop="20dp"
android:layout_marginEnd="29dp"
android:gravity="center_vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/live_fun_anchor_say"
android:textColor="#999999"
android:textSize="14sp" />
<View
android:layout_width="0dp"
android:layout_height="1dp"
android:layout_weight="1" />
<TextView
android:id="@+id/text_say"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/clarity"
android:textColor="#FFC621"
android:textSize="14sp" />
<ImageView
android:layout_width="5dp"
android:layout_height="10dp"
android:layout_marginStart="6dp"
android:src="@mipmap/icon_more_open" />
</LinearLayout>
<LinearLayout
android:id="@+id/line_call"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="29dp"
android:layout_marginTop="20dp"
android:layout_marginEnd="29dp"
android:gravity="center_vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/live_fun_call_me"
android:textColor="#999999"
android:textSize="14sp" />
<View
android:layout_width="0dp"
android:layout_height="1dp"
android:layout_weight="1" />
<TextView
android:id="@+id/text_call"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/clarity"
android:textColor="#FFC621"
android:textSize="14sp" />
<ImageView
android:layout_width="5dp"
android:layout_height="10dp"
android:layout_marginStart="6dp"
android:src="@mipmap/icon_more_open" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">

View File

@@ -83,7 +83,7 @@
android:layout_gravity="end"
android:layout_marginEnd="12dp"
android:drawablePadding="4dp"
android:drawableEnd="@mipmap/icon_more"
android:drawableEnd="@mipmap/icon_more_live_menu"
android:gravity="center_vertical"
android:text="@string/click_to_view"
android:textColor="#ff8c8c8c"

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

@@ -735,7 +735,7 @@
<string name="live_close_exit">Exit</string>
<string name="user">User</string>
<string name="automatic_chat">If you don\'t take the initiative,how can we have a story?\nTell the anchor say hi~</string>
<string name="automatic_chat">If you don\'t take the initiative,how can we have a story?Tell the anchor say hi~</string>
<string name="add_follow">+ follow</string>
<string name="add_into_active">Enter activity</string>
@@ -1089,4 +1089,5 @@ Limited ride And limited avatar frame</string>
<string name="live_medal_des4">Get a fan badge for giving gifts</string>
<string name="clear_unread_messages">Whether to clear unread messages</string>
<string name="support_login">The application collects location data to support login and registration functions.</string>
<string name="layout_live_anchor_say_ready_title">女神說</string>
</resources>

View File

@@ -734,6 +734,8 @@
<string name="live_mic">語音連麥</string>
<string name="live_wks">周星榜</string>
<string name="live_zslk">暫時離開</string>
<string name="live_fun_call_me">聯繫方式</string>
<string name="live_fun_anchor_say">女神說</string>
<string name="live_zslk1">恢復直播</string>
<string name="live_set_wishlist_num">請輸入數字</string>
<string name="guard_tip_day">您是當前主播的周守護\n守護日期截止到</string>
@@ -780,7 +782,7 @@
<string name="live_close_exit">直接退出</string>
<string name="user">用戶</string>
<string name="automatic_chat">你都不主動我們怎麼會有故事,\n跟主播Say Hi吧~</string>
<string name="automatic_chat">你都不主動我們怎麼會有故事跟主播Say Hi吧~</string>
<string name="add_follow">+ 關注</string>
<string name="add_into_active">進入活動</string>
@@ -1085,7 +1087,10 @@
<string name="sign_up_for">註冊PD LIVE</string>
<string name="register_and_log_in">註冊並登錄</string>
<string name="enjoy_a_lot">開通貴族,尊享超多特權!</string>
<string name="say_something3">說點什麽吧...</string>
<string name="come_hint">%s 来了</string>
<string name="layout_live_anchor_say_ready_title">女神說</string>
</resources>