Merge branch 'dev_6.5.0_anchor_call_me'
# Conflicts: # common/src/main/java/com/yunbao/common/manager/IMLoginManager.java # common/src/main/res/values/strings.xml # live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java
@ -8,6 +8,7 @@ import android.os.Looper;
|
||||
import android.util.Log;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.yunbao.common.BuildConfig;
|
||||
import com.yunbao.common.bean.CrashSaveBean;
|
||||
import com.yunbao.common.utils.FileUtil;
|
||||
import com.yunbao.common.utils.SpUtil;
|
||||
@ -101,7 +102,9 @@ public class NeverCrashUtils {
|
||||
Log.e(TAG, "未捕获的主线程异常行为", e);
|
||||
}
|
||||
e.printStackTrace();
|
||||
//Toast.makeText(application, "发生闪退:"+e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
if(BuildConfig.DEBUG) {
|
||||
Toast.makeText(application, "发生闪退:"+e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
FileUtil.saveStringToFile(new File(application.getDir("files", Context.MODE_PRIVATE).getAbsolutePath()), throwableToString(e), "error.log");
|
||||
getMainCrashHandler().mainException(Looper.getMainLooper().getThread(), e);
|
||||
// return;
|
||||
|
@ -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{" +
|
||||
|
@ -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 + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -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 +
|
||||
'}';
|
||||
}
|
||||
}
|
@ -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 + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
@ -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();
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
};
|
||||
|
@ -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
|
||||
);
|
||||
}
|
||||
|
@ -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();
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
* 直播间取消网络请求
|
||||
*/
|
||||
|
@ -43,6 +43,8 @@ public class IMLoginManager extends BaseCacheManager {
|
||||
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);
|
||||
@ -52,6 +54,8 @@ public class IMLoginManager extends BaseCacheManager {
|
||||
return getString(keyDefaultBubbleUrl);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void setXiaJBG(boolean xjbg) {
|
||||
put(xiaJBG, xjbg);
|
||||
}
|
||||
@ -93,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);
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
9
common/src/main/res/drawable/background_e6000.xml
Normal 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>
|
@ -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>
|
||||
|
||||
|
@ -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>
|
@ -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">
|
||||
|
BIN
common/src/main/res/mipmap-xxhdpi/ic_live_fun_anchor_letter.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/ic_live_fun_anchor_say.png
Normal file
After Width: | Height: | Size: 2.4 KiB |
@ -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>
|
||||
|
@ -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>
|
||||
@ -1088,6 +1090,7 @@
|
||||
<string name="say_something3">說點什麽吧...</string>
|
||||
<string name="come_hint">%s 来了</string>
|
||||
|
||||
<string name="layout_live_anchor_say_ready_title">女神說</string>
|
||||
|
||||
|
||||
</resources>
|
||||
|
BIN
live/src/main/assets/ic_live_anchor_call_me.svga
Normal file
@ -68,6 +68,7 @@ import com.yunbao.live.dialog.LiveNewGuardListDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveRedPackListDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveRedPackSendDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveShareDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveUserAnchorMailBoxPopDialog;
|
||||
import com.yunbao.live.dialog.LiveUserDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveUserMoreDialogFragment;
|
||||
import com.yunbao.live.http.LiveHttpConsts;
|
||||
@ -108,7 +109,7 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
|
||||
public String anyway;
|
||||
public ViewGroup mContainer;
|
||||
protected ViewGroup mPageContainer;
|
||||
protected LiveRoomViewHolder mLiveRoomViewHolder;
|
||||
public LiveRoomViewHolder mLiveRoomViewHolder;
|
||||
protected AbsLiveViewHolder mLiveBottomViewHolder;
|
||||
protected LiveAddImpressViewHolder mLiveAddImpressViewHolder;
|
||||
protected LiveContributeViewHolder mLiveContributeViewHolder;
|
||||
@ -895,8 +896,9 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
|
||||
* 打开私信列表窗口
|
||||
*/
|
||||
public void openChatListWindow() {
|
||||
Intent intent = new Intent(mContext, PDLIiveChatActivity.class);
|
||||
mContext.startActivity(intent);
|
||||
// Intent intent = new Intent(mContext, PDLIiveChatActivity.class);
|
||||
// mContext.startActivity(intent);
|
||||
new LiveUserAnchorMailBoxPopDialog(mContext).showDialog();
|
||||
}
|
||||
|
||||
|
||||
@ -1288,7 +1290,7 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
Log.e("LiveUserMoreDialog", error);
|
||||
ToastUtil.show( R.string.net_error);
|
||||
ToastUtil.show(R.string.net_error);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
|
@ -483,6 +483,8 @@ public class LiveAnchorActivity extends LiveActivity implements LiveFunctionClic
|
||||
}
|
||||
mLiveRoomViewHolder.initHourRankList();
|
||||
mLiveRoomViewHolder.startAnchorLight();
|
||||
//初始化女神说
|
||||
mLiveRoomViewHolder.initAnchorSay();
|
||||
}
|
||||
if (mLiveAnchorViewHolder == null) {
|
||||
mLiveAnchorViewHolder = new LiveAnchorViewHolder(mContext, mContainer);
|
||||
|
@ -1277,6 +1277,9 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
manager.endDRGif();
|
||||
}
|
||||
break;
|
||||
case LIVE_HIDE_MSG_RED:
|
||||
showMsgRed(-1);
|
||||
break;
|
||||
|
||||
|
||||
}
|
||||
@ -1412,6 +1415,21 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
});
|
||||
}
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
public void showMsgRed(int num) {
|
||||
if (manager == null) {
|
||||
return;
|
||||
}
|
||||
if (num == -1) {
|
||||
manager.mLiveAudienceViewHolder.mRedPoint.setVisibility(View.GONE);
|
||||
return;
|
||||
} else if (num > 0) {
|
||||
manager.mLiveAudienceViewHolder.mRedPoint.setText(num + "");
|
||||
}
|
||||
manager.mLiveAudienceViewHolder.mRedPoint.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
|
||||
public void closeRoom() {
|
||||
runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
|
@ -262,6 +262,7 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
|
||||
mLiveReadyViewHolder = new LiveNewReadyRyViewHolder(mContext, mContainer, mLiveSDK);
|
||||
mLiveReadyViewHolder.setManager(manager);
|
||||
mLiveReadyViewHolder.addToParent();
|
||||
mLiveReadyViewHolder.setLiveUid(mLiveUid);
|
||||
mLiveReadyViewHolder.subscribeActivityLifeCycle();
|
||||
mLiveLinkMicPresenter = new LiveLinkMicPresenter(mContext, mLivePushViewHolder, true, mLiveSDK, mContainer);
|
||||
mLiveLinkMicAnchorPresenter = new LiveLinkMicAnchorPresenter(mContext, mLivePushViewHolder, true, mLiveSDK, mContainer);
|
||||
@ -779,7 +780,8 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
|
||||
mLiveRoomViewHolder.initHourRankList();
|
||||
}
|
||||
mLiveRoomViewHolder.startAnchorLight();
|
||||
|
||||
//初始化女神说
|
||||
mLiveRoomViewHolder.initAnchorSay();
|
||||
}
|
||||
if (mLiveAnchorViewHolder == null) {
|
||||
mLiveAnchorViewHolder = new LiveRyAnchorViewHolder(mContext, mContainer);
|
||||
|
@ -0,0 +1,303 @@
|
||||
package com.yunbao.live.adapter;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.yunbao.common.bean.LiveAnchorCallMeModel;
|
||||
import com.yunbao.common.bean.PrankGiftBean;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
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.DialogUitl;
|
||||
import com.yunbao.common.utils.StringUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.dialog.GiftPopDialog;
|
||||
import com.yunbao.live.dialog.LiveAnchorEditCallMeEditAppDialog;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class LiveAnchorEditCallMeAdapter extends RecyclerView.Adapter<LiveAnchorEditCallMeAdapter.BaseViewHolder> {
|
||||
public static final int TYPE_GIFT = 0;
|
||||
public static final int TYPE_LETTER = 1;
|
||||
public static final int TYPE_APP_WECHAT = 2;
|
||||
public static final int TYPE_APP_LINE = 3;
|
||||
public static final int TYPE_APP_WHATSAPP = 4;
|
||||
private Context mContext;
|
||||
private OnItemClickListener<TmpData> onItemClickListener;
|
||||
private List<TmpData> list = new ArrayList<>();
|
||||
|
||||
public LiveAnchorEditCallMeAdapter(Context mContext) {
|
||||
this.mContext = mContext;
|
||||
}
|
||||
|
||||
public void setList(List<TmpData> list) {
|
||||
this.list = list;
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
public void setOnItemClickListener(OnItemClickListener<TmpData> onItemClickListener) {
|
||||
this.onItemClickListener = onItemClickListener;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemViewType(int position) {
|
||||
return list.get(position).getType();
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public BaseViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
BaseViewHolder holder;
|
||||
switch (viewType) {
|
||||
case TYPE_GIFT:
|
||||
holder = new GiftViewHolder(LayoutInflater.from(mContext).inflate(R.layout.item_anchor_call_me_gift, parent, false));
|
||||
break;
|
||||
case TYPE_LETTER:
|
||||
holder = new LetterViewHolder(LayoutInflater.from(mContext).inflate(R.layout.item_anchor_call_me_letter, parent, false));
|
||||
break;
|
||||
default:
|
||||
holder = new AppViewHolder(LayoutInflater.from(mContext).inflate(R.layout.item_anchor_call_me_app, parent, false));
|
||||
}
|
||||
return holder;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull BaseViewHolder holder, int position) {
|
||||
holder.setData(list.get(position), position);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return list.size();
|
||||
}
|
||||
|
||||
|
||||
public static class TmpData {
|
||||
private String value;
|
||||
private int status;
|
||||
private int type;
|
||||
|
||||
public TmpData() {
|
||||
}
|
||||
|
||||
public TmpData(String value, int status, int type) {
|
||||
this.value = value;
|
||||
this.status = status;
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public int getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(int status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public int getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(int type) {
|
||||
this.type = type;
|
||||
}
|
||||
}
|
||||
|
||||
public class BaseViewHolder extends RecyclerView.ViewHolder {
|
||||
|
||||
public BaseViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
}
|
||||
|
||||
public void setData(TmpData data, int position) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class GiftViewHolder extends BaseViewHolder {
|
||||
|
||||
private View select;
|
||||
private ImageView giftIcon;
|
||||
|
||||
public GiftViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
select = itemView.findViewById(R.id.select);
|
||||
giftIcon = itemView.findViewById(R.id.gift_icon);
|
||||
select.setOnClickListener(v -> {
|
||||
initGiftData();
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setData(TmpData data, int position) {
|
||||
super.setData(data, position);
|
||||
if (!StringUtil.isEmpty(data.getValue())) {
|
||||
ImgLoader.display(mContext, data.getValue(), giftIcon);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void initGiftData() {
|
||||
new GiftPopDialog(mContext, new GiftPopDialog.ActionListener() {
|
||||
|
||||
@Override
|
||||
public void onSelectGift(PrankGiftBean bean) {
|
||||
if (bean != null) {
|
||||
ImgLoader.display(mContext, bean.getIcon(), giftIcon);
|
||||
if (onItemClickListener != null) {
|
||||
onItemClickListener.onItemClick(new TmpData(bean.getGiftId() + "", 1, TYPE_GIFT), getAbsoluteAdapterPosition());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDismiss() {
|
||||
}
|
||||
})
|
||||
.setShowNumber(false)
|
||||
.setTitle(WordUtil.getString(R.string.live_anchor_edit_call_me_select_gift))
|
||||
.showDialog()
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public class LetterViewHolder extends BaseViewHolder {
|
||||
TextView letter;
|
||||
View edit;
|
||||
|
||||
public LetterViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
letter = itemView.findViewById(R.id.letterText);
|
||||
edit = itemView.findViewById(R.id.edit);
|
||||
edit.setOnClickListener(v -> {
|
||||
new LiveAnchorEditCallMeEditAppDialog(mContext, TYPE_LETTER).setDefValue(list.get(1).getValue()).setOnValueListener(new OnItemClickListener<String>() {
|
||||
@Override
|
||||
public void onItemClick(String bean, int position) {
|
||||
if (StringUtil.isEmpty(bean)) {
|
||||
letter.setText(WordUtil.getString(R.string.live_anchor_edit_call_me_not_filled));
|
||||
letter.setTextColor(Color.parseColor("#80FFFFFF"));
|
||||
} else {
|
||||
letter.setText(bean);
|
||||
letter.setTextColor(Color.WHITE);
|
||||
}
|
||||
if (onItemClickListener != null) {
|
||||
onItemClickListener.onItemClick(new TmpData(letter.getText().toString(), 1, TYPE_LETTER), getAbsoluteAdapterPosition());
|
||||
}
|
||||
}
|
||||
}).showDialog();
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setData(TmpData data, int position) {
|
||||
super.setData(data, position);
|
||||
letter.setText(data.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
public class AppViewHolder extends BaseViewHolder {
|
||||
TextView contact;
|
||||
View edit;
|
||||
ImageView status;
|
||||
ImageView icon;
|
||||
|
||||
public AppViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
contact = itemView.findViewById(R.id.contact);
|
||||
edit = itemView.findViewById(R.id.app_edit);
|
||||
status = itemView.findViewById(R.id.app_switch);
|
||||
icon = itemView.findViewById(R.id.gift_icon);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setData(TmpData data, int position) {
|
||||
super.setData(data, position);
|
||||
if (StringUtil.isEmpty(data.getValue())) {
|
||||
contact.setTag(null);
|
||||
contact.setText(WordUtil.getString(R.string.live_anchor_edit_call_me_not_filled));
|
||||
contact.setTextColor(Color.parseColor("#80FFFFFF"));
|
||||
} else {
|
||||
contact.setTag(data.getValue());
|
||||
contact.setText(data.getValue());
|
||||
contact.setTextColor(Color.WHITE);
|
||||
}
|
||||
if (data.getStatus() == 0) {
|
||||
status.setImageResource(R.mipmap.special_icon_off);
|
||||
} else if (data.getStatus() == 1) {
|
||||
status.setImageResource(R.mipmap.special_icon_on);
|
||||
}
|
||||
status.setTag(data.getStatus());
|
||||
status.setOnClickListener(v -> {
|
||||
if (StringUtil.isEmpty((String) contact.getTag())) {
|
||||
ToastUtil.show(WordUtil.getString(R.string.live_anchor_edit_call_me_not_filled_toash));
|
||||
return;
|
||||
}
|
||||
int tag = (int) v.getTag();
|
||||
if (tag == 0) {
|
||||
status.setImageResource(R.mipmap.special_icon_on);
|
||||
status.setTag(1);
|
||||
} else {
|
||||
status.setImageResource(R.mipmap.special_icon_off);
|
||||
status.setTag(0);
|
||||
}
|
||||
if (onItemClickListener != null) {
|
||||
onItemClickListener.onItemClick(new TmpData((String) contact.getTag(), (Integer) status.getTag(), data.getType()), position);
|
||||
}
|
||||
});
|
||||
edit.setOnClickListener(v -> {
|
||||
new LiveAnchorEditCallMeEditAppDialog(mContext, data.getType()).setDefValue((String) contact.getTag()).setOnValueListener(new OnItemClickListener<String>() {
|
||||
@Override
|
||||
public void onItemClick(String bean, int position) {
|
||||
if (StringUtil.isEmpty(bean)) {
|
||||
contact.setTag(null);
|
||||
contact.setText(WordUtil.getString(R.string.live_anchor_edit_call_me_not_filled));
|
||||
contact.setTextColor(Color.parseColor("#80FFFFFF"));
|
||||
} else {
|
||||
contact.setTag(bean);
|
||||
contact.setText(bean);
|
||||
contact.setTextColor(Color.WHITE);
|
||||
}
|
||||
if (onItemClickListener != null) {
|
||||
onItemClickListener.onItemClick(new TmpData((String) contact.getTag(), (Integer) status.getTag(), data.getType()), position);
|
||||
}
|
||||
}
|
||||
}).showDialog();
|
||||
});
|
||||
switch (data.getType()) {
|
||||
case TYPE_APP_WECHAT:
|
||||
icon.setImageResource(R.mipmap.icon_wechat_x);
|
||||
break;
|
||||
case TYPE_APP_LINE:
|
||||
icon.setImageResource(R.mipmap.icon_line_x);
|
||||
break;
|
||||
case TYPE_APP_WHATSAPP:
|
||||
icon.setImageResource(R.mipmap.icon_whatsapp_x);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,88 @@
|
||||
package com.yunbao.live.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.interfaces.OnItemClickListener;
|
||||
import com.yunbao.live.R;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class LiveAnchorSayItemsAdapter extends RecyclerView.Adapter<LiveAnchorSayItemsAdapter.ItemsViewHolder> {
|
||||
private Context mContext;
|
||||
private List<String> list;
|
||||
private int click = -1;
|
||||
private OnItemClickListener<String> onItemClickListener;
|
||||
|
||||
public LiveAnchorSayItemsAdapter(Context mContext) {
|
||||
this.mContext = mContext;
|
||||
list = new ArrayList<>();
|
||||
}
|
||||
|
||||
public void setList(List<String> list) {
|
||||
this.list = list;
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
public void setOnItemClickListener(OnItemClickListener<String> onItemClickListener) {
|
||||
this.onItemClickListener = onItemClickListener;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public ItemsViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
return new ItemsViewHolder(LayoutInflater.from(mContext).inflate(R.layout.item_anchor_say, parent, false));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull ItemsViewHolder holder, int position) {
|
||||
holder.setData(list.get(position), position);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return list.size();
|
||||
}
|
||||
|
||||
public class ItemsViewHolder extends RecyclerView.ViewHolder {
|
||||
private TextView textView;
|
||||
private ImageView icon;
|
||||
|
||||
public ItemsViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
textView = itemView.findViewById(R.id.anchor_say_text);
|
||||
icon = itemView.findViewById(R.id.anchor_say_icon);
|
||||
itemView.setOnClickListener(v -> click());
|
||||
textView.setOnClickListener(v -> click());
|
||||
icon.setOnClickListener(v -> click());
|
||||
|
||||
}
|
||||
|
||||
private void click() {
|
||||
click = getAbsoluteAdapterPosition();
|
||||
if (onItemClickListener != null) {
|
||||
onItemClickListener.onItemClick(list.get(click), click);
|
||||
}
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
public void setData(String text, int position) {
|
||||
textView.setText("已输入的\n内容已输\n入的内容\n入的内容");
|
||||
ImgLoader.display(mContext, text, icon);
|
||||
if (position == click) {
|
||||
itemView.setBackgroundResource(R.drawable.bg_anchor_say_select);
|
||||
} else {
|
||||
itemView.setBackgroundResource(R.drawable.bg_anchor_say);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,136 @@
|
||||
package com.yunbao.live.adapter;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.os.Build;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.yunbao.common.bean.BaseModel;
|
||||
import com.yunbao.common.bean.LiveUserMailBoxModel;
|
||||
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.DialogUitl;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.dialog.LiveUserAnchorMailBoxWebInfoPopDialog;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class LiveUserAnchorMailBoxAdapter extends RecyclerView.Adapter<LiveUserAnchorMailBoxAdapter.MailBoxViewHolder> {
|
||||
private Context mContext;
|
||||
private List<LiveUserMailBoxModel> list;
|
||||
OnItemClickListener<LiveUserMailBoxModel> onItemClickListener;
|
||||
|
||||
public LiveUserAnchorMailBoxAdapter(Context mContext) {
|
||||
this.mContext = mContext;
|
||||
list = new ArrayList<>();
|
||||
}
|
||||
|
||||
public void setList(List<LiveUserMailBoxModel> list) {
|
||||
this.list = list;
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
public List<LiveUserMailBoxModel> getList() {
|
||||
return list;
|
||||
}
|
||||
|
||||
public void setOnItemClickListener(OnItemClickListener<LiveUserMailBoxModel> onItemClickListener) {
|
||||
this.onItemClickListener = onItemClickListener;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public MailBoxViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
return new MailBoxViewHolder(LayoutInflater.from(mContext).inflate(R.layout.item_live_user_mailbox, parent, false));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull MailBoxViewHolder holder, int position) {
|
||||
holder.setData(list.get(position), position);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return list.size();
|
||||
}
|
||||
|
||||
public class MailBoxViewHolder extends RecyclerView.ViewHolder {
|
||||
TextView topText;
|
||||
TextView userName;
|
||||
TextView tipText;
|
||||
View del;
|
||||
|
||||
public MailBoxViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
topText = itemView.findViewById(R.id.top_text);
|
||||
userName = itemView.findViewById(R.id.user_name);
|
||||
tipText = itemView.findViewById(R.id.tip);
|
||||
del = itemView.findViewById(R.id.del);
|
||||
}
|
||||
|
||||
void setData(LiveUserMailBoxModel box, int position) {
|
||||
userName.setText(box.getUserName());
|
||||
topText.setText(String.format(WordUtil.getString(R.string.live_user_mailbox_top_text), box.getAnchorName()));
|
||||
tipText.setText(String.format(WordUtil.getString(R.string.live_user_mailbox_tip_text), box.getAnchorName()));
|
||||
del.setOnClickListener(v -> {
|
||||
new DialogUitl.Builder(mContext)
|
||||
.setTitle(WordUtil.getString(R.string.live_user_letter_dialog_title))
|
||||
.setContent(WordUtil.getString(R.string.live_user_letter_dialog_content))
|
||||
.setConfrimString(WordUtil.getString(R.string.live_user_letter_dialog_yes))
|
||||
.setCancelString(WordUtil.getString(R.string.live_user_letter_dialog_no))
|
||||
.setView(R.layout.dialog_live_random_pk)
|
||||
.setCancelable(true)
|
||||
.setClickCallback((dialog, content) -> LiveNetManager.get(mContext).delContactInfo(box.getId(), new HttpCallback<String>() {
|
||||
@Override
|
||||
public void onSuccess(String data) {
|
||||
Log.i("刪除信件", "onSuccess:刪除成功 ");
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||
list.removeIf(it -> it.getId() == box.getId());
|
||||
}
|
||||
System.err.println("-----> list size = " + list.size());
|
||||
notifyDataSetChanged();
|
||||
if (onItemClickListener != null) {
|
||||
onItemClickListener.onItemClick(box, position);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
Log.i("刪除信件", "onError: " + error);
|
||||
}
|
||||
}))
|
||||
.build().show();
|
||||
|
||||
});
|
||||
|
||||
itemView.setOnClickListener(new OnClick(box));
|
||||
userName.setOnClickListener(new OnClick(box));
|
||||
topText.setOnClickListener(new OnClick(box));
|
||||
tipText.setOnClickListener(new OnClick(box));
|
||||
}
|
||||
|
||||
private class OnClick implements View.OnClickListener {
|
||||
LiveUserMailBoxModel box;
|
||||
|
||||
public OnClick(LiveUserMailBoxModel box) {
|
||||
this.box = box;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
new LiveUserAnchorMailBoxWebInfoPopDialog(mContext, box.getAnchorName(), box.getUrl()).showDialog();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -17,8 +17,10 @@ import android.widget.TextView;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.lxj.xpopup.XPopup;
|
||||
import com.yunbao.common.bean.LiveGiftBean;
|
||||
import com.yunbao.common.bean.PrankGiftBean;
|
||||
import com.yunbao.common.dialog.AbsDialogPopupWindow;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.utils.DialogUitl;
|
||||
import com.yunbao.common.utils.StringUtil;
|
||||
@ -34,15 +36,14 @@ import com.yunbao.live.http.LiveHttpUtil;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import androidx.viewpager.widget.ViewPager;
|
||||
|
||||
public class GiftPopDialog extends PopupWindow implements ActionListener, View.OnClickListener {
|
||||
public class GiftPopDialog extends AbsDialogPopupWindow implements ActionListener, View.OnClickListener {
|
||||
|
||||
private View mParent;
|
||||
private Context mContext;
|
||||
private View mContentView;
|
||||
private LiveGiftPagerAdapter mLiveGiftPagerAdapter;
|
||||
private GiftPopDialog.ActionListener mActionListener;
|
||||
private View mLoading;
|
||||
@ -60,16 +61,27 @@ public class GiftPopDialog extends PopupWindow implements ActionListener, View.O
|
||||
private int prangNum;
|
||||
private InputMethodManager imm;
|
||||
private List<PrankGiftBean> giftBeans;
|
||||
private boolean showNumber = true;
|
||||
private View numberView;
|
||||
private String title;
|
||||
private TextView mTitle;
|
||||
|
||||
private void initView(View mRootView) {
|
||||
mLoading = mRootView.findViewById(R.id.loading);
|
||||
items = (RecyclerView) mRootView.findViewById(R.id.items);
|
||||
mViewPager = (ViewPager) mRootView.findViewById(R.id.viewPager);
|
||||
mRadioGroup = (RadioGroup) mRootView.findViewById(R.id.radio_group);
|
||||
mBtnSend = mRootView.findViewById(R.id.btn_send);
|
||||
mBtnContext = mRootView.findViewById(R.id.btn_context);
|
||||
mBtn = mRootView.findViewById(R.id.gift_btn);
|
||||
mBack = mRootView.findViewById(R.id.gift_back);
|
||||
|
||||
public GiftPopDialog(@NonNull Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
private void initView() {
|
||||
mLoading = findViewById(R.id.loading);
|
||||
items = (RecyclerView) findViewById(R.id.items);
|
||||
mViewPager = (ViewPager) findViewById(R.id.viewPager);
|
||||
mRadioGroup = (RadioGroup) findViewById(R.id.radio_group);
|
||||
mBtnSend = findViewById(R.id.btn_send);
|
||||
mBtnContext = findViewById(R.id.btn_context);
|
||||
mBtn = findViewById(R.id.gift_btn);
|
||||
mBack = findViewById(R.id.gift_back);
|
||||
mTitle = findViewById(R.id.title);
|
||||
numberView = findViewById(R.id.btn_send_group);
|
||||
final LinearLayoutManager manager = new LinearLayoutManager(mContext, LinearLayoutManager.HORIZONTAL, false);
|
||||
items.setLayoutManager(manager);
|
||||
mViewPager.setOffscreenPageLimit(5);
|
||||
@ -112,52 +124,41 @@ public class GiftPopDialog extends PopupWindow implements ActionListener, View.O
|
||||
|
||||
}
|
||||
});
|
||||
if (!showNumber) {
|
||||
numberView.setVisibility(View.GONE);
|
||||
prangNum = 1;
|
||||
prangContext = "null";
|
||||
}
|
||||
if (!StringUtil.isEmpty(title)) {
|
||||
mTitle.setText(title);
|
||||
}
|
||||
}
|
||||
|
||||
public GiftPopDialog(Context mContext, View parent, GiftPopDialog.ActionListener actionListener) {
|
||||
public GiftPopDialog(Context mContext, GiftPopDialog.ActionListener actionListener) {
|
||||
super(mContext);
|
||||
this.mContext = mContext;
|
||||
mParent = parent;
|
||||
mActionListener = actionListener;
|
||||
mContentView = LayoutInflater.from(mContext).inflate(R.layout.dialog_live_select_gift_wrap, null);
|
||||
ViewParent viewParent = mContentView.getParent();
|
||||
if (viewParent != null) {
|
||||
((ViewGroup) viewParent).removeView(mContentView);
|
||||
}
|
||||
setContentView(mContentView);
|
||||
setWidth(ViewGroup.LayoutParams.MATCH_PARENT);
|
||||
setHeight(ViewGroup.LayoutParams.MATCH_PARENT);
|
||||
setBackgroundDrawable(new ColorDrawable());
|
||||
setOutsideTouchable(true);
|
||||
setFocusable(true);
|
||||
setAnimationStyle(R.style.leftToRightAnim);
|
||||
setOnDismissListener(new OnDismissListener() {
|
||||
@Override
|
||||
public void onDismiss() {
|
||||
if (mActionListener != null) {
|
||||
if (bean == null || StringUtil.isEmpty(prangContext) || prangNum == 0) {
|
||||
mActionListener.onDismiss();
|
||||
return;
|
||||
}
|
||||
PrankGiftBean giftBean = new PrankGiftBean();
|
||||
giftBean.setGiftId(bean.getId() + "");
|
||||
giftBean.setNum(prangNum);
|
||||
giftBean.setIcon(bean.getIcon());
|
||||
giftBean.setTitle(prangContext);
|
||||
giftBean.setName(bean.getName());
|
||||
mActionListener.onSelectGift(giftBean);
|
||||
System.out.println("gift.bean = " + bean);
|
||||
}
|
||||
ViewParent viewParent = mContentView.getParent();
|
||||
if (viewParent != null) {
|
||||
((ViewGroup) viewParent).removeView(mContentView);
|
||||
}
|
||||
mContentView = null;
|
||||
}
|
||||
});
|
||||
initView(mContentView);
|
||||
// setAnimationStyle(R.style.leftToRightAnim);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate() {
|
||||
super.onCreate();
|
||||
initView();
|
||||
initDate();
|
||||
}
|
||||
|
||||
public GiftPopDialog setShowNumber(boolean showNumber) {
|
||||
this.showNumber = showNumber;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GiftPopDialog setTitle(String title) {
|
||||
this.title = title;
|
||||
return this;
|
||||
}
|
||||
|
||||
private void initDate() {
|
||||
LiveHttpUtil.getNewGiftList(new HttpCallback() {
|
||||
@Override
|
||||
@ -214,10 +215,6 @@ public class GiftPopDialog extends PopupWindow implements ActionListener, View.O
|
||||
}
|
||||
}
|
||||
|
||||
public void show() {
|
||||
showAtLocation(mParent, Gravity.CENTER, 0, 0);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onItemChecked(LiveGiftBean bean) {
|
||||
@ -233,11 +230,11 @@ public class GiftPopDialog extends PopupWindow implements ActionListener, View.O
|
||||
public void onConfirmClick(Dialog dialog, String content) {
|
||||
try {
|
||||
prangNum = Integer.parseInt(content);
|
||||
if (prangNum <= 0 ) {
|
||||
if (prangNum <= 0) {
|
||||
ToastUtil.show("數量不能為0或負數");
|
||||
return;
|
||||
}
|
||||
if(prangNum>999){
|
||||
if (prangNum > 999) {
|
||||
ToastUtil.show("數量不能大於999");
|
||||
return;
|
||||
}
|
||||
@ -298,6 +295,14 @@ public class GiftPopDialog extends PopupWindow implements ActionListener, View.O
|
||||
}
|
||||
}
|
||||
dismiss();
|
||||
|
||||
PrankGiftBean giftBean = new PrankGiftBean();
|
||||
giftBean.setGiftId(bean.getId() + "");
|
||||
giftBean.setNum(prangNum);
|
||||
giftBean.setIcon(bean.getIcon());
|
||||
giftBean.setTitle(prangContext);
|
||||
giftBean.setName(bean.getName());
|
||||
mActionListener.onSelectGift(giftBean);
|
||||
} else if (id == R.id.gift_back) {
|
||||
dismiss();
|
||||
}
|
||||
@ -307,6 +312,16 @@ public class GiftPopDialog extends PopupWindow implements ActionListener, View.O
|
||||
this.giftBeans = giftBeans;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void buildDialog(XPopup.Builder builder) {
|
||||
builder.enableDrag(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int bindLayoutId() {
|
||||
return R.layout.dialog_live_select_gift_wrap;
|
||||
}
|
||||
|
||||
|
||||
public interface ActionListener {
|
||||
void onSelectGift(PrankGiftBean bean);
|
||||
|
@ -0,0 +1,164 @@
|
||||
package com.yunbao.live.dialog;
|
||||
|
||||
import android.content.Context;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.lxj.xpopup.XPopup;
|
||||
import com.yunbao.common.bean.LiveAnchorCallMeModel;
|
||||
import com.yunbao.common.dialog.AbsDialogPopupWindow;
|
||||
import com.yunbao.common.http.base.HttpCallback;
|
||||
import com.yunbao.common.http.live.LiveNetManager;
|
||||
import com.yunbao.common.interfaces.OnItemClickListener;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.adapter.LiveAnchorEditCallMeAdapter;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class LiveAnchorEditCallMeDialog extends AbsDialogPopupWindow {
|
||||
String mLiveUid = "";
|
||||
RecyclerView list;
|
||||
LiveAnchorCallMeModel callMeModel;
|
||||
LiveAnchorEditCallMeAdapter adapter;
|
||||
ImageView status;
|
||||
OnItemClickListener<LiveAnchorCallMeModel> onItemClickListener;
|
||||
|
||||
public LiveAnchorEditCallMeDialog(@NonNull Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void buildDialog(XPopup.Builder builder) {
|
||||
builder.enableDrag(false);
|
||||
builder.autoFocusEditText(false);
|
||||
}
|
||||
|
||||
public LiveAnchorEditCallMeDialog setOnItemClickListener(OnItemClickListener<LiveAnchorCallMeModel> onItemClickListener) {
|
||||
this.onItemClickListener = onItemClickListener;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int bindLayoutId() {
|
||||
return R.layout.dialog_anchor_call_me;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate() {
|
||||
super.onCreate();
|
||||
initView();
|
||||
initData();
|
||||
}
|
||||
|
||||
private void initData() {
|
||||
LiveNetManager.get(getContext())
|
||||
.getContactInfo(mLiveUid, new HttpCallback<LiveAnchorCallMeModel>() {
|
||||
@Override
|
||||
public void onSuccess(LiveAnchorCallMeModel data) {
|
||||
setData(data);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
setData(new LiveAnchorCallMeModel());
|
||||
}
|
||||
|
||||
void setData(LiveAnchorCallMeModel data) {
|
||||
callMeModel = data;
|
||||
List<LiveAnchorEditCallMeAdapter.TmpData> list = new ArrayList<>();
|
||||
list.add(new LiveAnchorEditCallMeAdapter.TmpData(data.getGiftImage(), 1, LiveAnchorEditCallMeAdapter.TYPE_GIFT));
|
||||
list.add(new LiveAnchorEditCallMeAdapter.TmpData(data.getContent(), 1, LiveAnchorEditCallMeAdapter.TYPE_LETTER));
|
||||
list.add(new LiveAnchorEditCallMeAdapter.TmpData(data.getWechat().getNumber(), data.getWechat().getIsShow(), LiveAnchorEditCallMeAdapter.TYPE_APP_WECHAT));
|
||||
list.add(new LiveAnchorEditCallMeAdapter.TmpData(data.getLine().getNumber(), data.getLine().getIsShow(), LiveAnchorEditCallMeAdapter.TYPE_APP_LINE));
|
||||
list.add(new LiveAnchorEditCallMeAdapter.TmpData(data.getWhatsApp().getNumber(), data.getWhatsApp().getIsShow(), LiveAnchorEditCallMeAdapter.TYPE_APP_WHATSAPP));
|
||||
adapter.setList(list);
|
||||
if (callMeModel.getIsShow() == 1) {
|
||||
status.setImageResource(R.mipmap.special_icon_on);
|
||||
status.setTag(1);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
private void initView() {
|
||||
list = findViewById(R.id.anchor_call_list);
|
||||
status = findViewById(R.id.say_switch);
|
||||
findViewById(R.id.btn_close).setOnClickListener(v -> dismiss());
|
||||
adapter = new LiveAnchorEditCallMeAdapter(getContext());
|
||||
adapter.setOnItemClickListener(new OnItemClickListener<LiveAnchorEditCallMeAdapter.TmpData>() {
|
||||
@Override
|
||||
public void onItemClick(LiveAnchorEditCallMeAdapter.TmpData bean, int position) {
|
||||
if (callMeModel == null) {
|
||||
callMeModel = new LiveAnchorCallMeModel();
|
||||
}
|
||||
if (position == 0) {
|
||||
callMeModel.setGiftId(Integer.parseInt(bean.getValue()));
|
||||
} else if (position == 1) {
|
||||
callMeModel.setContent(bean.getValue());
|
||||
} else if (bean.getType() == LiveAnchorEditCallMeAdapter.TYPE_APP_WECHAT) {
|
||||
callMeModel.setWechat(new LiveAnchorCallMeModel.AppBean(bean.getValue(), bean.getStatus()));
|
||||
} else if (bean.getType() == LiveAnchorEditCallMeAdapter.TYPE_APP_LINE) {
|
||||
callMeModel.setLine(new LiveAnchorCallMeModel.AppBean(bean.getValue(), bean.getStatus()));
|
||||
} else if (bean.getType() == LiveAnchorEditCallMeAdapter.TYPE_APP_WHATSAPP) {
|
||||
callMeModel.setWhatsApp(new LiveAnchorCallMeModel.AppBean(bean.getValue(), bean.getStatus()));
|
||||
}
|
||||
}
|
||||
});
|
||||
status.setTag(0);
|
||||
status.setOnClickListener(v -> {
|
||||
if(callMeModel.getGiftId()==0){
|
||||
ToastUtil.show(R.string.live_anchor_edit_call_me_not_gift_toash);
|
||||
return;
|
||||
}
|
||||
int tag = (int) v.getTag();
|
||||
if (tag == 0) {
|
||||
status.setImageResource(R.mipmap.special_icon_on);
|
||||
status.setTag(1);
|
||||
} else {
|
||||
status.setImageResource(R.mipmap.special_icon_off);
|
||||
status.setTag(0);
|
||||
}
|
||||
callMeModel.setIsShow((Integer) status.getTag());
|
||||
});
|
||||
list.setLayoutManager(new LinearLayoutManager(getContext(), LinearLayoutManager.VERTICAL, false));
|
||||
list.setAdapter(adapter);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDismiss() {
|
||||
super.onDismiss();
|
||||
if (callMeModel == null) {
|
||||
return;
|
||||
}
|
||||
LiveNetManager.get(getContext())
|
||||
.setAnchorCallMe(mLiveUid, callMeModel, new HttpCallback<String>() {
|
||||
@Override
|
||||
public void onSuccess(String data) {
|
||||
ToastUtil.show(WordUtil.isZh() ? "成功" : "success");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
ToastUtil.show(error);
|
||||
}
|
||||
});
|
||||
IMLoginManager.get(getContext()).setAnchorCallMeStatus(callMeModel.getIsShow());
|
||||
if (onItemClickListener != null) {
|
||||
onItemClickListener.onItemClick(callMeModel, 0);
|
||||
}
|
||||
}
|
||||
|
||||
public LiveAnchorEditCallMeDialog setLiveUid(String liveUid) {
|
||||
this.mLiveUid = liveUid;
|
||||
return this;
|
||||
}
|
||||
}
|
@ -0,0 +1,115 @@
|
||||
package com.yunbao.live.dialog;
|
||||
|
||||
import static com.yunbao.live.adapter.LiveAnchorEditCallMeAdapter.TYPE_APP_LINE;
|
||||
import static com.yunbao.live.adapter.LiveAnchorEditCallMeAdapter.TYPE_APP_WECHAT;
|
||||
import static com.yunbao.live.adapter.LiveAnchorEditCallMeAdapter.TYPE_APP_WHATSAPP;
|
||||
import static com.yunbao.live.adapter.LiveAnchorEditCallMeAdapter.TYPE_LETTER;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
import android.widget.EditText;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.lxj.xpopup.XPopup;
|
||||
import com.yunbao.common.dialog.AbsDialogPopupWindow;
|
||||
import com.yunbao.common.interfaces.OnItemClickListener;
|
||||
import com.yunbao.common.utils.StringUtil;
|
||||
import com.yunbao.live.R;
|
||||
|
||||
public class LiveAnchorEditCallMeEditAppDialog extends AbsDialogPopupWindow {
|
||||
OnItemClickListener<String> clickListener;
|
||||
private int type;
|
||||
private String defValue;
|
||||
|
||||
private TextView titleView;
|
||||
private TextView title;
|
||||
private EditText edit;
|
||||
|
||||
public LiveAnchorEditCallMeEditAppDialog(@NonNull Context context) {
|
||||
super(context);
|
||||
this.type = TYPE_LETTER;
|
||||
}
|
||||
|
||||
public LiveAnchorEditCallMeEditAppDialog(@NonNull Context context, int type) {
|
||||
super(context);
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void buildDialog(XPopup.Builder builder) {
|
||||
builder.autoFocusEditText(false);
|
||||
builder.moveUpToKeyboard(false);
|
||||
builder.enableDrag(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int bindLayoutId() {
|
||||
return R.layout.dialog_anchor_call_edit_app;
|
||||
}
|
||||
|
||||
public LiveAnchorEditCallMeEditAppDialog setDefValue(String defValue) {
|
||||
this.defValue = defValue;
|
||||
return this;
|
||||
}
|
||||
|
||||
public LiveAnchorEditCallMeEditAppDialog setOnValueListener(OnItemClickListener<String> clickListener) {
|
||||
this.clickListener = clickListener;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDismiss() {
|
||||
super.onDismiss();
|
||||
((InputMethodManager) getContext().getSystemService(Context.INPUT_METHOD_SERVICE)).hideSoftInputFromWindow(getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void onCreate() {
|
||||
super.onCreate();
|
||||
initView();
|
||||
initData();
|
||||
|
||||
switch (type) {
|
||||
case TYPE_LETTER:
|
||||
titleView.setText("填寫信內容");
|
||||
edit.setHint("我能想到最浪漫的事,就是和你一起慢慢變老,一路上收藏點點滴滴的歡笑,留到以後坐著搖椅慢慢聊。");
|
||||
title.setText("信內容");
|
||||
break;
|
||||
case TYPE_APP_WECHAT:
|
||||
titleView.setText("填寫聯系方式");
|
||||
edit.setHint("请输入");
|
||||
title.setText("Wechat账号");
|
||||
break;
|
||||
case TYPE_APP_LINE:
|
||||
titleView.setText("填寫聯系方式");
|
||||
edit.setHint("请输入");
|
||||
title.setText("Line账号");
|
||||
break;
|
||||
case TYPE_APP_WHATSAPP:
|
||||
titleView.setText("填寫聯系方式");
|
||||
edit.setHint("请输入");
|
||||
title.setText("WhatsApp账号");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void initData() {
|
||||
if (!StringUtil.isEmpty(defValue)) {
|
||||
edit.setText(defValue);
|
||||
}
|
||||
}
|
||||
|
||||
void initView() {
|
||||
titleView = findViewById(R.id.titleView);
|
||||
title = findViewById(R.id.title);
|
||||
edit = findViewById(R.id.edit);
|
||||
findViewById(R.id.btn_back).setOnClickListener(v -> dismiss());
|
||||
findViewById(R.id.submit).setOnClickListener(v -> {
|
||||
clickListener.onItemClick(edit.getText().toString(), type);
|
||||
dismiss();
|
||||
});
|
||||
}
|
||||
}
|
@ -0,0 +1,207 @@
|
||||
package com.yunbao.live.dialog;
|
||||
|
||||
import android.content.Context;
|
||||
import android.text.Editable;
|
||||
import android.text.TextWatcher;
|
||||
import android.util.Log;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.View;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.lxj.xpopup.XPopup;
|
||||
import com.yunbao.common.bean.HttpCallbackModel;
|
||||
import com.yunbao.common.bean.LiveAnchorSayModel;
|
||||
import com.yunbao.common.dialog.AbsDialogPopupWindow;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.http.base.HttpCallback;
|
||||
import com.yunbao.common.http.live.LiveNetManager;
|
||||
import com.yunbao.common.interfaces.OnItemClickListener;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.adapter.LiveAnchorSayItemsAdapter;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class LiveAnchorSayPopDialog extends AbsDialogPopupWindow {
|
||||
RecyclerView list;
|
||||
View anchorDemo;
|
||||
LiveAnchorSayItemsAdapter adapter;
|
||||
ImageView saySwitch;
|
||||
ImageView close;
|
||||
ImageView sayBg;
|
||||
TextView sayText;
|
||||
EditText sayEdit;
|
||||
String mLiveUid;
|
||||
String url;
|
||||
LiveAnchorSayModel sayModel;
|
||||
OnItemClickListener<LiveAnchorSayModel> onItemClickListener;
|
||||
|
||||
public LiveAnchorSayPopDialog(@NonNull Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
public LiveAnchorSayPopDialog setLiveUid(String mLiveUid) {
|
||||
this.mLiveUid = mLiveUid;
|
||||
return this;
|
||||
}
|
||||
|
||||
public LiveAnchorSayPopDialog setOnItemClickListener(OnItemClickListener<LiveAnchorSayModel> onItemClickListener) {
|
||||
this.onItemClickListener = onItemClickListener;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void buildDialog(XPopup.Builder builder) {
|
||||
builder.autoFocusEditText(false);
|
||||
builder.enableDrag(false);
|
||||
builder.borderRadius(50);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDismiss() {
|
||||
super.onDismiss();
|
||||
setSayData(url, sayEdit.getText().toString());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int bindLayoutId() {
|
||||
return R.layout.dialog_anchor_say;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate() {
|
||||
super.onCreate();
|
||||
adapter = new LiveAnchorSayItemsAdapter(getContext());
|
||||
anchorDemo = findViewById(R.id.anchor_say);
|
||||
sayText = anchorDemo.findViewById(R.id.anchor_say_text);
|
||||
list = findViewById(R.id.anchor_say_list);
|
||||
saySwitch = findViewById(R.id.say_switch);
|
||||
sayEdit = findViewById(R.id.anchor_say_edit);
|
||||
close = findViewById(R.id.close);
|
||||
sayBg = anchorDemo.findViewById(R.id.anchor_say_icon);
|
||||
list.setLayoutManager(new GridLayoutManager(getContext(), 3));
|
||||
list.setAdapter(adapter);
|
||||
adapter.setOnItemClickListener(new OnItemClickListener<String>() {
|
||||
@Override
|
||||
public void onItemClick(String bean, int position) {
|
||||
anchorDemo.setVisibility(VISIBLE);
|
||||
ImgLoader.display(getContext(), bean, sayBg);
|
||||
url = bean;
|
||||
}
|
||||
});
|
||||
initData();
|
||||
saySwitch.setOnClickListener(v -> {
|
||||
if (saySwitch.getTag() == null) {
|
||||
saySwitch.setTag("");
|
||||
saySwitch.setImageResource(R.mipmap.special_icon_on);
|
||||
sayModel.getLivePreview().setIsShow(1);
|
||||
} else {
|
||||
saySwitch.setTag(null);
|
||||
saySwitch.setImageResource(R.mipmap.special_icon_off);
|
||||
sayModel.getLivePreview().setIsShow(0);
|
||||
}
|
||||
});
|
||||
|
||||
sayEdit.addTextChangedListener(new TextWatcher() {
|
||||
@Override
|
||||
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||
sayModel.getLivePreview().setContent(s.toString());
|
||||
StringBuilder sb = new StringBuilder();
|
||||
int len=6;
|
||||
int n = (s.length() + 3) / len;
|
||||
for (int i = 0; i < n; i++) {
|
||||
if (i < (n - 1)) {
|
||||
sb.append(s.toString().substring(i * len, (i + 1) * len)).append("\n");
|
||||
} else {
|
||||
sb.append(s.toString().substring(i * len));
|
||||
}
|
||||
}
|
||||
if (sb.length() == 0) {
|
||||
sb.append("默认字符\n默认字符\n默认字符");
|
||||
}
|
||||
sayText.setText(sb.toString());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterTextChanged(Editable s) {
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
close.setOnClickListener(v -> {
|
||||
dismiss();
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
private void setSayData(String url, String edit) {
|
||||
LiveNetManager.get(getContext())
|
||||
.setLivePreviewInfo(
|
||||
mLiveUid,
|
||||
sayModel.getLivePreview().getIsShow(),
|
||||
edit,
|
||||
url,
|
||||
new HttpCallback<String>() {
|
||||
@Override
|
||||
public void onSuccess(String data) {
|
||||
Log.i("女神说", "onSuccess: " + data);
|
||||
ToastUtil.show(WordUtil.isZh() ? "成功" : "success");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
Log.e("女神说", "onError: " + error);
|
||||
}
|
||||
}
|
||||
);
|
||||
if (onItemClickListener != null) {
|
||||
onItemClickListener.onItemClick(sayModel, 0);
|
||||
}
|
||||
IMLoginManager.get(getContext()).setAnchorSayStatus(sayModel.getLivePreview().getIsShow());
|
||||
}
|
||||
|
||||
private void initData() {
|
||||
LiveNetManager.get(getContext())
|
||||
.getLivePreviewInfo(mLiveUid, new HttpCallback<LiveAnchorSayModel>() {
|
||||
@Override
|
||||
public void onSuccess(LiveAnchorSayModel data) {
|
||||
sayModel = data;
|
||||
List<String> urls = new ArrayList<>(data.getStyle());
|
||||
adapter.setList(urls);
|
||||
LiveAnchorSayModel.LivePreview preview = data.getLivePreview();
|
||||
if (preview != null) {
|
||||
sayText.setText(preview.getContent());
|
||||
sayEdit.setText(preview.getContent());
|
||||
url = preview.getStyleImage();
|
||||
ImgLoader.display(getContext(), preview.getStyleImage(), sayBg);
|
||||
if (preview.getIsShow() == 1) {
|
||||
saySwitch.setTag("");
|
||||
saySwitch.setImageResource(R.mipmap.special_icon_on);
|
||||
}
|
||||
anchorDemo.setVisibility(VISIBLE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
@ -4,6 +4,7 @@ import static com.yunbao.common.CommonAppConfig.isGetNewWrap;
|
||||
import static com.yunbao.common.utils.RouteUtil.PATH_COIN;
|
||||
import static com.yunbao.live.views.LiveRoomViewHolder.bean1;
|
||||
|
||||
import android.content.DialogInterface;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.graphics.drawable.Drawable;
|
||||
@ -25,7 +26,11 @@ import android.widget.RadioButton;
|
||||
import android.widget.RadioGroup;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
import androidx.fragment.app.FragmentTransaction;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import androidx.viewpager.widget.ViewPager;
|
||||
@ -124,6 +129,9 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On
|
||||
private TextView mVipGoldDesc;
|
||||
private TextView mGiftPackage;
|
||||
private boolean isPk;
|
||||
private int isContactGift = 0;
|
||||
DialogInterface.OnDismissListener onDismissListener;
|
||||
DialogInterface.OnShowListener onShowListener;
|
||||
|
||||
|
||||
@Override
|
||||
@ -155,6 +163,22 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On
|
||||
mLiveGuardInfo = liveGuardInfo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDismiss(DialogInterface dialog) {
|
||||
super.onDismiss(dialog);
|
||||
if (onDismissListener != null) {
|
||||
onDismissListener.onDismiss(dialog);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStart() {
|
||||
super.onStart();
|
||||
if (onShowListener != null) {
|
||||
onShowListener.onShow(getDialog());
|
||||
}
|
||||
}
|
||||
|
||||
public void setPkStatus(boolean pk) {
|
||||
isPk = pk;
|
||||
}
|
||||
@ -208,7 +232,7 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On
|
||||
|
||||
@Override
|
||||
public void onPageSelected(int position) {
|
||||
if (mRadioGroup != null && mRadioGroup.getChildAt(position)!=null) {
|
||||
if (mRadioGroup != null && mRadioGroup.getChildAt(position) != null) {
|
||||
((RadioButton) mRadioGroup.getChildAt(position)).setChecked(true);
|
||||
}
|
||||
}
|
||||
@ -278,6 +302,7 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On
|
||||
mStream = bundle.getString(Constants.LIVE_STREAM);
|
||||
mWishGiftId = bundle.getString(Constants.LIVE_WISH_GIFTID);
|
||||
by = bundle.getString("by");
|
||||
isContactGift = bundle.getBoolean("isContactGift", false) ? 1 : 0;
|
||||
}
|
||||
loadGiftListData();
|
||||
loadUserVip();
|
||||
@ -665,9 +690,9 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On
|
||||
}
|
||||
SendGiftCallback callback = new SendGiftCallback(mLiveGiftBean);
|
||||
if (by != null) {
|
||||
LiveHttpUtil.sendGift("1", mLiveUid, mStream, mLiveGiftBean.getId(), mCount, callback);
|
||||
LiveHttpUtil.sendGift("1", mLiveUid, mStream, mLiveGiftBean.getId(), mCount, isContactGift, callback);
|
||||
} else {
|
||||
LiveHttpUtil.sendGift("0", mLiveUid, mStream, mLiveGiftBean.getId(), mCount, callback);
|
||||
LiveHttpUtil.sendGift("0", mLiveUid, mStream, mLiveGiftBean.getId(), mCount, isContactGift, callback);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -722,6 +747,14 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On
|
||||
mLiveGiftPagerAdapter.refreshId(status.getId());
|
||||
}
|
||||
|
||||
public void setOnDismissListener(DialogInterface.OnDismissListener onDismissListener) {
|
||||
this.onDismissListener = onDismissListener;
|
||||
}
|
||||
|
||||
public void setOnShowListener(DialogInterface.OnShowListener onShowListener) {
|
||||
this.onShowListener = onShowListener;
|
||||
}
|
||||
|
||||
private class SendGiftCallback extends HttpCallback {
|
||||
|
||||
private LiveGiftBean mGiftBean;
|
||||
|
@ -25,7 +25,9 @@ import android.widget.TextView;
|
||||
|
||||
import com.lxj.xpopup.XPopup;
|
||||
import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.bean.LiveAnchorSayModel;
|
||||
import com.yunbao.common.dialog.AbsDialogFragment;
|
||||
import com.yunbao.common.interfaces.OnItemClickListener;
|
||||
import com.yunbao.common.utils.StringUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.views.LiveAnchorMessageCustomPopup;
|
||||
@ -116,6 +118,8 @@ public class LiveNewFunctionDialogFragment extends AbsDialogFragment implements
|
||||
findViewById(R.id.anchor_task).setOnClickListener(this);
|
||||
|
||||
findViewById(R.id.live_tool_robot).setOnClickListener(this);
|
||||
findViewById(R.id.live_tool_call_me).setOnClickListener(this);
|
||||
findViewById(R.id.live_tool_anchor_say).setOnClickListener(this);
|
||||
|
||||
if (leave == 0) {
|
||||
((ImageView) mLeaveView.findViewById(R.id.live_tool_leave_img)).setImageResource(R.mipmap.icon_leave);
|
||||
@ -190,6 +194,11 @@ public class LiveNewFunctionDialogFragment extends AbsDialogFragment implements
|
||||
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((bean, position)
|
||||
-> mLiveRoomHandler.postDelayed(()-> ((LiveRyAnchorActivity)(mContext)).mLiveRoomViewHolder.initAnchorSayData(),1000)).showDialog();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -141,7 +141,7 @@ public class LivePrankDialogFragment extends AbsDialogFragment implements View.O
|
||||
ToastUtil.show("可添加禮物數量達到上限");
|
||||
return;
|
||||
}
|
||||
GiftPopDialog dialog = new GiftPopDialog(mContext, mRootView, new GiftPopDialog.ActionListener() {
|
||||
GiftPopDialog dialog = new GiftPopDialog(mContext, new GiftPopDialog.ActionListener() {
|
||||
|
||||
@Override
|
||||
public void onSelectGift(PrankGiftBean bean) {
|
||||
@ -156,7 +156,7 @@ public class LivePrankDialogFragment extends AbsDialogFragment implements View.O
|
||||
}
|
||||
});
|
||||
dialog.setList(giftBeans);
|
||||
dialog.show();
|
||||
dialog.showDialog();
|
||||
} else {
|
||||
setPrankConfig();
|
||||
}
|
||||
|
@ -0,0 +1,106 @@
|
||||
package com.yunbao.live.dialog;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.lxj.xpopup.XPopup;
|
||||
import com.yunbao.common.bean.LiveUserMailBoxModel;
|
||||
import com.yunbao.common.dialog.AbsDialogPopupWindow;
|
||||
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.Bus;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.adapter.LiveUserAnchorMailBoxAdapter;
|
||||
import com.yunbao.live.event.LiveAudienceEvent;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 用户获取主播联系方式信箱弹框
|
||||
*/
|
||||
public class LiveUserAnchorMailBoxPopDialog extends AbsDialogPopupWindow {
|
||||
private RecyclerView list;
|
||||
private LiveUserAnchorMailBoxAdapter adapter;
|
||||
private View empty;
|
||||
|
||||
public LiveUserAnchorMailBoxPopDialog(@NonNull Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void buildDialog(XPopup.Builder builder) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int bindLayoutId() {
|
||||
return R.layout.dialog_live_user_mailbox;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate() {
|
||||
super.onCreate();
|
||||
adapter = new LiveUserAnchorMailBoxAdapter(getContext());
|
||||
list = findViewById(R.id.mailbox);
|
||||
empty = findViewById(R.id.ic_empty);
|
||||
list.setLayoutManager(new LinearLayoutManager(getContext(), LinearLayoutManager.VERTICAL, false));
|
||||
list.setAdapter(adapter);
|
||||
adapter.setOnItemClickListener((bean, position) -> {
|
||||
if (adapter.getItemCount() == 0) {
|
||||
empty.setVisibility(VISIBLE);
|
||||
list.setVisibility(GONE);
|
||||
}
|
||||
});
|
||||
initData();
|
||||
}
|
||||
|
||||
String TAG = "信箱";
|
||||
|
||||
void initData() {
|
||||
LiveNetManager.get(getContext())
|
||||
.getContactMsg(new HttpCallback<List<LiveUserMailBoxModel>>() {
|
||||
@Override
|
||||
public void onSuccess(List<LiveUserMailBoxModel> data) {
|
||||
Log.i(TAG, "onSuccess: " + data.size());
|
||||
for (LiveUserMailBoxModel datum : data) {
|
||||
Log.i(TAG, "for data : " + datum);
|
||||
}
|
||||
setData(data);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
Log.e(TAG, "onError: " + error);
|
||||
setData(new ArrayList<>());
|
||||
}
|
||||
|
||||
void setData(List<LiveUserMailBoxModel> data) {
|
||||
if (data.isEmpty()) {
|
||||
empty.setVisibility(VISIBLE);
|
||||
list.setVisibility(GONE);
|
||||
return;
|
||||
}
|
||||
adapter.setList(data);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDismiss() {
|
||||
super.onDismiss();
|
||||
for (LiveUserMailBoxModel model : adapter.getList()) {
|
||||
if(model.getIsRead()==0){
|
||||
return;
|
||||
}
|
||||
}
|
||||
Bus.get().post(new LiveAudienceEvent()
|
||||
.setType(LiveAudienceEvent.LiveAudienceType.LIVE_HIDE_MSG_RED));
|
||||
}
|
||||
}
|
@ -0,0 +1,81 @@
|
||||
package com.yunbao.live.dialog;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Build;
|
||||
import android.webkit.WebSettings;
|
||||
import android.webkit.WebView;
|
||||
import android.webkit.WebViewClient;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.lxj.xpopup.XPopup;
|
||||
import com.yunbao.common.CommonAppContext;
|
||||
import com.yunbao.common.dialog.AbsDialogPopupWindow;
|
||||
import com.yunbao.common.utils.JavascriptInterfaceUtils;
|
||||
import com.yunbao.common.utils.L;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.live.R;
|
||||
|
||||
public class LiveUserAnchorMailBoxWebInfoPopDialog extends AbsDialogPopupWindow {
|
||||
WebView mWebView;
|
||||
TextView textView;
|
||||
|
||||
String anchorName;
|
||||
String url;
|
||||
|
||||
public LiveUserAnchorMailBoxWebInfoPopDialog(@NonNull Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
public LiveUserAnchorMailBoxWebInfoPopDialog(@NonNull Context context, String anchorName, String url) {
|
||||
super(context);
|
||||
this.anchorName = anchorName;
|
||||
this.url = url;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void buildDialog(XPopup.Builder builder) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int bindLayoutId() {
|
||||
return R.layout.dialog_live_user_mailbox_web;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate() {
|
||||
super.onCreate();
|
||||
mWebView=findViewById(R.id.webView);
|
||||
textView=findViewById(R.id.title);
|
||||
textView.setText(String.format(WordUtil.getString(R.string.live_user_mailbox_web_title),anchorName));
|
||||
mWebView.addJavascriptInterface(JavascriptInterfaceUtils.getInstance().setmContext(CommonAppContext.getTopActivity(),mWebView),"androidObject");
|
||||
mWebView.getSettings().setJavaScriptEnabled(true);
|
||||
mWebView.getSettings().setDomStorageEnabled(true);
|
||||
String appCachePath = getContext().getCacheDir().getAbsolutePath();
|
||||
mWebView.getSettings().setAppCachePath(appCachePath);
|
||||
mWebView.getSettings().setAllowFileAccess(true);
|
||||
mWebView.getSettings().setAppCacheEnabled(true);
|
||||
mWebView.getSettings().setJavaScriptCanOpenWindowsAutomatically(true); // 是否允许JS打开新窗口
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
mWebView.getSettings().setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);
|
||||
}
|
||||
mWebView.setWebViewClient(new WebViewClient() {
|
||||
@Override
|
||||
public boolean shouldOverrideUrlLoading(WebView view, String url) {
|
||||
L.e("H5-------->" + url);
|
||||
view.loadUrl(url);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPageFinished(WebView view, String url) {
|
||||
// view.loadUrl("javascript:window.androidObject.setHeight(document.body.clientHeight,document.body.clientWidth)");
|
||||
|
||||
}
|
||||
});
|
||||
mWebView.loadUrl(url);
|
||||
}
|
||||
}
|
@ -299,7 +299,8 @@ public class LiveAudienceEvent extends BaseModel {
|
||||
UPDATA_ROBOT(53, "更新机器人消息"),
|
||||
LIVE_VIDEO(54, "画质选择"),
|
||||
LUCKY_100_CHECK(55, "幸运百分百"),
|
||||
LIVE_END(56, "主播下播");
|
||||
LIVE_END(56, "主播下播"),
|
||||
LIVE_HIDE_MSG_RED(57,"隐藏红点");
|
||||
|
||||
private int type;
|
||||
private String name;
|
||||
|
@ -606,10 +606,19 @@ public class LiveHttpUtil {
|
||||
* 观众给主播送礼物
|
||||
*/
|
||||
public static void sendGift(String by, String liveUid, String stream, int giftId, String giftCount, HttpCallback callback) {
|
||||
sendGift(by, liveUid, stream, giftId, giftCount, 0, callback);
|
||||
}
|
||||
|
||||
/**
|
||||
* 观众给主播送礼物
|
||||
* @param isContactGift 是否为联系方式礼物
|
||||
*/
|
||||
public static void sendGift(String by, String liveUid, String stream, int giftId, String giftCount, int isContactGift, HttpCallback callback) {
|
||||
HttpClient.getInstance().get("Live.sendGift", LiveHttpConsts.SEND_GIFT)
|
||||
.params("liveuid", liveUid)
|
||||
.params("stream", stream)
|
||||
.params("giftid", giftId)
|
||||
.params("isContactGift", isContactGift)
|
||||
.params("giftcount", giftCount)
|
||||
.params("isprank", by)
|
||||
.params("appVersion", CommonAppConfig.getInstance().getVersion())
|
||||
|
@ -17,7 +17,7 @@ import org.greenrobot.eventbus.EventBus;
|
||||
|
||||
public abstract class AbsLiveViewHolder extends AbsViewHolder implements View.OnClickListener {
|
||||
|
||||
private TextView mRedPoint;
|
||||
public TextView mRedPoint;
|
||||
|
||||
public AbsLiveViewHolder(Context context, ViewGroup parentView) {
|
||||
super(context, parentView);
|
||||
|
@ -12,7 +12,11 @@ public class Banner4CustomViewHolder implements BannerViewHolder<BannerBean> {
|
||||
@Override
|
||||
public View createView(Context context, int position, BannerBean data) {
|
||||
ImageView icon=new ImageView(context);
|
||||
ImgLoader.display(context,data.getImageUrl(),icon);
|
||||
if(data.getIconRes()!=0){
|
||||
ImgLoader.display(context,data.getIconRes(),icon);
|
||||
}else {
|
||||
ImgLoader.display(context, data.getImageUrl(), icon);
|
||||
}
|
||||
return icon;
|
||||
}
|
||||
}
|
||||
|
@ -27,6 +27,8 @@ import com.lxj.xpopup.interfaces.XPopupCallback;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.Constants;
|
||||
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.LiveRoomTypeBean;
|
||||
import com.yunbao.common.bean.UserBean;
|
||||
@ -35,6 +37,7 @@ import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
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;
|
||||
@ -53,6 +56,8 @@ import com.yunbao.faceunity.FaceManager;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.activity.LiveActivity;
|
||||
import com.yunbao.live.activity.LiveRyAnchorActivity;
|
||||
import com.yunbao.live.dialog.LiveAnchorEditCallMeDialog;
|
||||
import com.yunbao.live.dialog.LiveAnchorSayPopDialog;
|
||||
import com.yunbao.live.dialog.LiveFaceUnityDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveNewRoomClassDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveNewRoomTypeDialogFragment;
|
||||
@ -96,6 +101,7 @@ public class LiveNewReadyRyViewHolder extends AbsViewHolder implements View.OnCl
|
||||
private int selectClarity = 1;
|
||||
private LiveOpenCustomPopup liveOpenCustomPopup;
|
||||
private boolean selector = true;
|
||||
private String mLiveUid;
|
||||
|
||||
public LiveNewReadyRyViewHolder(Context context, ViewGroup parentView, int liveSdk) {
|
||||
super(context, parentView, liveSdk);
|
||||
@ -195,6 +201,8 @@ public class LiveNewReadyRyViewHolder extends AbsViewHolder implements View.OnCl
|
||||
findViewById(R.id.btn_wishlist).setOnClickListener(this);
|
||||
findViewById(R.id.btn_horizontally).setOnClickListener(this);
|
||||
findViewById(R.id.anchor_agreement_layout).setOnClickListener(this);
|
||||
findViewById(R.id.btn_live_anchor_say).setOnClickListener(this);
|
||||
findViewById(R.id.btn_live_anchor_call_me).setOnClickListener(this);
|
||||
|
||||
if (manager != null) {
|
||||
manager.setFaceStatusChanged(new FaceManager.FaceStatusChanged() {
|
||||
@ -389,6 +397,8 @@ public class LiveNewReadyRyViewHolder extends AbsViewHolder implements View.OnCl
|
||||
}
|
||||
// startLive();
|
||||
liveOpenCustomPopup = new LiveOpenCustomPopup(mContext, IMLoginManager.get(mContext).getSelectClarity(), classBean, liveRoomTypeBean)
|
||||
.setSayStatus(IMLoginManager.get(mContext).getAnchorSayStatus())
|
||||
.setCallMeStatus(IMLoginManager.get(mContext).getAnchorCallStatus())
|
||||
.setCallBack(new LiveOpenCustomPopup.LiveOpenCallBack() {
|
||||
@Override
|
||||
|
||||
@ -537,6 +547,16 @@ public class LiveNewReadyRyViewHolder extends AbsViewHolder implements View.OnCl
|
||||
//点击心愿单
|
||||
openWishListWindow();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void openAnchorSay() {
|
||||
openAnchorSayDialog();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void openCallMe() {
|
||||
openAnchorCallMeDialog();
|
||||
}
|
||||
});
|
||||
new XPopup.Builder(mContext)
|
||||
.asCustom(liveOpenCustomPopup)
|
||||
@ -565,6 +585,10 @@ public class LiveNewReadyRyViewHolder extends AbsViewHolder implements View.OnCl
|
||||
.append("&token=")
|
||||
.append(model.getToken());
|
||||
RouteUtil.forwardLiveZhuangBanActivity(url.toString(), false);
|
||||
} else if (i == R.id.btn_live_anchor_say) {
|
||||
openAnchorSayDialog();
|
||||
} else if (i == R.id.btn_live_anchor_call_me) {
|
||||
openAnchorCallMeDialog();
|
||||
}
|
||||
}
|
||||
|
||||
@ -596,6 +620,28 @@ public class LiveNewReadyRyViewHolder extends AbsViewHolder implements View.OnCl
|
||||
}
|
||||
}
|
||||
|
||||
public void openAnchorSayDialog() {
|
||||
new LiveAnchorSayPopDialog(mContext).setLiveUid(mLiveUid).setOnItemClickListener(new OnItemClickListener<LiveAnchorSayModel>() {
|
||||
@Override
|
||||
public void onItemClick(LiveAnchorSayModel bean, int position) {
|
||||
if (liveOpenCustomPopup != null) {
|
||||
liveOpenCustomPopup.setSayStatus(bean.getLivePreview().getIsShow() == 1);
|
||||
}
|
||||
}
|
||||
}).showDialog();
|
||||
}
|
||||
|
||||
public void openAnchorCallMeDialog() {
|
||||
new LiveAnchorEditCallMeDialog(mContext).setLiveUid(mLiveUid).setOnItemClickListener(new OnItemClickListener<LiveAnchorCallMeModel>() {
|
||||
@Override
|
||||
public void onItemClick(LiveAnchorCallMeModel bean, int position) {
|
||||
if (liveOpenCustomPopup != null) {
|
||||
liveOpenCustomPopup.setCallMeStatus(bean.getIsShow() == 1);
|
||||
}
|
||||
}
|
||||
}).showDialog();
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void updateStart(LiveAudienceEvent event) {
|
||||
if (event.getType() == WISH_LIST_UPDATE) {
|
||||
@ -893,4 +939,8 @@ public class LiveNewReadyRyViewHolder extends AbsViewHolder implements View.OnCl
|
||||
public void onDestroy() {
|
||||
LiveHttpUtil.cancel(LiveHttpConsts.CREATE_ROOM);
|
||||
}
|
||||
|
||||
public void setLiveUid(String mLiveUid) {
|
||||
this.mLiveUid = mLiveUid;
|
||||
}
|
||||
}
|
||||
|
@ -71,10 +71,13 @@ import com.yunbao.common.bean.HourRank;
|
||||
import com.yunbao.common.bean.IMLoginModel;
|
||||
import com.yunbao.common.bean.LevelBean;
|
||||
import com.yunbao.common.bean.LinkMicUserBean;
|
||||
import com.yunbao.common.bean.LiveAnchorCallMeModel;
|
||||
import com.yunbao.common.bean.LiveAnchorSayModel;
|
||||
import com.yunbao.common.bean.LiveBean;
|
||||
import com.yunbao.common.bean.LiveGiftBean;
|
||||
import com.yunbao.common.bean.LiveRoomActivityBanner;
|
||||
import com.yunbao.common.bean.LiveUserGiftBean;
|
||||
import com.yunbao.common.bean.LiveUserMailBoxModel;
|
||||
import com.yunbao.common.bean.MsgModel;
|
||||
import com.yunbao.common.bean.NewPeopleTaskModel;
|
||||
import com.yunbao.common.bean.PkRankBean;
|
||||
@ -140,6 +143,7 @@ import com.yunbao.live.custom.TopGradual;
|
||||
import com.yunbao.live.dialog.LiveFaceUnityDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveFansMedalDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveGameDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveGiftDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveHDDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveUserDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveWishListDialogFragment4Audience;
|
||||
@ -301,6 +305,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
private List<BannerBean> mBannerList2 = new ArrayList<>();
|
||||
private List<BannerBean> mBannerList3 = new ArrayList<>();
|
||||
private List<BannerBean> mBannerList4 = new ArrayList<>();
|
||||
private List<BannerBean> mTopBannerList = new ArrayList<>();
|
||||
private LinearLayout btn_event2, btn_event3, btn_event4, enterRoomLeave2;
|
||||
private ImageView imgEvent;
|
||||
private View btnEvent;
|
||||
@ -340,6 +345,13 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
//全服通知
|
||||
private ImageView customFullServiceNotify;
|
||||
|
||||
//----主播说组件---//
|
||||
private View mAnchorSay;
|
||||
private ImageView mAnchorSayImage;
|
||||
private TextView mAnchorSayText;
|
||||
private ImageView mAnchorSayHide;
|
||||
//----!主播说组件---//
|
||||
private Banner topBanner1;//心愿单&联系方式
|
||||
|
||||
public LiveRoomViewHolder(boolean isRys, int forActivity, Context context, ViewGroup parentView, GifImageView gifImageView, SVGAImageView svgaImageView, ViewGroup liveGiftPrizePoolContainer, WindowManager windowManager) {
|
||||
super(context, parentView);
|
||||
@ -682,6 +694,13 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
@Override
|
||||
public void init() {
|
||||
EventBus.getDefault().register(this);
|
||||
mAnchorSay = findViewById(R.id.anchor_say_layout);
|
||||
mAnchorSayImage = (ImageView) findViewById(R.id.anchor_say_icon);
|
||||
mAnchorSayText = (TextView) findViewById(R.id.anchor_say_text);
|
||||
mAnchorSayHide = (ImageView) findViewById(R.id.anchor_say_hide);
|
||||
mAnchorSayHide.setOnClickListener(v -> hideAnchorSay());
|
||||
|
||||
|
||||
btnEvent = findViewById(R.id.btn_event);
|
||||
fullScreen = (FullServiceNotificationView) findViewById(R.id.full_screen);
|
||||
noble = (NobleNoticeView) findViewById(R.id.noble);
|
||||
@ -835,6 +854,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
mPkRankTopIcon = (ImageView) findViewById(R.id.icon_pk_top);
|
||||
mRedVal = (TextView) findViewById(R.id.pk_rank_red_val);
|
||||
mBlueVal = (TextView) findViewById(R.id.pk_rank_blue_val);
|
||||
topBanner1 = (Banner) findViewById(R.id.top_banner1);
|
||||
|
||||
if (LivePushTxViewHolder.mTRTCCloud != null || LivePushRyViewHolder.rtcRoom != null) {
|
||||
fans_btn.setVisibility(View.GONE);
|
||||
@ -1142,6 +1162,12 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
outline.setRoundRect(0, 0, view.getWidth(), view.getHeight(), 10);
|
||||
}
|
||||
});
|
||||
topBanner1.setOutlineProvider(new ViewOutlineProvider() {
|
||||
@Override
|
||||
public void getOutline(View view, Outline outline) {
|
||||
outline.setRoundRect(0, 0, view.getWidth(), view.getHeight(), 10);
|
||||
}
|
||||
});
|
||||
//打招呼消息
|
||||
fastMsgRecyclerView = (RecyclerView) findViewById(R.id.room_fast_msg);
|
||||
fastMsgRecyclerView.setLayoutManager(new LinearLayoutManager(mContext, LinearLayoutManager.HORIZONTAL, false));
|
||||
@ -1190,6 +1216,48 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
new LoadDian9TuUtil().loadDian9TuAssets2(mContext, liveRankPk2, "rectangle_new.png", 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* 隐藏女神说
|
||||
*/
|
||||
private void hideAnchorSay() {
|
||||
boolean hide = mAnchorSay.getTag() == null || (boolean) mAnchorSay.getTag();
|
||||
Animation animation;
|
||||
if (hide) {
|
||||
animation = AnimationUtils.loadAnimation(mContext, R.anim.view_live_anchor_say_text_out);
|
||||
} else {
|
||||
animation = AnimationUtils.loadAnimation(mContext, R.anim.view_live_anchor_say_text_in);
|
||||
}
|
||||
animation.setAnimationListener(new Animation.AnimationListener() {
|
||||
@Override
|
||||
public void onAnimationStart(Animation animation) {
|
||||
if (!hide) {
|
||||
mAnchorSay.setX((float) mAnchorSayImage.getTag());
|
||||
mAnchorSayImage.setVisibility(View.VISIBLE);
|
||||
mAnchorSayText.setVisibility(View.VISIBLE);
|
||||
mAnchorSayHide.setImageResource(R.mipmap.ic_live_anchor_say_show);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationEnd(Animation animation) {
|
||||
if (hide) {
|
||||
mAnchorSayImage.setTag(mAnchorSay.getX());
|
||||
mAnchorSay.setX(-DpUtil.dp2px(45));
|
||||
mAnchorSayImage.setVisibility(View.INVISIBLE);
|
||||
mAnchorSayText.setVisibility(View.INVISIBLE);
|
||||
mAnchorSayHide.setImageResource(R.mipmap.ic_live_anchor_say_hide);
|
||||
}
|
||||
mAnchorSay.setTag(!hide);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationRepeat(Animation animation) {
|
||||
|
||||
}
|
||||
});
|
||||
mAnchorSay.startAnimation(animation);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前直播间星级
|
||||
*/
|
||||
@ -1849,7 +1917,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
ToastUtil.show(R.string.net_error);
|
||||
ToastUtil.show( R.string.net_error);
|
||||
}
|
||||
});
|
||||
|
||||
@ -4332,4 +4400,147 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
});
|
||||
enterRoomLeave.startAnimation(animationSet1);
|
||||
}
|
||||
LiveAnchorSayModel sayModel;
|
||||
|
||||
public void initAnchorSayData() {
|
||||
LiveNetManager.get(mContext)
|
||||
.getLivePreviewInfo(mLiveUid, new com.yunbao.common.http.base.HttpCallback<LiveAnchorSayModel>() {
|
||||
@Override
|
||||
public void onSuccess(LiveAnchorSayModel data) {
|
||||
Log.i("女神说", "onSuccess: " + data);
|
||||
sayModel = data;
|
||||
LiveAnchorSayModel.LivePreview preview = data.getLivePreview();
|
||||
if (preview != null) {
|
||||
mAnchorSayText.setText(getText(data.getLivePreview().getContent()));
|
||||
ImgLoader.display(mContext, preview.getStyleImage(), mAnchorSayImage);
|
||||
if (preview.getIsShow() == 1) {
|
||||
mAnchorSay.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
|
||||
}
|
||||
|
||||
public String getText(String content) {
|
||||
int t = 6;
|
||||
float len = (float) content.length() / t;
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("\n");
|
||||
for (int i = 0; i < len; i++) {
|
||||
if (len - i < 1) {
|
||||
sb.append(content.substring(i * t));
|
||||
} else {
|
||||
sb.append(content.substring(i * t, i * t + t)).append("\n");
|
||||
}
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void initAnchorSay() {
|
||||
if (mAnchorSay.getTag() != null) {
|
||||
mAnchorSay.setX((float) mAnchorSayImage.getTag());
|
||||
mAnchorSayImage.setTag(null);
|
||||
mAnchorSayImage.setVisibility(View.VISIBLE);
|
||||
mAnchorSayText.setVisibility(View.VISIBLE);
|
||||
mAnchorSayHide.setImageResource(R.mipmap.ic_live_anchor_say_show);
|
||||
}
|
||||
mAnchorSay.setTag(null);
|
||||
initAnchorSayData();
|
||||
}
|
||||
|
||||
public void hideAnchorSayAndCallAnchor(){
|
||||
mAnchorSay.setX((float) mAnchorSayImage.getTag());
|
||||
mAnchorSayImage.setTag(null);
|
||||
mAnchorSayImage.setVisibility(View.VISIBLE);
|
||||
mAnchorSayText.setVisibility(View.VISIBLE);
|
||||
mAnchorSayHide.setImageResource(R.mipmap.ic_live_anchor_say_show);
|
||||
topBanner1.setVisibility(View.GONE);
|
||||
}
|
||||
public void showAnchorSayAndCallAnchor(){
|
||||
mAnchorSayImage.setTag(mAnchorSay.getX());
|
||||
mAnchorSay.setX(-DpUtil.dp2px(45));
|
||||
mAnchorSayImage.setVisibility(View.INVISIBLE);
|
||||
mAnchorSayText.setVisibility(View.INVISIBLE);
|
||||
mAnchorSayHide.setImageResource(R.mipmap.ic_live_anchor_say_hide);
|
||||
topBanner1.setVisibility(View.VISIBLE);
|
||||
}
|
||||
public void initTopBanner() {
|
||||
checkNewLetter();
|
||||
mTopBannerList = new ArrayList<>();
|
||||
topBanner1.setVisibility(View.GONE);
|
||||
topBanner1.setAutoPlay(true)
|
||||
.setPages(mTopBannerList, new TopBannerCustomViewHolder())
|
||||
.setDelayTime(3000)
|
||||
.setBannerStyle(BannerConfig.NOT_INDICATOR)
|
||||
.setOnBannerClickListener(new OnBannerClickListener() {
|
||||
@Override
|
||||
public void onBannerClick(List datas, int position) {
|
||||
if (mTopBannerList.get(position).getType() == TopBannerCustomViewHolder.TYPE_CALL_ANCHOR) {
|
||||
Dialog loading = DialogUitl.loadingDialog(mContext);
|
||||
loading.show();
|
||||
LiveGiftDialogFragment fragment = new LiveGiftDialogFragment();
|
||||
fragment.setOnDismissListener(dialog -> {
|
||||
checkNewLetter();
|
||||
}
|
||||
);
|
||||
fragment.setOnShowListener(dialog -> mHandler.postDelayed(loading::dismiss, 500));
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString(Constants.LIVE_UID, mLiveUid);
|
||||
bundle.putString(Constants.LIVE_STREAM, mStream);
|
||||
bundle.putString(Constants.LIVE_WISH_GIFTID, mTopBannerList.get(position).getActivityId() + "");
|
||||
bundle.putBoolean("isContactGift", true);
|
||||
fragment.setArguments(bundle);
|
||||
fragment.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "LiveGiftDialogFragment");
|
||||
}
|
||||
}
|
||||
})
|
||||
.start();
|
||||
LiveNetManager.get(mContext)
|
||||
.getContactInfo(mLiveUid, new com.yunbao.common.http.base.HttpCallback<LiveAnchorCallMeModel>() {
|
||||
@Override
|
||||
public void onSuccess(LiveAnchorCallMeModel data) {
|
||||
System.out.println(">>>>> 获取联系方式:" + data);
|
||||
if (data.getIsShow() == 1) {
|
||||
topBanner1.setVisibility(View.VISIBLE);
|
||||
BannerBean call = new BannerBean();
|
||||
call.setActivityId(data.getGiftId());
|
||||
call.setType(TopBannerCustomViewHolder.TYPE_CALL_ANCHOR);
|
||||
mTopBannerList.add(0, call);
|
||||
topBanner1.update(mTopBannerList);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
System.out.println("!>>>>> 获取联系方式:" + error);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void checkNewLetter() {
|
||||
LiveNetManager.get(mContext).getContactMsg(new com.yunbao.common.http.base.HttpCallback<List<LiveUserMailBoxModel>>() {
|
||||
@Override
|
||||
public void onSuccess(List<LiveUserMailBoxModel> data) {
|
||||
for (LiveUserMailBoxModel model : data) {
|
||||
if (model.getIsRead() == 0 && mContext instanceof LiveAudienceActivity) {
|
||||
((LiveAudienceActivity) mContext).showMsgRed(0);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -475,6 +475,11 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
||||
mLiveRoomViewHolder.setVotes(data.getEnterRoomInfo().getVotestotal());
|
||||
//真爱排行 数量
|
||||
mLiveRoomViewHolder.setMedaRankNum(data.getEnterRoomInfo().getMedalRankNum());
|
||||
//初始化女神说
|
||||
mLiveRoomViewHolder.initAnchorSay();
|
||||
//初始化顶部banner
|
||||
mLiveRoomViewHolder.initTopBanner();
|
||||
|
||||
isattention = Integer.parseInt(data.getEnterRoomInfo().getIsattention());
|
||||
if (isattention == 0) {
|
||||
if (countDownTimer != null) {
|
||||
@ -1367,6 +1372,11 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
||||
public void setPkStatus(boolean isPk) {
|
||||
if (mLiveRoomViewHolder != null) {
|
||||
mLiveRoomViewHolder.hotAddVisibility(isPk);
|
||||
if (isPk) {
|
||||
mLiveRoomViewHolder.hideAnchorSayAndCallAnchor();
|
||||
} else {
|
||||
mLiveRoomViewHolder.showAnchorSayAndCallAnchor();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,56 @@
|
||||
package com.yunbao.live.views;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import com.ms.banner.holder.BannerViewHolder;
|
||||
import com.opensource.svgaplayer.SVGADrawable;
|
||||
import com.opensource.svgaplayer.SVGAImageView;
|
||||
import com.opensource.svgaplayer.SVGAParser;
|
||||
import com.opensource.svgaplayer.SVGAVideoEntity;
|
||||
import com.yunbao.common.bean.BannerBean;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.utils.SVGAViewUtils;
|
||||
import com.yunbao.live.R;
|
||||
|
||||
public class TopBannerCustomViewHolder implements BannerViewHolder<BannerBean> {
|
||||
public static final int TYPE_CALL_ANCHOR = 0;//联系主播
|
||||
public static final int TYPE_IMAGE = 1;
|
||||
|
||||
@Override
|
||||
public View createView(Context context, int position, BannerBean data) {
|
||||
View view = null;
|
||||
if (data.getType() == TYPE_IMAGE) {
|
||||
ImageView icon = new ImageView(context);
|
||||
if (data.getIconRes() != 0) {
|
||||
ImgLoader.display(context, data.getIconRes(), icon);
|
||||
} else {
|
||||
ImgLoader.display(context, data.getImageUrl(), icon);
|
||||
}
|
||||
view = icon;
|
||||
} else {
|
||||
view = LayoutInflater.from(context).inflate(R.layout.view_live_top_banner_call_me, null);
|
||||
SVGAImageView svga = view.findViewById(R.id.svga);
|
||||
new SVGAParser(context).decodeFromAssets("ic_live_anchor_call_me.svga", new SVGAParser.ParseCompletion() {
|
||||
@Override
|
||||
public void onComplete(SVGAVideoEntity videoItem) {
|
||||
SVGADrawable drawable = new SVGADrawable(videoItem);
|
||||
svga.setImageDrawable(drawable);
|
||||
svga.setTag("svga");
|
||||
SVGAViewUtils.playEndClear(svga, false);
|
||||
svga.setClearsAfterStop(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError() {
|
||||
Log.e("errqs", "errl");
|
||||
}
|
||||
}, null);
|
||||
}
|
||||
|
||||
return view;
|
||||
}
|
||||
}
|
12
live/src/main/res/anim/view_live_anchor_say_text_in.xml
Normal file
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<translate
|
||||
android:duration="300"
|
||||
android:fromXDelta="-100%"
|
||||
android:toXDelta="0" />
|
||||
<alpha
|
||||
android:duration="300"
|
||||
android:fromAlpha="0"
|
||||
android:toAlpha="1" />
|
||||
</set>
|
12
live/src/main/res/anim/view_live_anchor_say_text_out.xml
Normal file
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<translate
|
||||
android:duration="300"
|
||||
android:fromXDelta="0"
|
||||
android:toXDelta="-100%" />
|
||||
<alpha
|
||||
android:duration="300"
|
||||
android:fromAlpha="1"
|
||||
android:toAlpha="0.2" />
|
||||
</set>
|
9
live/src/main/res/drawable/bg_anchor_say.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:width="166dp" android:height="162dp">
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="#337792D0" />
|
||||
<corners android:radius="8dp" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
10
live/src/main/res/drawable/bg_anchor_say_select.xml
Normal file
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:width="166dp" android:height="162dp">
|
||||
<shape android:shape="rectangle">
|
||||
<stroke android:width="1dp" android:color="#ffffc621" />
|
||||
<solid android:color="#337792D0" />
|
||||
<corners android:radius="8dp" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:width="60dp" android:height="22dp">
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="#ffffffff" />
|
||||
<corners android:topLeftRadius="11dp" android:topRightRadius="11dp" android:bottomLeftRadius="11dp" android:bottomRightRadius="11dp" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:width="96dp" android:height="22dp">
|
||||
<shape android:shape="rectangle">
|
||||
<stroke android:width="1dp" android:color="#ffffffff" />
|
||||
<gradient android:type="linear" android:useLevel="true" android:startColor="#ffe5eeff" android:endColor="#ffe5fbff" android:angle="270" />
|
||||
<corners android:topLeftRadius="22dp" android:topRightRadius="22dp" android:bottomLeftRadius="22dp" android:bottomRightRadius="22dp" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:width="112dp" android:height="42dp">
|
||||
<shape android:shape="rectangle">
|
||||
<stroke android:width="1dp" android:color="#ffffffff" />
|
||||
<gradient android:type="linear" android:useLevel="true" android:startColor="#ffe5eeff" android:endColor="#ffe5fbff" android:angle="135" />
|
||||
<corners android:topLeftRadius="22dp" android:topRightRadius="22dp" android:bottomLeftRadius="22dp" android:bottomRightRadius="22dp" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
9
live/src/main/res/drawable/bg_live_ready_btn2.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:width="189dp" android:height="42dp">
|
||||
<shape android:shape="rectangle">
|
||||
<gradient android:type="linear" android:useLevel="true" android:startColor="#ffffc621" android:endColor="#ffffae05" android:angle="135" />
|
||||
<corners android:radius="21dp" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
9
live/src/main/res/drawable/bg_live_top_banner.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:width="52dp" android:height="52dp">
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="#4d000000" />
|
||||
<corners android:topLeftRadius="6dp" android:topRightRadius="6dp" android:bottomLeftRadius="6dp" android:bottomRightRadius="6dp" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
14
live/src/main/res/drawable/bg_live_top_banner_text.xml
Normal file
@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:width="48dp" android:height="18dp">
|
||||
<shape android:shape="rectangle">
|
||||
<stroke android:width="0dp" android:color="#4dffffff" />
|
||||
<solid android:color="#000000" />
|
||||
<gradient android:angle="180" android:centerColor="#0548cfff" android:endColor="#4d7733ff" android:startColor="#4d33ddff" android:type="linear" android:useLevel="true" />
|
||||
<corners android:bottomLeftRadius="10dp" android:bottomRightRadius="10dp" android:topLeftRadius="10dp" android:topRightRadius="10dp" />
|
||||
<stroke
|
||||
android:width="1dp"
|
||||
android:color="#4dFFFFFF" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
78
live/src/main/res/layout/dialog_anchor_call_edit_app.xml
Normal file
@ -0,0 +1,78 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:background="@color/white"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
|
||||
<include
|
||||
android:id="@+id/include"
|
||||
layout="@layout/live_anchor_call_me_edit_title"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/constraintLayout3"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:background="#FAFAFA"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/include">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:text="信內容"
|
||||
android:textColor="#333333"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/edit"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:background="#FAFAFA"
|
||||
android:ellipsize="none"
|
||||
android:gravity="top"
|
||||
android:ems="10"
|
||||
android:hint="我能想到最浪漫的事,就是和你一起慢慢變老,一路上收藏點點滴滴的歡笑,留到以後坐著搖椅慢慢聊。"
|
||||
android:textColor="#999999"
|
||||
android:textColorHint="#999999"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/title" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/submit"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="42dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:background="@drawable/bg_live_ready_btn2"
|
||||
android:text="保存"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/constraintLayout3" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
105
live/src/main/res/layout/dialog_anchor_call_me.xml
Normal file
@ -0,0 +1,105 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/constraintLayout2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="400dp"
|
||||
android:background="@drawable/background_e6000"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linearLayout2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/live_anchor_edit_call_me_title"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/btn_close"
|
||||
android:layout_width="19dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginEnd="16dp"
|
||||
app:srcCompat="@mipmap/live_close" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:id="@+id/divider"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:background="#1affffff"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/linearLayout2" />
|
||||
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/anchor_call_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/linearLayout3"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/divider"
|
||||
tools:listitem="@layout/item_anchor_call_me_app"
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linearLayout3"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:background="@color/black2"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/constraintLayout2"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center|start"
|
||||
android:text="@string/live_anchor_edit_call_me_switch"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/say_switch"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginEnd="16dp"
|
||||
app:srcCompat="@mipmap/special_icon_off" />
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
149
live/src/main/res/layout/dialog_anchor_say.xml
Normal file
@ -0,0 +1,149 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<include
|
||||
android:id="@+id/anchor_say"
|
||||
layout="@layout/sim_live_room_anchor_say"
|
||||
android:layout_width="77dp"
|
||||
android:layout_height="88dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/constraintLayout2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="400dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:background="@drawable/background_e6000"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/anchor_say">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linearLayout2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/live_anchor_say_title"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/close"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
app:srcCompat="@mipmap/live_close" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:id="@+id/divider"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:background="#1affffff"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/linearLayout2" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/anchor_say_edit"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:autofillHints=""
|
||||
android:background="@drawable/bg_item_random_pk_type_1"
|
||||
android:ems="10"
|
||||
android:hint="@string/live_anchor_say_edit_hint"
|
||||
android:inputType="textPersonName"
|
||||
android:maxLength="16"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:textColorHint="#80FFFFFF"
|
||||
android:textColor="#FFF"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/divider" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:text="@string/live_anchor_say_select_style"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/anchor_say_edit" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/anchor_say_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/linearLayout3"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/text2"
|
||||
tools:layoutManager="GridLayoutManager"
|
||||
tools:listitem="@layout/item_anchor_say"
|
||||
tools:spanCount="3" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linearLayout3"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:background="@color/black2"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/constraintLayout2"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center|start"
|
||||
android:text="@string/live_anchor_say_switch"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/say_switch"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginEnd="16dp"
|
||||
app:srcCompat="@mipmap/special_icon_off" />
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -20,9 +20,10 @@
|
||||
android:background="@drawable/bg_live_gift_download_all"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="invisible">
|
||||
android:visibility="gone">
|
||||
|
||||
<ImageView
|
||||
android:visibility="gone"
|
||||
android:layout_width="19dp"
|
||||
android:layout_height="19dp"
|
||||
android:layout_marginEnd="7dp"
|
||||
@ -32,7 +33,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="一鍵下載所有禮物動畫"
|
||||
android:text="设置为联系方式礼物"
|
||||
android:textSize="10sp"
|
||||
android:visibility="visible" />
|
||||
|
||||
|
@ -40,6 +40,7 @@
|
||||
</TextView>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginStart="8dp"
|
||||
|
68
live/src/main/res/layout/dialog_live_user_mailbox.xml
Normal file
@ -0,0 +1,68 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/bg_top"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:scaleType="fitEnd"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@mipmap/bg_live_user_mailbox_top" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView10"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="85dp"
|
||||
android:layout_marginTop="45dp"
|
||||
android:text="信件欄"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/mailbox"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="328dp"
|
||||
android:background="#D6E8FE"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="1.0"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/bg_top"
|
||||
tools:listitem="@layout/item_live_user_mailbox">
|
||||
|
||||
</androidx.recyclerview.widget.RecyclerView>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/ic_empty"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="328dp"
|
||||
android:background="#D6E8FE"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="1.0"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/bg_top">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="232dp"
|
||||
android:layout_height="210dp"
|
||||
android:background="#D6E8FE"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@mipmap/ic_live_user_mailbox" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
44
live/src/main/res/layout/dialog_live_user_mailbox_web.xml
Normal file
@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/bg_top"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:scaleType="fitEnd"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@mipmap/bg_live_user_mailbox_top" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="85dp"
|
||||
android:layout_marginTop="50dp"
|
||||
android:text="信件欄"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<WebView
|
||||
android:id="@+id/webView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="428dp"
|
||||
android:background="#D6E8FE"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="1.0"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/bg_top">
|
||||
|
||||
</WebView>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
57
live/src/main/res/layout/item_anchor_call_me_app.xml
Normal file
@ -0,0 +1,57 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="68dp"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:background="@drawable/bg_anchor_say"
|
||||
android:layout_marginTop="10dp">
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/gift_icon"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="14dp"
|
||||
android:layout_marginBottom="14dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:srcCompat="@tools:sample/avatars" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/contact"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="24dp"
|
||||
android:text="@string/live_anchor_edit_call_me_not_filled"
|
||||
android:textSize="16sp"
|
||||
android:textColor="#80FFFFFF"
|
||||
app:layout_constraintStart_toEndOf="@+id/gift_icon"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/app_switch"
|
||||
android:layout_width="44dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginTop="22dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@mipmap/special_icon_off" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/app_edit"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
app:layout_constraintEnd_toStartOf="@+id/app_switch"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@mipmap/ic_live_anchor_edit_call_me_edit" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
63
live/src/main/res/layout/item_anchor_call_me_gift.xml
Normal file
@ -0,0 +1,63 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="68dp"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:background="@drawable/bg_anchor_say"
|
||||
android:layout_marginTop="10dp">
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/gift_icon"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="14dp"
|
||||
android:layout_marginBottom="14dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:srcCompat="@tools:sample/avatars" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/select"
|
||||
android:layout_width="92dp"
|
||||
android:layout_height="28dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:background="@drawable/background_33ffffff"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView7"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginTop="6dp"
|
||||
android:layout_marginBottom="6dp"
|
||||
android:text="@string/live_anchor_edit_call_me_select_gift"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView8"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:layout_marginBottom="6dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@mipmap/ic_live_anchor_edit_call_me_r" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
50
live/src/main/res/layout/item_anchor_call_me_letter.xml
Normal file
@ -0,0 +1,50 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="120dp"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:background="@drawable/bg_anchor_say"
|
||||
android:layout_marginTop="10dp">
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView9"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="14dp"
|
||||
android:text="@string/live_anchor_edit_call_me_letter_title"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/edit"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@mipmap/ic_live_anchor_edit_call_me_edit" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/letterText"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:ellipsize="none"
|
||||
android:text="@string/live_anchor_edit_call_me_letter_content"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/edit" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
20
live/src/main/res/layout/item_anchor_say.xml
Normal file
@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="106dp"
|
||||
android:layout_height="128dp"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:background="@drawable/bg_anchor_say"
|
||||
android:layout_marginTop="10dp">
|
||||
|
||||
|
||||
<include
|
||||
layout="@layout/sim_live_room_anchor_say"
|
||||
android:layout_width="67dp"
|
||||
android:layout_height="88dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
92
live/src/main/res/layout/item_live_user_mailbox.xml
Normal file
@ -0,0 +1,92 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/bg"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="235dp"
|
||||
android:scaleType="fitCenter"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@mipmap/bg_live_user_mailbox" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/top_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="40dp"
|
||||
android:layout_marginTop="32dp"
|
||||
android:background="@drawable/bg_item_live_user_mailbox_top_text"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingTop="4dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:paddingBottom="4dp"
|
||||
android:textColor="#5C8599"
|
||||
android:textSize="10sp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="来自主播昵称的信" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/del"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginTop="32dp"
|
||||
android:layout_marginEnd="40dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@mipmap/bg_live_user_mailbox_del" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/user_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_item_live_user_mailbox_username_text"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:paddingBottom="10dp"
|
||||
android:textColor="#3399FF"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="@tools:sample/full_names" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tip"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="40dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:gravity="start"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="14sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
tools:text="「主播昵稱」有更多話對你說" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView13"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="32dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:background="@drawable/bg_item_live_user_mailbox_info_text"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingTop="4dp"
|
||||
android:paddingEnd="10dp"
|
||||
android:paddingBottom="4dp"
|
||||
android:textColor="#3399FF"
|
||||
android:textSize="10sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:text="@string/live_user_mailbox_more_text" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
49
live/src/main/res/layout/sim_live_room_anchor_say.xml
Normal file
@ -0,0 +1,49 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="67dp"
|
||||
android:layout_height="88dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/anchor_say_icon"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:src="@color/main_color_79CDF9"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:srcCompat="@color/main_color_79CDF9" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/anchor_say_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:ellipsize="none"
|
||||
android:gravity="center"
|
||||
android:inputType="textMultiLine"
|
||||
android:maxEms="6"
|
||||
android:text="中文测试\n中文测试\n中文测试\n中文测试"
|
||||
android:textColor="#333333"
|
||||
android:textSize="10sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/anchor_say_icon"
|
||||
tools:text="中文测试\n中文测试\n中文测试\n中文测试" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/anchor_say_hide"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@mipmap/ic_live_anchor_say_show" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -695,7 +695,18 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<com.ms.banner.Banner
|
||||
android:id="@+id/top_banner1"
|
||||
android:layout_width="52dp"
|
||||
android:layout_height="64dp"
|
||||
android:layout_below="@+id/live_rank_pk"
|
||||
android:layout_alignEnd="@+id/live_rank_pk"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginTop="40dp"
|
||||
android:layout_marginRight="5dp"
|
||||
app:delay_time="5000"
|
||||
app:indicator_height="8dp"
|
||||
app:indicator_width="8dp" />
|
||||
<FrameLayout
|
||||
android:id="@+id/btn_prize_pool_level"
|
||||
android:layout_width="70dp"
|
||||
@ -1280,6 +1291,18 @@
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<include
|
||||
android:id="@+id/anchor_say_layout"
|
||||
layout="@layout/sim_live_room_anchor_say"
|
||||
android:layout_width="77dp"
|
||||
android:layout_height="88dp"
|
||||
android:layout_alignBottom="@+id/live_video"
|
||||
android:layout_marginStart="14dp"
|
||||
android:visibility="invisible"
|
||||
android:layout_marginBottom="50dp"
|
||||
android:background="@color/white" />
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/icon_pk_top"
|
||||
android:layout_width="110dp"
|
||||
@ -1288,7 +1311,7 @@
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="40dp"
|
||||
android:src="@mipmap/icon_rank_top_box"
|
||||
android:visibility="gone" />
|
||||
android:visibility="visible" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/lt_pk_line"
|
||||
|
46
live/src/main/res/layout/view_live_top_banner_call_me.xml
Normal file
@ -0,0 +1,46 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView7"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/bg_live_top_banner" />
|
||||
|
||||
<com.opensource.svgaplayer.SVGAImageView
|
||||
android:id="@+id/svga"
|
||||
android:layout_width="38dp"
|
||||
android:layout_height="38dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:visibility="visible"
|
||||
app:autoPlay="true"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView11"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:background="@drawable/bg_live_top_banner_text"
|
||||
android:paddingStart="5dp"
|
||||
android:paddingTop="2dp"
|
||||
android:paddingEnd="5dp"
|
||||
android:paddingBottom="2dp"
|
||||
android:text="@string/live_ready_anchor_call_me"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="10sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/svga" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -1,6 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/traceroute_rootview"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
@ -45,7 +46,7 @@
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/traceroute_item"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="140dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="98dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
@ -95,11 +96,11 @@
|
||||
android:id="@+id/btn_room_type"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="25dp"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintStart_toEndOf="@id/btn_live_clarity"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
@ -135,8 +136,13 @@
|
||||
android:layout_marginEnd="16dp"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintEnd_toStartOf="@+id/btn_wishlist"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
<ImageView
|
||||
android:layout_width="18dp"
|
||||
android:layout_height="18dp"
|
||||
android:layout_weight="1"
|
||||
app:srcCompat="@mipmap/ic_live_ready_channel" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/live_class"
|
||||
@ -160,12 +166,17 @@
|
||||
android:id="@+id/btn_wishlist"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="25dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginEnd="24dp"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/btn_live_clarity">
|
||||
<ImageView
|
||||
android:layout_width="18dp"
|
||||
android:layout_height="18dp"
|
||||
android:layout_weight="1"
|
||||
app:srcCompat="@mipmap/ic_live_ready_xjd" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_wishlist"
|
||||
@ -185,6 +196,77 @@
|
||||
android:src="@mipmap/icon_live_more" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/btn_live_anchor_say"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="25dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/btn_room_type">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/img_anchor_say"
|
||||
android:layout_width="18dp"
|
||||
android:layout_height="18dp"
|
||||
android:layout_weight="1"
|
||||
app:srcCompat="@mipmap/ic_live_ready_say" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/live_anchor_say"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/layout_live_anchor_say_ready_title"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="5dp"
|
||||
android:layout_height="10dp"
|
||||
android:layout_weight="1"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@mipmap/icon_live_more" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/btn_live_anchor_call_me"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="25dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/btn_live_class">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="18dp"
|
||||
android:layout_height="18dp"
|
||||
android:layout_weight="1"
|
||||
app:srcCompat="@mipmap/ic_live_ready_letter" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/live_ready_anchor_call_me"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="5dp"
|
||||
android:layout_height="10dp"
|
||||
android:layout_weight="1"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@mipmap/icon_live_more" />
|
||||
</LinearLayout>
|
||||
<View
|
||||
android:id="@+id/line"
|
||||
android:layout_width="0dp"
|
||||
@ -195,7 +277,7 @@
|
||||
android:background="@drawable/bg_line"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/btn_live_class" />
|
||||
app:layout_constraintTop_toBottomOf="@+id/btn_live_anchor_say" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/avatar"
|
||||
|
BIN
live/src/main/res/mipmap-mdpi/ic_live_anchor_say_hide.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
live/src/main/res/mipmap-mdpi/ic_live_anchor_say_show.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
live/src/main/res/mipmap-mdpi/ic_live_float_call_me.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
live/src/main/res/mipmap-mdpi/ic_live_ready_channel.png
Normal file
After Width: | Height: | Size: 427 B |
BIN
live/src/main/res/mipmap-mdpi/ic_live_ready_letter.png
Normal file
After Width: | Height: | Size: 487 B |
BIN
live/src/main/res/mipmap-mdpi/ic_live_ready_say.png
Normal file
After Width: | Height: | Size: 667 B |
BIN
live/src/main/res/mipmap-mdpi/ic_live_ready_xjd.png
Normal file
After Width: | Height: | Size: 676 B |
BIN
live/src/main/res/mipmap-mdpi/ic_live_user_mailbox.png
Normal file
After Width: | Height: | Size: 78 KiB |
BIN
live/src/main/res/mipmap-mdpi/icon_line_x.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
live/src/main/res/mipmap-mdpi/icon_wechat_x.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
live/src/main/res/mipmap-mdpi/icon_whatsapp_x.png
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
live/src/main/res/mipmap-xhdpi/bg_live_user_mailbox.png
Normal file
After Width: | Height: | Size: 151 KiB |
BIN
live/src/main/res/mipmap-xhdpi/bg_live_user_mailbox_del.png
Normal file
After Width: | Height: | Size: 547 B |
BIN
live/src/main/res/mipmap-xhdpi/bg_live_user_mailbox_top.png
Normal file
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 623 B |
BIN
live/src/main/res/mipmap-xhdpi/ic_live_anchor_edit_call_me_r.png
Normal file
After Width: | Height: | Size: 207 B |
@ -67,4 +67,6 @@
|
||||
<string name="random_pk_search_hint" >Please enter the anchor nickname or id you want to pk</string>
|
||||
<string name="free_pk_user_pking" >The other team is engaged in a PK</string>
|
||||
<string name="free_pk_num_null" >The PK number is used up</string>
|
||||
<string name="live_user_mailbox_top_text">来自%s的信</string>
|
||||
<string name="live_user_mailbox_tip_text">「%s」有更多話對你說</string>
|
||||
</resources>
|
@ -65,4 +65,26 @@
|
||||
<string name="live_data_msg1">本場直播數據統計</string>
|
||||
<string name="live_data_msg2">歷史數據可在主播中心查看</string>
|
||||
<string name="live_data_tip">* 人數及新增相關數據非实时计算</string>
|
||||
<string name="live_user_mailbox_top_text">来自%s的信</string>
|
||||
<string name="live_user_mailbox_tip_text">「%s」有更多話對你說</string>
|
||||
<string name="live_user_mailbox_more_text">查看詳情</string>
|
||||
<string name="live_user_mailbox_web_title">來自「%s」的信</string>
|
||||
<string name="live_anchor_edit_call_me_title">編輯聯系方式</string>
|
||||
<string name="live_anchor_edit_call_me_switch">聯系方式開關</string>
|
||||
<string name="live_anchor_edit_call_me_select_gift">選擇禮物</string>
|
||||
<string name="live_anchor_edit_call_me_not_filled">未填寫</string>
|
||||
<string name="live_anchor_edit_call_me_not_filled_toash">请填写联系方式后再启用</string>
|
||||
<string name="live_anchor_edit_call_me_not_gift_toash">未選擇禮物</string>
|
||||
<string name="live_anchor_edit_call_me_letter_title">信內容</string>
|
||||
<string name="live_anchor_edit_call_me_letter_content">我能想到最浪漫的事,就是和你一起慢慢變老,一路上收藏點點滴滴的歡笑,留到以後坐著搖椅慢慢聊。</string>
|
||||
<string name="live_ready_anchor_call_me">聯繫方式</string>
|
||||
<string name="live_anchor_say_title">編輯女神說</string>
|
||||
<string name="live_anchor_say_edit_hint">请輸入女神想說的話,限16個字哦。</string>
|
||||
<string name="live_anchor_say_select_style">选择样式</string>
|
||||
<string name="live_anchor_say_switch">女神說開關</string>
|
||||
<string name="live_user_letter_dialog_title">刪除郵件</string>
|
||||
<string name="live_user_letter_dialog_content">是否確認刪除此郵件</string>
|
||||
<string name="live_user_letter_dialog_yes">刪除</string>
|
||||
<string name="live_user_letter_dialog_no">再想想</string>
|
||||
|
||||
</resources>
|
||||
|
@ -9,6 +9,7 @@ import android.widget.ImageView;
|
||||
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.live.dialog.LiveAnchorSayPopDialog;
|
||||
import com.yunbao.live.dialog.LiveRobotSettingDialogFragment;
|
||||
import com.yunbao.main.R;
|
||||
import com.yunbao.main.activity.MainActivity;
|
||||
@ -43,6 +44,11 @@ public class MainHomeViewHolder extends AbsMainHomeParentViewHolder {
|
||||
|
||||
ImgLoader.display(mContext, "https://downs.yaoulive.com/gif_trophy.gif", img_trophy);
|
||||
|
||||
img_trophy.setOnLongClickListener(v -> {
|
||||
new LiveAnchorSayPopDialog(mContext).setLiveUid("98275").showDialog();
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
|