直播间推荐气泡文字
This commit is contained in:
@@ -164,6 +164,7 @@ public class Constants {
|
||||
public static final String SOCKET_PRIZE_POOL_WIN = "jackpotWin";//奖池中奖
|
||||
public static final String SOCKET_PRIZE_POOL_UP = "jackpotUp";//奖池升级
|
||||
public static final String SOCKET_HOUR = "SendHourChart";//小时榜更新
|
||||
public static final String RECOMMEND_CARD_NOTIFY = "recommendCardNotify";//推荐卡通知消息
|
||||
|
||||
//游戏socket
|
||||
public static final String SOCKET_GAME_ZJH = "startGame";//炸金花
|
||||
|
||||
@@ -19,7 +19,7 @@ public class MsgModel extends BaseModel {
|
||||
private String method = "";
|
||||
@SerializedName("user_id")
|
||||
private String userId = "";
|
||||
@SerializedName("user_name")
|
||||
@SerializedName(value = "user_name", alternate = {"userName"})
|
||||
private String userName = "";
|
||||
@SerializedName("noble_id")
|
||||
private String nobleId = "";
|
||||
@@ -28,6 +28,73 @@ public class MsgModel extends BaseModel {
|
||||
@SerializedName("anchor_id")
|
||||
private String anchorId = "";
|
||||
|
||||
/**
|
||||
* 推荐消息
|
||||
* _method_ : recommendCardNotify
|
||||
* action : 0
|
||||
* msgtype : 1
|
||||
* recommendCardType : 2
|
||||
* userName : 哈哈哈
|
||||
* anchorName : what-hap
|
||||
* systemBubble : https://downs.yaoulive.com/20220721/1c5448119a159fcb154dd3fefe0a0f36.png
|
||||
*/
|
||||
|
||||
@SerializedName("action")
|
||||
private String action = "";
|
||||
@SerializedName("msgtype")
|
||||
private String msgtype = "";
|
||||
@SerializedName("recommendCardType")
|
||||
private String recommendCardType = "";
|
||||
@SerializedName("anchorName")
|
||||
private String anchorName = "";
|
||||
@SerializedName("systemBubble")
|
||||
private String systemBubble = "";
|
||||
|
||||
public String getAction() {
|
||||
return action;
|
||||
}
|
||||
|
||||
public MsgModel setAction(String action) {
|
||||
this.action = action;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getMsgtype() {
|
||||
return msgtype;
|
||||
}
|
||||
|
||||
public MsgModel setMsgtype(String msgtype) {
|
||||
this.msgtype = msgtype;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getRecommendCardType() {
|
||||
return recommendCardType;
|
||||
}
|
||||
|
||||
public MsgModel setRecommendCardType(String recommendCardType) {
|
||||
this.recommendCardType = recommendCardType;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getAnchorName() {
|
||||
return anchorName;
|
||||
}
|
||||
|
||||
public MsgModel setAnchorName(String anchorName) {
|
||||
this.anchorName = anchorName;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getSystemBubble() {
|
||||
return systemBubble;
|
||||
}
|
||||
|
||||
public MsgModel setSystemBubble(String systemBubble) {
|
||||
this.systemBubble = systemBubble;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getMethod() {
|
||||
return method;
|
||||
}
|
||||
|
||||
@@ -126,11 +126,8 @@ public class ImgLoader {
|
||||
}
|
||||
|
||||
public static void displayDrawable(Context context, String url, final DrawableCallback callback) {
|
||||
if (!contextIsExist(context)) {
|
||||
|
||||
return;
|
||||
}
|
||||
if (TextUtils.isEmpty(url)) {
|
||||
if (TextUtils.isEmpty(url)||!contextIsExist(context)) {
|
||||
if (callback != null)
|
||||
callback.onLoadFailed();
|
||||
} else {
|
||||
@@ -143,6 +140,13 @@ public class ImgLoader {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadFailed(@Nullable Drawable errorDrawable) {
|
||||
super.onLoadFailed(errorDrawable);
|
||||
if (callback != null)
|
||||
callback.onLoadFailed();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadCleared(@Nullable Drawable placeholder) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user