Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
27b316d39b
@ -56,9 +56,7 @@ public class CommonAppContext extends MultiDexApplication {
|
|||||||
//设置新加坡融云服务器 有时候国内收不到推送是因为这个
|
//设置新加坡融云服务器 有时候国内收不到推送是因为这个
|
||||||
RongIMClient.setServerInfo("navsg01.cn.ronghub.com", null);
|
RongIMClient.setServerInfo("navsg01.cn.ronghub.com", null);
|
||||||
//谷歌推送
|
//谷歌推送
|
||||||
PushConfig gconfig = new PushConfig.Builder()
|
PushConfig gconfig = new PushConfig.Builder().enableFCM(true).build();
|
||||||
.enableFCM(true)
|
|
||||||
.build();
|
|
||||||
RongPushClient.setPushConfig(gconfig);
|
RongPushClient.setPushConfig(gconfig);
|
||||||
//初始化友盟统计
|
//初始化友盟统计
|
||||||
// UMConfigure.init(this, UMConfigure.DEVICE_TYPE_PHONE, null);
|
// UMConfigure.init(this, UMConfigure.DEVICE_TYPE_PHONE, null);
|
||||||
@ -86,6 +84,9 @@ public class CommonAppContext extends MultiDexApplication {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static Activity getTopActivity() {
|
public static Activity getTopActivity() {
|
||||||
|
if (activityWeakReference == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
return activityWeakReference.get();
|
return activityWeakReference.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -37,6 +37,17 @@ public class EnterRoomNewModel extends BaseModel {
|
|||||||
private String sudGameRoomStatus;
|
private String sudGameRoomStatus;
|
||||||
@SerializedName("sud_game_room_name")
|
@SerializedName("sud_game_room_name")
|
||||||
private String sudGameRoomName;
|
private String sudGameRoomName;
|
||||||
|
@SerializedName("sud_gameDate")
|
||||||
|
private SudGameDateModel sudGameDateModel;
|
||||||
|
|
||||||
|
public SudGameDateModel getSudGameDateModel() {
|
||||||
|
return sudGameDateModel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EnterRoomNewModel setSudGameDateModel(SudGameDateModel sudGameDateModel) {
|
||||||
|
this.sudGameDateModel = sudGameDateModel;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public String getSudGameRoomName() {
|
public String getSudGameRoomName() {
|
||||||
return sudGameRoomName;
|
return sudGameRoomName;
|
||||||
|
@ -0,0 +1,175 @@
|
|||||||
|
package com.yunbao.common.bean;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
public class SudGameDateModel extends BaseModel{
|
||||||
|
|
||||||
|
@SerializedName("room_holder_id")
|
||||||
|
private String roomHolderId;
|
||||||
|
@SerializedName("sex")
|
||||||
|
private String sex;
|
||||||
|
@SerializedName("golden_bean_number")
|
||||||
|
private String goldenBeanNumber;
|
||||||
|
|
||||||
|
@SerializedName("room_holder_type")
|
||||||
|
private String roomHolderType;
|
||||||
|
@SerializedName("sud_game_id")
|
||||||
|
private String sudGameId;
|
||||||
|
@SerializedName("room_status")
|
||||||
|
private String roomStatus;
|
||||||
|
@SerializedName("sud_game_name")
|
||||||
|
private String sudGameName;
|
||||||
|
@SerializedName("room_name")
|
||||||
|
private String roomName;
|
||||||
|
@SerializedName("player_total")
|
||||||
|
private String playerTotal;
|
||||||
|
@SerializedName("sud_game_icon")
|
||||||
|
private String sudGameIcon;
|
||||||
|
@SerializedName("room_holder_name")
|
||||||
|
private String roomHolderName;
|
||||||
|
@SerializedName("sud_game_room_id")
|
||||||
|
private String sudGameRoomId;
|
||||||
|
@SerializedName("ob_total")
|
||||||
|
private String obTotal;
|
||||||
|
@SerializedName("avatar")
|
||||||
|
private String avatar;
|
||||||
|
@SerializedName("liveuid")
|
||||||
|
private String liveuid;
|
||||||
|
|
||||||
|
public String getRoomHolderId() {
|
||||||
|
return roomHolderId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SudGameDateModel setRoomHolderId(String roomHolderId) {
|
||||||
|
this.roomHolderId = roomHolderId;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSex() {
|
||||||
|
return sex;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SudGameDateModel setSex(String sex) {
|
||||||
|
this.sex = sex;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGoldenBeanNumber() {
|
||||||
|
return goldenBeanNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SudGameDateModel setGoldenBeanNumber(String goldenBeanNumber) {
|
||||||
|
this.goldenBeanNumber = goldenBeanNumber;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public String getRoomHolderType() {
|
||||||
|
return roomHolderType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SudGameDateModel setRoomHolderType(String roomHolderType) {
|
||||||
|
this.roomHolderType = roomHolderType;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSudGameId() {
|
||||||
|
return sudGameId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SudGameDateModel setSudGameId(String sudGameId) {
|
||||||
|
this.sudGameId = sudGameId;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRoomStatus() {
|
||||||
|
return roomStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SudGameDateModel setRoomStatus(String roomStatus) {
|
||||||
|
this.roomStatus = roomStatus;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSudGameName() {
|
||||||
|
return sudGameName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SudGameDateModel setSudGameName(String sudGameName) {
|
||||||
|
this.sudGameName = sudGameName;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRoomName() {
|
||||||
|
return roomName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SudGameDateModel setRoomName(String roomName) {
|
||||||
|
this.roomName = roomName;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPlayerTotal() {
|
||||||
|
return playerTotal;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SudGameDateModel setPlayerTotal(String playerTotal) {
|
||||||
|
this.playerTotal = playerTotal;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSudGameIcon() {
|
||||||
|
return sudGameIcon;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SudGameDateModel setSudGameIcon(String sudGameIcon) {
|
||||||
|
this.sudGameIcon = sudGameIcon;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRoomHolderName() {
|
||||||
|
return roomHolderName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SudGameDateModel setRoomHolderName(String roomHolderName) {
|
||||||
|
this.roomHolderName = roomHolderName;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSudGameRoomId() {
|
||||||
|
return sudGameRoomId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SudGameDateModel setSudGameRoomId(String sudGameRoomId) {
|
||||||
|
this.sudGameRoomId = sudGameRoomId;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getObTotal() {
|
||||||
|
return obTotal;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SudGameDateModel setObTotal(String obTotal) {
|
||||||
|
this.obTotal = obTotal;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAvatar() {
|
||||||
|
return avatar;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SudGameDateModel setAvatar(String avatar) {
|
||||||
|
this.avatar = avatar;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLiveuid() {
|
||||||
|
return liveuid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SudGameDateModel setLiveuid(String liveuid) {
|
||||||
|
this.liveuid = liveuid;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
@ -262,7 +262,7 @@ public class CommonHttpUtil {
|
|||||||
}
|
}
|
||||||
}).build().show();
|
}).build().show();
|
||||||
} else {
|
} else {
|
||||||
ToastUtil.show(CommonAppContext.getTopActivity().getString(R.string.net_error) + "code:" + code + " msg:" + msg);
|
ToastUtil.show(context.getString(R.string.net_error) + "code:" + code + " msg:" + msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package com.yunbao.common.manager;
|
package com.yunbao.common.manager;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.os.Looper;
|
import android.os.Looper;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
@ -52,11 +53,14 @@ public class OpenAdManager {
|
|||||||
if (list != null && list.isEmpty()) {
|
if (list != null && list.isEmpty()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(CommonAppContext.getTopActivity()==null){
|
Context context = CommonAppContext.getTopActivity();
|
||||||
|
if (context == null) {
|
||||||
|
context = CommonAppContext.sInstance;
|
||||||
|
}
|
||||||
|
if (context == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
LiveNetManager.get(CommonAppContext.getTopActivity())
|
LiveNetManager.get(context).activityPopup(new HttpCallback<List<OpenAdModel>>() {
|
||||||
.activityPopup(new HttpCallback<List<OpenAdModel>>() {
|
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(List<OpenAdModel> data) {
|
public void onSuccess(List<OpenAdModel> data) {
|
||||||
if (data == null || data.isEmpty()) {
|
if (data == null || data.isEmpty()) {
|
||||||
@ -163,15 +167,11 @@ public class OpenAdManager {
|
|||||||
}
|
}
|
||||||
showMap.put(model.getId(), true);
|
showMap.put(model.getId(), true);
|
||||||
if (model.getModel() == OpenAdModel.MODEL_BOTTOM) {
|
if (model.getModel() == OpenAdModel.MODEL_BOTTOM) {
|
||||||
new OpenAdBottomDialogPopup(CommonAppContext.getTopActivity(), model)
|
new OpenAdBottomDialogPopup(CommonAppContext.getTopActivity(), model).setListener((bean, position) -> {
|
||||||
.setListener((bean, position) -> {
|
}).showDialog();
|
||||||
})
|
|
||||||
.showDialog();
|
|
||||||
} else {
|
} else {
|
||||||
new OpenAdCenterDialogPopup(CommonAppContext.getTopActivity(), model)
|
new OpenAdCenterDialogPopup(CommonAppContext.getTopActivity(), model).setListener((bean, position) -> {
|
||||||
.setListener((bean, position) -> {
|
}).showDialog();
|
||||||
})
|
|
||||||
.showDialog();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -64,7 +64,15 @@ public class ToastUtil {
|
|||||||
* @param delayMillis 显示时间 毫秒
|
* @param delayMillis 显示时间 毫秒
|
||||||
*/
|
*/
|
||||||
public static void showStyle(String content, long delayMillis) {
|
public static void showStyle(String content, long delayMillis) {
|
||||||
Dialog dialog = new Dialog(CommonAppContext.getTopActivity(), R.style.dialog);
|
Context context = CommonAppContext.getTopActivity();
|
||||||
|
if (context == null) {
|
||||||
|
context = CommonAppContext.sInstance;
|
||||||
|
}
|
||||||
|
if (context == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Dialog dialog = new Dialog(context, R.style.dialog);
|
||||||
dialog.setContentView(R.layout.dialog_toast);
|
dialog.setContentView(R.layout.dialog_toast);
|
||||||
dialog.setCancelable(false);
|
dialog.setCancelable(false);
|
||||||
dialog.setCanceledOnTouchOutside(false);
|
dialog.setCanceledOnTouchOutside(false);
|
||||||
@ -79,11 +87,13 @@ public class ToastUtil {
|
|||||||
dialog.show();
|
dialog.show();
|
||||||
new Handler(Looper.getMainLooper()).postDelayed(dialog::dismiss, delayMillis);
|
new Handler(Looper.getMainLooper()).postDelayed(dialog::dismiss, delayMillis);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void showDebug(String s) {
|
public static void showDebug(String s) {
|
||||||
if (BuildConfig.DEBUG) {
|
if (BuildConfig.DEBUG) {
|
||||||
show("开发模式:" + s);
|
show("开发模式:" + s);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void showDebug(int s) {
|
public static void showDebug(int s) {
|
||||||
if (BuildConfig.DEBUG) {
|
if (BuildConfig.DEBUG) {
|
||||||
show("开发模式:" + s);
|
show("开发模式:" + s);
|
||||||
|
BIN
common/src/main/res/drawable/background_live_sud_hint.png
Normal file
BIN
common/src/main/res/drawable/background_live_sud_hint.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.4 KiB |
@ -9,9 +9,9 @@ ext {
|
|||||||
]
|
]
|
||||||
manifestPlaceholders = [
|
manifestPlaceholders = [
|
||||||
//正式、
|
//正式、
|
||||||
serverHost : "https://napi.yaoulive.com",
|
// serverHost : "https://napi.yaoulive.com",
|
||||||
// 测试
|
// 测试
|
||||||
// serverHost : " https://ceshi.yaoulive.com",
|
serverHost : " https://ceshi.yaoulive.com",
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -808,7 +808,6 @@ public class LiveAudienceActivity extends LiveActivity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -1542,7 +1541,7 @@ public class LiveAudienceActivity extends LiveActivity {
|
|||||||
break;
|
break;
|
||||||
case SUD_GAME_CREATE_ROOM:
|
case SUD_GAME_CREATE_ROOM:
|
||||||
if (manager != null) {
|
if (manager != null) {
|
||||||
manager.setSudName(event.getAvatar());
|
manager.setSudName(event.getAvatar(), event.getCreateSudRoomModel());
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -5,11 +5,13 @@ import com.yunbao.common.bean.ActiveModel;
|
|||||||
import com.yunbao.common.bean.AiAutomaticSpeechModel;
|
import com.yunbao.common.bean.AiAutomaticSpeechModel;
|
||||||
import com.yunbao.common.bean.AnchorRecommendItemModel;
|
import com.yunbao.common.bean.AnchorRecommendItemModel;
|
||||||
import com.yunbao.common.bean.BaseModel;
|
import com.yunbao.common.bean.BaseModel;
|
||||||
|
import com.yunbao.common.bean.CreateSudRoomModel;
|
||||||
import com.yunbao.common.bean.LiveBean;
|
import com.yunbao.common.bean.LiveBean;
|
||||||
import com.yunbao.common.bean.MsgModel;
|
import com.yunbao.common.bean.MsgModel;
|
||||||
import com.yunbao.common.bean.OlineUserlistModel;
|
import com.yunbao.common.bean.OlineUserlistModel;
|
||||||
import com.yunbao.common.bean.RedPacketInfoModel;
|
import com.yunbao.common.bean.RedPacketInfoModel;
|
||||||
import com.yunbao.common.bean.RedPacketModel;
|
import com.yunbao.common.bean.RedPacketModel;
|
||||||
|
import com.yunbao.common.bean.SudGameDateModel;
|
||||||
import com.yunbao.common.bean.WishModel;
|
import com.yunbao.common.bean.WishModel;
|
||||||
import com.yunbao.common.bean.XydCompleteModel;
|
import com.yunbao.common.bean.XydCompleteModel;
|
||||||
import com.yunbao.common.event.AllServerNotifyEvent;
|
import com.yunbao.common.event.AllServerNotifyEvent;
|
||||||
@ -56,6 +58,25 @@ public class LiveAudienceEvent extends BaseModel {
|
|||||||
private boolean isPk;
|
private boolean isPk;
|
||||||
public String mStream;
|
public String mStream;
|
||||||
public String mLiveUid, giftId;
|
public String mLiveUid, giftId;
|
||||||
|
public SudGameDateModel createSudRoomModel;
|
||||||
|
|
||||||
|
public SudGameDateModel getCreateSudRoomModel() {
|
||||||
|
return createSudRoomModel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LiveAudienceEvent setCreateSudRoomModel(SudGameDateModel createSudRoomModel) {
|
||||||
|
this.createSudRoomModel = createSudRoomModel;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isContactGift() {
|
||||||
|
return isContactGift;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LiveAudienceEvent setContactGift(boolean contactGift) {
|
||||||
|
isContactGift = contactGift;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public String getGiftId() {
|
public String getGiftId() {
|
||||||
return giftId;
|
return giftId;
|
||||||
|
@ -31,6 +31,7 @@ import com.yunbao.common.bean.PkRankBean;
|
|||||||
import com.yunbao.common.bean.RedPacketInfoModel;
|
import com.yunbao.common.bean.RedPacketInfoModel;
|
||||||
import com.yunbao.common.bean.RedPacketModel;
|
import com.yunbao.common.bean.RedPacketModel;
|
||||||
import com.yunbao.common.bean.SocketModel;
|
import com.yunbao.common.bean.SocketModel;
|
||||||
|
import com.yunbao.common.bean.SudGameDateModel;
|
||||||
import com.yunbao.common.bean.UserBean;
|
import com.yunbao.common.bean.UserBean;
|
||||||
import com.yunbao.common.bean.WishModel;
|
import com.yunbao.common.bean.WishModel;
|
||||||
import com.yunbao.common.bean.XydCompleteModel;
|
import com.yunbao.common.bean.XydCompleteModel;
|
||||||
@ -753,7 +754,8 @@ public class SocketRyClient {
|
|||||||
case "SudGameCreateRoom":
|
case "SudGameCreateRoom":
|
||||||
Bus.get().post(new LiveAudienceEvent()
|
Bus.get().post(new LiveAudienceEvent()
|
||||||
.setType(LiveAudienceEvent.LiveAudienceType.SUD_GAME_CREATE_ROOM)
|
.setType(LiveAudienceEvent.LiveAudienceType.SUD_GAME_CREATE_ROOM)
|
||||||
.setAvatar(map.getString("room_name")));
|
.setAvatar(map.getString("room_name"))
|
||||||
|
.setCreateSudRoomModel(GsonUtils.fromJson(map.toString(), SudGameDateModel.class)));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -67,6 +67,7 @@ import com.yunbao.common.activity.AbsActivity;
|
|||||||
import com.yunbao.common.bean.AiAutomaticSpeechModel;
|
import com.yunbao.common.bean.AiAutomaticSpeechModel;
|
||||||
import com.yunbao.common.bean.BannerBean;
|
import com.yunbao.common.bean.BannerBean;
|
||||||
import com.yunbao.common.bean.BaseModel;
|
import com.yunbao.common.bean.BaseModel;
|
||||||
|
import com.yunbao.common.bean.CreateSudRoomModel;
|
||||||
import com.yunbao.common.bean.FansCheckRed;
|
import com.yunbao.common.bean.FansCheckRed;
|
||||||
import com.yunbao.common.bean.GiftModel;
|
import com.yunbao.common.bean.GiftModel;
|
||||||
import com.yunbao.common.bean.GuardUserModel;
|
import com.yunbao.common.bean.GuardUserModel;
|
||||||
@ -90,6 +91,7 @@ import com.yunbao.common.bean.RedPacketInfoModel;
|
|||||||
import com.yunbao.common.bean.RedPacketModel;
|
import com.yunbao.common.bean.RedPacketModel;
|
||||||
import com.yunbao.common.bean.RewardAllModel;
|
import com.yunbao.common.bean.RewardAllModel;
|
||||||
import com.yunbao.common.bean.StarChallengeStatusModel;
|
import com.yunbao.common.bean.StarChallengeStatusModel;
|
||||||
|
import com.yunbao.common.bean.SudGameDateModel;
|
||||||
import com.yunbao.common.bean.TaskModel;
|
import com.yunbao.common.bean.TaskModel;
|
||||||
import com.yunbao.common.bean.UserBean;
|
import com.yunbao.common.bean.UserBean;
|
||||||
import com.yunbao.common.bean.WishModel;
|
import com.yunbao.common.bean.WishModel;
|
||||||
@ -128,6 +130,7 @@ import com.yunbao.common.utils.ToastUtil;
|
|||||||
import com.yunbao.common.utils.WordUtil;
|
import com.yunbao.common.utils.WordUtil;
|
||||||
import com.yunbao.common.utils.formatBigNum;
|
import com.yunbao.common.utils.formatBigNum;
|
||||||
import com.yunbao.common.views.AbsViewHolder;
|
import com.yunbao.common.views.AbsViewHolder;
|
||||||
|
import com.yunbao.common.views.LiveSudGamePopup;
|
||||||
import com.yunbao.common.views.weight.ClipPathCircleImage;
|
import com.yunbao.common.views.weight.ClipPathCircleImage;
|
||||||
import com.yunbao.common.views.weight.FullServiceNotificationView;
|
import com.yunbao.common.views.weight.FullServiceNotificationView;
|
||||||
import com.yunbao.common.views.weight.NobleNoticeView;
|
import com.yunbao.common.views.weight.NobleNoticeView;
|
||||||
@ -636,26 +639,39 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
}
|
}
|
||||||
|
|
||||||
private TextView sud_text_name;
|
private TextView sud_text_name;
|
||||||
|
private LinearLayout sud_layout_name;
|
||||||
private Handler sudNameHandler = new Handler();
|
private Handler sudNameHandler = new Handler();
|
||||||
private Runnable sudNameRunnable = new Runnable() {
|
private Runnable sudNameRunnable = new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
if (sud_text_name != null) {
|
if (sud_layout_name != null) {
|
||||||
sud_text_name.setVisibility(View.GONE);
|
sud_layout_name.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
public void setSudName(String sudName) {
|
public void setSudName(String sudName, SudGameDateModel sudGameDateModel) {
|
||||||
sud_text_name = (TextView) findViewById(com.yunbao.common.R.id.sud_text_name);
|
sud_text_name = (TextView) findViewById(R.id.sud_text_name);
|
||||||
|
sud_layout_name = (LinearLayout) findViewById(R.id.sud_layout_name);
|
||||||
sud_text_name.setText(WordUtil.isNewZh() ?
|
sud_text_name.setText(WordUtil.isNewZh() ?
|
||||||
String.format("主播创建了【%s】房间,快来与主播同玩~", sudName) :
|
String.format("主播创建了【%s】房间,快来与主播同玩~", sudName) :
|
||||||
String.format("The anchor has created a 【%s】 room. Come and play with the anchor~", sudName));
|
String.format("The anchor has created a 【%s】 room. Come and play with the anchor~", sudName));
|
||||||
sud_text_name.setVisibility(View.VISIBLE);
|
sud_layout_name.setVisibility(View.VISIBLE);
|
||||||
ViewClicksAntiShake.clicksAntiShake(sud_text_name, new ViewClicksAntiShake.ViewClicksCallBack() {
|
ViewClicksAntiShake.clicksAntiShake(sud_layout_name, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||||
@Override
|
@Override
|
||||||
public void onViewClicks() {
|
public void onViewClicks() {
|
||||||
sud_text_name.setVisibility(View.GONE);
|
CreateSudRoomModel createSudRoomModel = new CreateSudRoomModel();
|
||||||
|
createSudRoomModel.setSudGameId(sudGameDateModel.getSudGameId());
|
||||||
|
createSudRoomModel.setSudGameRoomId(sudGameDateModel.getSudGameRoomId());
|
||||||
|
createSudRoomModel.setAvatar(sudGameDateModel.getAvatar());
|
||||||
|
createSudRoomModel.setRoomName(sudGameDateModel.getRoomName());
|
||||||
|
createSudRoomModel.setSudGameName(sudGameDateModel.getSudGameName());
|
||||||
|
new XPopup.Builder(mContext)
|
||||||
|
.enableDrag(false)
|
||||||
|
.dismissOnTouchOutside(false)
|
||||||
|
.dismissOnBackPressed(false)
|
||||||
|
.asCustom(new LiveSudGamePopup(mContext, createSudRoomModel))
|
||||||
|
.show();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
sudNameHandler.removeCallbacks(sudNameRunnable);
|
sudNameHandler.removeCallbacks(sudNameRunnable);
|
||||||
|
@ -45,6 +45,7 @@ import com.yunbao.common.bean.MsgModel;
|
|||||||
import com.yunbao.common.bean.RedPacketInfoModel;
|
import com.yunbao.common.bean.RedPacketInfoModel;
|
||||||
import com.yunbao.common.bean.RedPacketModel;
|
import com.yunbao.common.bean.RedPacketModel;
|
||||||
import com.yunbao.common.bean.StarChallengeStatusModel;
|
import com.yunbao.common.bean.StarChallengeStatusModel;
|
||||||
|
import com.yunbao.common.bean.SudGameDateModel;
|
||||||
import com.yunbao.common.bean.UserBean;
|
import com.yunbao.common.bean.UserBean;
|
||||||
import com.yunbao.common.bean.WishModel;
|
import com.yunbao.common.bean.WishModel;
|
||||||
import com.yunbao.common.bean.XydCompleteModel;
|
import com.yunbao.common.bean.XydCompleteModel;
|
||||||
@ -721,7 +722,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
|||||||
mLiveRoomViewHolder.hindeRedPacket();
|
mLiveRoomViewHolder.hindeRedPacket();
|
||||||
}
|
}
|
||||||
if (TextUtils.equals(data.getSudGameRoomStatus(), "1")) {
|
if (TextUtils.equals(data.getSudGameRoomStatus(), "1")) {
|
||||||
mLiveRoomViewHolder.setSudName(data.getSudGameRoomName());
|
mLiveRoomViewHolder.setSudName(data.getSudGameRoomName(), data.getSudGameDateModel());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1968,9 +1969,9 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setSudName(String sudName) {
|
public void setSudName(String sudName, SudGameDateModel sudGameDateModel) {
|
||||||
if (mLiveRoomViewHolder != null) {
|
if (mLiveRoomViewHolder != null) {
|
||||||
mLiveRoomViewHolder.setSudName(sudName);
|
mLiveRoomViewHolder.setSudName(sudName, sudGameDateModel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2478,21 +2478,31 @@
|
|||||||
android:layout_marginTop="80dp"
|
android:layout_marginTop="80dp"
|
||||||
app:autoPlay="true" />
|
app:autoPlay="true" />
|
||||||
|
|
||||||
<TextView
|
<LinearLayout
|
||||||
|
android:id="@+id/sud_layout_name"
|
||||||
|
android:layout_width="257dp"
|
||||||
|
android:layout_height="40dp"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_alignParentBottom="true"
|
||||||
|
android:background="@drawable/background_live_sud_hint"
|
||||||
|
android:gravity="center"
|
||||||
|
android:layout_marginStart="21dp"
|
||||||
|
android:layout_marginEnd="42dp"
|
||||||
|
android:paddingStart="21dp"
|
||||||
|
android:visibility="gone"
|
||||||
|
android:paddingEnd="15dp">
|
||||||
|
|
||||||
|
<com.yunbao.common.views.weight.MarqueeTextView
|
||||||
android:id="@+id/sud_text_name"
|
android:id="@+id/sud_text_name"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignParentBottom="true"
|
android:ellipsize="marquee"
|
||||||
android:layout_marginStart="21dp"
|
android:scrollHorizontally="true"
|
||||||
android:layout_marginEnd="21dp"
|
android:singleLine="true"
|
||||||
android:layout_marginBottom="24dp"
|
|
||||||
android:background="@drawable/bg_live_sud_hint"
|
|
||||||
android:paddingStart="22dp"
|
|
||||||
android:paddingTop="8dp"
|
|
||||||
android:paddingEnd="22dp"
|
|
||||||
android:paddingBottom="8dp"
|
|
||||||
android:text="主播創建了【游戲名】房間,快來與主播同玩~"
|
android:text="主播創建了【游戲名】房間,快來與主播同玩~"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
android:visibility="gone" />
|
/>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
Loading…
Reference in New Issue
Block a user