Merge remote-tracking branch 'origin/master'
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;
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.net.Uri;
|
||||
import android.text.TextUtils;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
@@ -12,7 +13,6 @@ import androidx.annotation.Nullable;
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.bumptech.glide.request.RequestOptions;
|
||||
import com.bumptech.glide.request.target.CustomTarget;
|
||||
import com.bumptech.glide.request.target.SimpleTarget;
|
||||
import com.bumptech.glide.request.transition.Transition;
|
||||
import com.yunbao.common.R;
|
||||
|
||||
@@ -126,24 +126,37 @@ public class ImgLoader {
|
||||
}
|
||||
|
||||
public static void displayDrawable(Context context, String url, final DrawableCallback callback) {
|
||||
if (!contextIsExist(context)) {
|
||||
return;
|
||||
}
|
||||
Glide.with(context).asDrawable().load(url).skipMemoryCache(SKIP_MEMORY_CACHE).into(new CustomTarget<Drawable>() {
|
||||
|
||||
@Override
|
||||
public void onResourceReady(@NonNull Drawable resource, @Nullable Transition<? super Drawable> transition) {
|
||||
if (callback != null) {
|
||||
callback.onLoadSuccess(resource);
|
||||
if (TextUtils.isEmpty(url)||!contextIsExist(context)) {
|
||||
if (callback != null)
|
||||
callback.onLoadFailed();
|
||||
} else {
|
||||
Glide.with(context).asDrawable().load(url).skipMemoryCache(SKIP_MEMORY_CACHE).into(new CustomTarget<Drawable>() {
|
||||
|
||||
@Override
|
||||
public void onResourceReady(@NonNull Drawable resource, @Nullable Transition<? super Drawable> transition) {
|
||||
if (callback != null) {
|
||||
callback.onLoadSuccess(resource);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadCleared(@Nullable Drawable placeholder) {
|
||||
@Override
|
||||
public void onLoadFailed(@Nullable Drawable errorDrawable) {
|
||||
super.onLoadFailed(errorDrawable);
|
||||
if (callback != null)
|
||||
callback.onLoadFailed();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadCleared(@Nullable Drawable placeholder) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public static void displayFileDrawable(Context context, File file, final DrawableCallback callback) {
|
||||
if (!contextIsExist(context)) {
|
||||
return;
|
||||
|
||||
@@ -903,5 +903,8 @@
|
||||
<string name="better_emperor">超皇</string>
|
||||
<string name="can_not_go">無法前往神秘人的個人主頁。</string>
|
||||
<string name="mystery_man">神秘人</string>
|
||||
<string name="tell_the_world">昭告天下!</string>
|
||||
<string name="better_emperor_hint">昭告天下! %s 向所有人推薦了主播 %s , 一眼萬年情之所鐘!</string>
|
||||
<string name="emperor_hint">昭告天下! %s 向所有人推薦了主播 %s , 灼灼風華一瞥驚鴻!</string>
|
||||
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user