Compare commits
92 Commits
语音房_6.6.4_
...
master_6.6
| Author | SHA1 | Date | |
|---|---|---|---|
| f7845dde6f | |||
|
|
1023c0ab4d | ||
| df735af252 | |||
|
|
6f71a825b5 | ||
|
|
08e009e5f9 | ||
|
|
1a4a0632ee | ||
|
|
b3a02f8c2c | ||
| aa9bc7326c | |||
| 22769b981d | |||
|
|
85b4facfe8 | ||
| aef0435b93 | |||
| 9cc30186cd | |||
| f99641ed35 | |||
|
|
0552f56eb4 | ||
|
|
7ab4081f0b | ||
|
|
e7ef492015 | ||
| 1aa6cb8f55 | |||
| dc87fc7048 | |||
|
|
04b70d910a | ||
| a4ce44d9ba | |||
| 469e3e30ad | |||
|
|
7e7616ef29 | ||
|
|
dd64568fdf | ||
| 50fb801cf7 | |||
| e0200a9c7f | |||
| 5a32047c6d | |||
|
|
45fd56ba66 | ||
|
|
30b2884c46 | ||
| 0c07e8c2be | |||
|
|
508e9f1931 | ||
| 78d870ed89 | |||
|
|
c00afb1db0 | ||
|
|
dfca615735 | ||
|
|
a920b61bc4 | ||
|
|
3effb630c5 | ||
| 0e596e9be9 | |||
|
|
0a70cc027f | ||
| 47077a465a | |||
|
|
aa62dda844 | ||
|
|
004a5b2a53 | ||
|
|
64f9cee3af | ||
| 1eb43fb8cf | |||
|
|
f770370be0 | ||
| e185eb8612 | |||
| 299add0575 | |||
| feb08e1759 | |||
| 16755a9c8c | |||
|
|
d6e6164549 | ||
| 52c561fa08 | |||
| c2979b4cf7 | |||
|
|
0f70f10aed | ||
| 45f471055e | |||
|
|
c49c9c2f81 | ||
|
|
74b19de11c | ||
|
|
00b89aab69 | ||
|
|
6ff6cbbe6b | ||
|
|
65d38de73c | ||
|
|
ae6fdab7e8 | ||
|
|
3d1c4466e0 | ||
|
|
9963b37b6f | ||
| a8a1aa2e71 | |||
| 2857127285 | |||
|
|
3a1268aac7 | ||
|
|
5b813aff88 | ||
|
|
d9951b5a35 | ||
|
|
f928fce069 | ||
|
|
d365389ff8 | ||
| a4e98f3703 | |||
|
|
a307e6f864 | ||
|
|
b5c8f14994 | ||
|
|
34323fd983 | ||
|
|
1f7c6c8adc | ||
|
|
29c2334ee0 | ||
|
|
2aa50ecfc7 | ||
|
|
58b2d69601 | ||
|
|
e061e61088 | ||
|
|
24788d7e21 | ||
| 54693c0d37 | |||
|
|
27f136d6ca | ||
|
|
92d271ff93 | ||
|
|
0b15df41b8 | ||
|
|
7627219e77 | ||
|
|
ac6eb21e06 | ||
| 7795317c14 | |||
| c6fb323c68 | |||
| d629ee3f9f | |||
| df0d9795ed | |||
| 1759757176 | |||
|
|
661c2fd334 | ||
| b175e42ee1 | |||
| 6cdc648ea9 | |||
|
|
dcf3f5c308 |
@@ -83,6 +83,7 @@
|
||||
tools:ignore="ProtectedPermissions" />
|
||||
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
|
||||
<uses-permission android:name="com.android.vending.BILLING" />
|
||||
<uses-permission android:name="com.samsung.android.iap.permission.BILLING"/>
|
||||
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
|
||||
<!-- Android11新增 -->
|
||||
<!-- <uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />-->
|
||||
|
||||
@@ -6,6 +6,7 @@ import android.app.Activity;
|
||||
import android.app.ActivityManager;
|
||||
import android.content.Context;
|
||||
import android.net.http.HttpResponseCache;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
@@ -61,6 +62,7 @@ import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import io.rong.imkit.config.RongConfigCenter;
|
||||
@@ -274,7 +276,6 @@ public class AppContext extends CommonAppContext {
|
||||
configSPApp();
|
||||
//初始化美颜SDK
|
||||
// FaceManager.initFaceUnity(this);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -339,7 +340,7 @@ public class AppContext extends CommonAppContext {
|
||||
if (!CommonAppConfig.IS_UPLOAD_ERROR_LOG) {
|
||||
return;
|
||||
}
|
||||
if (CommonAppConfig.IS_GOOGLE_PLAY == 1) {
|
||||
if (CommonAppConfig.IS_GOOGLE_PLAY != 2) {
|
||||
GoogleUtils.newInstance(this).initializeApp(this);
|
||||
}
|
||||
}
|
||||
@@ -350,5 +351,17 @@ public class AppContext extends CommonAppContext {
|
||||
return;
|
||||
}
|
||||
String uid = CommonAppConfig.getInstance().getUid();
|
||||
|
||||
if (CommonAppConfig.IS_GOOGLE_PLAY != 2) {
|
||||
GoogleUtils.newInstance(sInstance).setFirebaseCrashData(
|
||||
uid,
|
||||
SpUtil.getInstance().getStringValue(SpUtil.USER_INFO),
|
||||
String.valueOf(CommonAppConfig.IS_GOOGLE_PLAY),
|
||||
Arrays.toString(Build.SUPPORTED_ABIS),
|
||||
String.valueOf(CrashSaveBean.getInstance().getStartTime()),
|
||||
String.valueOf(CrashSaveBean.getInstance().getEnterRoom()),
|
||||
String.valueOf(CrashSaveBean.getInstance().getSlidingRoom()),
|
||||
String.valueOf(CrashSaveBean.getInstance().getPlaySvga()), CrashSaveBean.getInstance().getActivitySize());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -209,12 +209,14 @@ dependencies {
|
||||
|
||||
// 多语言语音识别扩展库(可选)
|
||||
api 'tech.sud.mgp:SudASR:1.3.3.1158'
|
||||
//侧滑删除
|
||||
api 'com.yanzhenjie.recyclerview:x:1.3.2'
|
||||
|
||||
//华为支付插件包
|
||||
//api project(':lib_huawei')
|
||||
|
||||
//google插件包
|
||||
//api project(':lib_google')
|
||||
api project(':lib_google')
|
||||
|
||||
//samsung插件包
|
||||
api project(':IAP6Helper')
|
||||
|
||||
@@ -55,7 +55,7 @@ public class CommonAppContext extends MultiDexApplication {
|
||||
// RongPushClient.setPushConfig(config); //将推送相关配置设置到 SDK
|
||||
//设置新加坡融云服务器 有时候国内收不到推送是因为这个
|
||||
RongIMClient.setServerInfo("navsg01.cn.ronghub.com", null);
|
||||
if (CommonAppConfig.IS_GOOGLE_PLAY == 1) {
|
||||
if (CommonAppConfig.IS_GOOGLE_PLAY != 2) {
|
||||
//谷歌推送
|
||||
PushConfig gconfig = new PushConfig.Builder().enableFCM(true).build();
|
||||
RongPushClient.setPushConfig(gconfig);
|
||||
|
||||
@@ -30,6 +30,7 @@ import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.interfaces.LifeCycleListener;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.utils.ClickUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -381,5 +382,13 @@ public abstract class AbsActivity extends AppCompatActivity {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isKefu(String url){
|
||||
if(url.contains("kefu")){
|
||||
return true;
|
||||
}
|
||||
if(url.contains("https://newkf.yaoulive.com/")){
|
||||
return true;
|
||||
}
|
||||
return url.startsWith("https://kefu.yaoulive.com");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,6 +47,7 @@ import com.yunbao.common.utils.L;
|
||||
import com.yunbao.common.utils.LiveRoomCheckLivePresenter;
|
||||
import com.yunbao.common.utils.MicStatusManager;
|
||||
import com.yunbao.common.utils.RouteUtil;
|
||||
import com.yunbao.common.utils.StringUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.common.views.HintCustomPopup;
|
||||
@@ -83,7 +84,15 @@ public class WebViewActivity extends AbsActivity {
|
||||
@Override
|
||||
protected void main() {
|
||||
String url = getIntent().getStringExtra(Constants.URL);
|
||||
if(StringUtil.isEmpty(url)){
|
||||
url="";
|
||||
}
|
||||
L.e("H5--->" + url);
|
||||
if(isKefu(url)){
|
||||
RouteUtil.forwardCustomerService(url);
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
Bus.getOn(this);
|
||||
LinearLayout rootView = (LinearLayout) findViewById(R.id.rootView);
|
||||
mProgressBar = (ProgressBar) findViewById(R.id.progressbar);
|
||||
@@ -100,6 +109,10 @@ public class WebViewActivity extends AbsActivity {
|
||||
@Override
|
||||
public boolean shouldOverrideUrlLoading(WebView view, String url) {
|
||||
L.e("H5-------->" + url);
|
||||
if(isKefu(url)){
|
||||
RouteUtil.forwardCustomerService(url);
|
||||
return true;
|
||||
}
|
||||
if (url.startsWith(Constants.COPY_PREFIX)) {
|
||||
String content = url.substring(Constants.COPY_PREFIX.length());
|
||||
if (!TextUtils.isEmpty(content)) {
|
||||
@@ -186,7 +199,7 @@ public class WebViewActivity extends AbsActivity {
|
||||
mWebView.getSettings().setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);
|
||||
}
|
||||
mWebView.loadUrl(url);
|
||||
AndroidBug5497Workaround.assistActivity(this);
|
||||
AndroidBug5497Workaround.assistActivity(mWebView);
|
||||
|
||||
if (Constants.myIntoIndex == 2) {
|
||||
ft_title.setVisibility(View.GONE);
|
||||
@@ -397,6 +410,8 @@ public class WebViewActivity extends AbsActivity {
|
||||
} else if (TextUtils.equals(event.getMethod(), "androidMethodLookToLive")) {
|
||||
//看直播
|
||||
gotoLive(event.getLiveId());
|
||||
}else if (TextUtils.equals(event.getMethod(), "androidtoCommunityVideo")) {
|
||||
RouteUtil.forwardCommunityActivity();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -67,6 +67,13 @@ public abstract class RefreshAdapter<T> extends RecyclerView.Adapter {
|
||||
}
|
||||
}
|
||||
|
||||
public void refreshDel(){
|
||||
if (mRecyclerView != null) {
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void refreshData(List<T> list) {
|
||||
if (mRecyclerView != null && list != null) {
|
||||
mList.clear();
|
||||
|
||||
@@ -20,6 +20,12 @@ public class AnchorRecommendModel extends BaseModel {
|
||||
@SerializedName("red_packet_show")
|
||||
private int showRedPacket = 0;//是否显示首页红包浮窗
|
||||
//是否支持换一批0=不支持 1=支持
|
||||
|
||||
|
||||
@SerializedName("live_battle_pass_show_status")
|
||||
private int showWarOrder = 0;//是否显示首页戰令
|
||||
//是否支持换一批0=不支持 1=支持
|
||||
|
||||
@SerializedName("up_show")
|
||||
private int upShow = 0;
|
||||
@SerializedName("list")
|
||||
@@ -40,6 +46,14 @@ public class AnchorRecommendModel extends BaseModel {
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getShowWarOrder() {
|
||||
return showWarOrder;
|
||||
}
|
||||
|
||||
public void setShowWarOrder(int showWarOrder) {
|
||||
this.showWarOrder = showWarOrder;
|
||||
}
|
||||
|
||||
public int getListShow() {
|
||||
return listShow;
|
||||
}
|
||||
|
||||
@@ -34,6 +34,13 @@ public class BattlePassPoints extends BaseModel{
|
||||
@SerializedName("exchange_status_remark")
|
||||
private String exchangeMark;
|
||||
|
||||
@SerializedName("send_reward_type")
|
||||
private int sendRewardType;
|
||||
@SerializedName("send_gift_type")
|
||||
private int sendGiftType;
|
||||
@SerializedName("send_gift_needcoin")
|
||||
private String sendGiftNeedcoin;
|
||||
|
||||
public BattlePassPoints() {
|
||||
}
|
||||
|
||||
@@ -172,4 +179,54 @@ public class BattlePassPoints extends BaseModel{
|
||||
public void setPointsThresholdText(String pointsThresholdText) {
|
||||
this.pointsThresholdText = pointsThresholdText;
|
||||
}
|
||||
|
||||
public int getSendRewardType() {
|
||||
return sendRewardType;
|
||||
}
|
||||
|
||||
public void setSendRewardType(int sendRewardType) {
|
||||
this.sendRewardType = sendRewardType;
|
||||
}
|
||||
|
||||
public int getSendGiftType() {
|
||||
return sendGiftType;
|
||||
}
|
||||
|
||||
public void setSendGiftType(int sendGiftType) {
|
||||
this.sendGiftType = sendGiftType;
|
||||
}
|
||||
|
||||
public String getSendGiftNeedcoin() {
|
||||
return sendGiftNeedcoin;
|
||||
}
|
||||
|
||||
public void setSendGiftNeedcoin(String sendGiftNeedcoin) {
|
||||
this.sendGiftNeedcoin = sendGiftNeedcoin;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "BattlePassPoints{" +
|
||||
"id=" + id +
|
||||
", type=" + type +
|
||||
", rewardsName='" + rewardsName + '\'' +
|
||||
", rewardsId=" + rewardsId +
|
||||
", imageUrl='" + imageUrl + '\'' +
|
||||
", pointsThreshold='" + pointsThreshold + '\'' +
|
||||
", pointsThresholdText='" + pointsThresholdText + '\'' +
|
||||
", rewardsValue='" + rewardsValue + '\'' +
|
||||
", battlePassLevel=" + battlePassLevel +
|
||||
", exchangeQuantity=" + exchangeQuantity +
|
||||
", liveBattlePassTypeId=" + liveBattlePassTypeId +
|
||||
", description='" + description + '\'' +
|
||||
", restrictTime=" + restrictTime +
|
||||
", sort=" + sort +
|
||||
", exchangeStatus=" + exchangeStatus +
|
||||
", userQuintyCount=" + userQuintyCount +
|
||||
", exchangeMark='" + exchangeMark + '\'' +
|
||||
", sendRewardType=" + sendRewardType +
|
||||
", sendGiftType=" + sendGiftType +
|
||||
", sendRewardNeedcoin='" + sendGiftNeedcoin + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -173,4 +173,27 @@ public class BattlePassUserInfoBean extends BaseModel{
|
||||
public void setMaxLevel(int maxLevel) {
|
||||
this.maxLevel = maxLevel;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "BattlePassUserInfoBean{" +
|
||||
"uid='" + uid + '\'' +
|
||||
", points=" + points +
|
||||
", battlePassExp=" + battlePassExp +
|
||||
", battlePassUserRecords1=" + battlePassUserRecords1 +
|
||||
", battlePassUserRecords2=" + battlePassUserRecords2 +
|
||||
", battlePassUserRecords3=" + battlePassUserRecords3 +
|
||||
", level=" + level +
|
||||
", lastLevelExp=" + lastLevelExp +
|
||||
", nextLevelExp=" + nextLevelExp +
|
||||
", id='" + id + '\'' +
|
||||
", battlePassName='" + battlePassName + '\'' +
|
||||
", startTime='" + startTime + '\'' +
|
||||
", endTime='" + endTime + '\'' +
|
||||
", battlePassStatus=" + battlePassStatus +
|
||||
", maxLevelExp=" + maxLevelExp +
|
||||
", maxLevel=" + maxLevel +
|
||||
", live_battle_pass_type=" + live_battle_pass_type +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -97,6 +97,15 @@ public class LiveBattlePassRewardsBean extends BaseModel{
|
||||
private String rewardName;
|
||||
@SerializedName("image_url")
|
||||
private String imageUrl;
|
||||
@SerializedName("send_reward_type")
|
||||
private int sendRewardType;
|
||||
@SerializedName("send_gift_type")
|
||||
private int sendGiftType;
|
||||
@SerializedName("send_reward_needcoin")
|
||||
private String sendRewardNeedcoin;
|
||||
@SerializedName("send_reward_restrict_time")
|
||||
private String sendRewardRestrictTime;
|
||||
|
||||
private int lock;
|
||||
private int received;
|
||||
|
||||
@@ -158,5 +167,54 @@ public class LiveBattlePassRewardsBean extends BaseModel{
|
||||
public void setReceived(int received) {
|
||||
this.received = received;
|
||||
}
|
||||
|
||||
public int getSendRewardType() {
|
||||
return sendRewardType;
|
||||
}
|
||||
|
||||
public void setSendRewardType(int sendRewardType) {
|
||||
this.sendRewardType = sendRewardType;
|
||||
}
|
||||
|
||||
public int getSendGiftType() {
|
||||
return sendGiftType;
|
||||
}
|
||||
|
||||
public void setSendGiftType(int sendGiftType) {
|
||||
this.sendGiftType = sendGiftType;
|
||||
}
|
||||
|
||||
public String getSendRewardNeedcoin() {
|
||||
return sendRewardNeedcoin;
|
||||
}
|
||||
|
||||
public void setSendRewardNeedcoin(String sendRewardNeedcoin) {
|
||||
this.sendRewardNeedcoin = sendRewardNeedcoin;
|
||||
}
|
||||
|
||||
public String getSendRewardRestrictTime() {
|
||||
return sendRewardRestrictTime;
|
||||
}
|
||||
|
||||
public void setSendRewardRestrictTime(String sendRewardRestrictTime) {
|
||||
this.sendRewardRestrictTime = sendRewardRestrictTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "LiveBattlePassReward{" +
|
||||
"id=" + id +
|
||||
", liveBattlePassLevel=" + liveBattlePassLevel +
|
||||
", liveBattlePassTypeId=" + liveBattlePassTypeId +
|
||||
", rewardName='" + rewardName + '\'' +
|
||||
", imageUrl='" + imageUrl + '\'' +
|
||||
", sendRewardType=" + sendRewardType +
|
||||
", sendGiftType=" + sendGiftType +
|
||||
", sendRewardNeedcoin='" + sendRewardNeedcoin + '\'' +
|
||||
", sendRewardRestrictTime='" + sendRewardRestrictTime + '\'' +
|
||||
", lock=" + lock +
|
||||
", received=" + received +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,14 @@ public class LiveClassBean {
|
||||
@SerializedName("channel_show")
|
||||
private int channel_show;
|
||||
|
||||
public LiveClassBean() {
|
||||
}
|
||||
|
||||
public LiveClassBean(String chinese, String english) {
|
||||
this.chinese = chinese;
|
||||
this.english = english;
|
||||
}
|
||||
|
||||
public String getChinese() {
|
||||
return chinese;
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.yunbao.common.bean;
|
||||
import android.view.View;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
/**
|
||||
* Created by cxf on 2018/10/12.
|
||||
@@ -18,6 +19,8 @@ public class LiveGiftBean {
|
||||
// public static final int MARK_LUCK = 3;
|
||||
|
||||
private int id;
|
||||
@SerializedName("gift_id")
|
||||
private int gift_id;//包裹礼物id
|
||||
private int type;//0 普通礼物 1是贵族 2守护 3粉丝团 5盲盒礼物
|
||||
private int mark;// 0 普通 1热门 2守护 3幸运
|
||||
private String name;
|
||||
@@ -34,6 +37,7 @@ public class LiveGiftBean {
|
||||
private String isweek;
|
||||
private String end_time;
|
||||
private String tag;
|
||||
private boolean isPageGift;
|
||||
@JSONField(name = "blind_box_type")
|
||||
private int blind_box_type = 0;
|
||||
//礼物角标
|
||||
@@ -71,6 +75,14 @@ public class LiveGiftBean {
|
||||
@JSONField(name = "blind_box_ticket_id")
|
||||
private int blindBoxTicketId;
|
||||
|
||||
public boolean isPageGift() {
|
||||
return isPageGift;
|
||||
}
|
||||
|
||||
public void setPageGift(boolean pageGift) {
|
||||
isPageGift = pageGift;
|
||||
}
|
||||
|
||||
public int getBlindBoxTicketId() {
|
||||
return blindBoxTicketId;
|
||||
}
|
||||
@@ -80,6 +92,14 @@ public class LiveGiftBean {
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getGift_id() {
|
||||
return gift_id;
|
||||
}
|
||||
|
||||
public void setGift_id(int gift_id) {
|
||||
this.gift_id = gift_id;
|
||||
}
|
||||
|
||||
public int getBlindBoxTicket() {
|
||||
return blindBoxTicket;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class RoomMicStatusModel extends BaseModel{
|
||||
|
||||
@SerializedName("mic_status")
|
||||
private String micStatus;
|
||||
@SerializedName("im_status")
|
||||
private String imStatus;
|
||||
|
||||
public String getMicStatus() {
|
||||
return micStatus;
|
||||
}
|
||||
|
||||
public void setMicStatus(String micStatus) {
|
||||
this.micStatus = micStatus;
|
||||
}
|
||||
|
||||
public String getImStatus() {
|
||||
return imStatus;
|
||||
}
|
||||
|
||||
public void setImStatus(String imStatus) {
|
||||
this.imStatus = imStatus;
|
||||
}
|
||||
}
|
||||
@@ -6,6 +6,17 @@ public class SudGameChatImModel extends BaseModel {
|
||||
//文字消息
|
||||
private String textMessage;
|
||||
|
||||
private boolean welcomMessage;
|
||||
|
||||
public boolean isWelcomMessage() {
|
||||
return welcomMessage;
|
||||
}
|
||||
|
||||
public SudGameChatImModel setWelcomMessage(boolean welcomMessage) {
|
||||
this.welcomMessage = welcomMessage;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getNickname() {
|
||||
return nickname;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class SudGameUserModel extends BaseModel {
|
||||
@@ -14,6 +16,21 @@ public class SudGameUserModel extends BaseModel {
|
||||
private int id;
|
||||
@SerializedName("mic_status")
|
||||
private int micStatus; //麦克风状态 2.打开麦克风 3.关闭麦克风
|
||||
@SerializedName("game_status")
|
||||
private String gameStatus;// 游戏状态 1.未在游戏状态 2.游戏中;
|
||||
|
||||
public String getGameStatus() {
|
||||
return gameStatus;
|
||||
}
|
||||
|
||||
public boolean isGameIng() {
|
||||
return TextUtils.equals(getGameStatus(), "2") ;
|
||||
}
|
||||
|
||||
public SudGameUserModel setGameStatus(String gameStatus) {
|
||||
this.gameStatus = gameStatus;
|
||||
return this;
|
||||
}
|
||||
|
||||
private boolean mute = false;
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ import com.yunbao.common.R;
|
||||
import com.yunbao.common.http.ResponseModel;
|
||||
import com.yunbao.common.http.base.HttpCallback;
|
||||
import com.yunbao.common.http.live.LiveNetManager;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
|
||||
@@ -75,6 +76,8 @@ public class LiberalBattlePassPopupWindow extends CenterPopupView {
|
||||
if (mPassCallback != null) {
|
||||
mPassCallback.onCallback(data.getData().getCode(), data.getData().getMsg());
|
||||
}
|
||||
IMLoginManager.get(getContext()).upDataUserInfo();
|
||||
IMLoginManager.get(getContext()).updateUserCoin();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -7,11 +7,15 @@ import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.lxj.xpopup.core.CenterPopupView;
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.bean.BattlePassUserInfoBean;
|
||||
import com.yunbao.common.http.ResponseModel;
|
||||
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.common.views.weight.ViewClicksAntiShake;
|
||||
@@ -22,22 +26,24 @@ import java.math.BigDecimal;
|
||||
* 战令等级 经验
|
||||
*/
|
||||
public class OrderLevelPopupWindow extends CenterPopupView {
|
||||
private TextView orderLevel, orderLevelDiamond, balanceDiamond, current,expText;
|
||||
private TextView orderLevel, orderLevelDiamond, balanceDiamond, current, expText;
|
||||
private int currentExperience, totalExperience;//当前经验,全部经验
|
||||
private String buyExp = "100", currentLevel, balance;
|
||||
private ProgressBar progressBar;
|
||||
private OrderLevelCallback orderLevelCallback;
|
||||
private long maxExp;
|
||||
private BattlePassUserInfoBean userInfoBean;
|
||||
|
||||
public OrderLevelPopupWindow(@NonNull Context context,
|
||||
public OrderLevelPopupWindow(@NonNull Context context, BattlePassUserInfoBean userInfoBean,
|
||||
int mCurrentExperience, int mTotalExperience,
|
||||
String mCurrentLevel, String mBalance,long maxExp, OrderLevelCallback mOrderLevelCallback) {
|
||||
String mCurrentLevel, String mBalance, long maxExp, OrderLevelCallback mOrderLevelCallback) {
|
||||
super(context);
|
||||
this.userInfoBean = userInfoBean;
|
||||
currentExperience = mCurrentExperience;
|
||||
totalExperience = mTotalExperience;
|
||||
currentLevel = mCurrentLevel;
|
||||
balance = mBalance;
|
||||
this.maxExp=maxExp;
|
||||
this.maxExp = maxExp;
|
||||
orderLevelCallback = mOrderLevelCallback;
|
||||
}
|
||||
|
||||
@@ -59,7 +65,7 @@ public class OrderLevelPopupWindow extends CenterPopupView {
|
||||
orderLevel.setText(buyExp);
|
||||
progressBar.setMax(totalExperience);
|
||||
progressBar.setProgress(currentExperience);
|
||||
expText.setText(String.format("%s/%s", currentExperience, totalExperience));
|
||||
expText.setText(String.format("%s/%s", userInfoBean.getBattlePassExp(), userInfoBean.getNextLevelExp()));
|
||||
current.setText(String.format("Lv%s", currentLevel));
|
||||
balanceDiamond.setText(balance);
|
||||
findViewById(R.id.sub).setOnClickListener(new OnClickListener() {
|
||||
@@ -83,8 +89,8 @@ public class OrderLevelPopupWindow extends CenterPopupView {
|
||||
buyExp = String.valueOf(buyExpBigDecimal.intValue());
|
||||
orderLevelDiamond.setText(String.valueOf(buyExpBigDecimal.floatValue()));
|
||||
orderLevel.setText(buyExp);
|
||||
}else if(exp>=maxExp){
|
||||
ToastUtil.show(WordUtil.isNewZh()?"经验已滿":"Experience full");
|
||||
} else if (exp >= maxExp) {
|
||||
ToastUtil.show(WordUtil.isNewZh() ? "经验已滿" : "Experience full");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -102,20 +108,33 @@ public class OrderLevelPopupWindow extends CenterPopupView {
|
||||
.buyingExperiencePoint(buyExp, new HttpCallback<ResponseModel<Object>>() {
|
||||
@Override
|
||||
public void onSuccess(ResponseModel<Object> data) {
|
||||
|
||||
if (orderLevelCallback != null) {
|
||||
orderLevelCallback.onCallback(data.getData().getCode(), data.getMsg());
|
||||
}dialog.dismiss();
|
||||
}
|
||||
dialog.dismiss();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
if (orderLevelCallback != null) {
|
||||
orderLevelCallback.onCallback(102, error);
|
||||
} dialog.dismiss();
|
||||
}
|
||||
dialog.dismiss();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
IMLoginManager.get(getContext())
|
||||
.updateUserCoin(new OnItemClickListener<JSONObject>() {
|
||||
@Override
|
||||
public void onItemClick(JSONObject bean, int position) {
|
||||
if (bean != null) {
|
||||
balance = bean.getString("coin");
|
||||
balanceDiamond.setText(balance);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public interface OrderLevelCallback {
|
||||
|
||||
@@ -48,15 +48,16 @@ public class SudGameInputPopupWindow extends BottomPopupView {
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.send), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
dialog.dismiss();
|
||||
|
||||
if (sudGameInputCallBack != null) {
|
||||
String textMessageStr = textMessage.getText().toString();
|
||||
String textMessageStr = textMessage.getText().toString().trim();
|
||||
if (!TextUtils.isEmpty(textMessageStr)) {
|
||||
if (textMessageStr.length() > 100) {
|
||||
ToastUtil.show(WordUtil.isNewZh() ? "超出字數限制" : "Exceed word limit");
|
||||
} else {
|
||||
sudGameInputCallBack.sendMessage(textMessageStr);
|
||||
}
|
||||
dialog.dismiss();
|
||||
} else {
|
||||
ToastUtil.show(WordUtil.getNewString(R.string.cannot_be_empty));
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.yunbao.common.dialog;
|
||||
|
||||
import android.animation.ObjectAnimator;
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.animation.LinearInterpolator;
|
||||
@@ -275,6 +276,29 @@ public class SudGameListPopup extends BottomPopupView {
|
||||
.asCustom(new LiveSudGameHistoryPopup(getContext(), customSidebarChildModels)).show();
|
||||
}
|
||||
});
|
||||
if (interactionID == 0) {
|
||||
gameTitle.setTextColor(getDefColor());
|
||||
} else {
|
||||
gameTitle.setTextColor(getYellowColor());
|
||||
}
|
||||
if (mSill.equals("0,0,0")) {
|
||||
sillTitle.setTextColor(getDefColor());
|
||||
} else {
|
||||
sillTitle.setTextColor(getYellowColor());
|
||||
}
|
||||
if ("0".equals(roomHolderType)) {
|
||||
houseOwnerTitle.setTextColor(getDefColor());
|
||||
} else {
|
||||
houseOwnerTitle.setTextColor(getYellowColor());
|
||||
}
|
||||
}
|
||||
|
||||
private int getYellowColor() {
|
||||
return Color.parseColor("#FF8D41");
|
||||
}
|
||||
|
||||
private int getDefColor() {
|
||||
return Color.WHITE;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -293,6 +317,11 @@ public class SudGameListPopup extends BottomPopupView {
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onSudGameListEvent(SudGameListEvent event) {
|
||||
interactionID = event.getInteractionID();
|
||||
if (interactionID == 0) {
|
||||
gameTitle.setTextColor(getDefColor());
|
||||
} else {
|
||||
gameTitle.setTextColor(getYellowColor());
|
||||
}
|
||||
if (IMLoginManager.get(getContext()).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) {
|
||||
gameTitle.setText(event.getTitle());
|
||||
} else {
|
||||
@@ -325,7 +354,11 @@ public class SudGameListPopup extends BottomPopupView {
|
||||
} else {
|
||||
sillTitle.setText(mSillName.substring(0, mSillName.length() - 2));
|
||||
}
|
||||
|
||||
if (mSill.equals("0,0,0")) {
|
||||
sillTitle.setTextColor(getDefColor());
|
||||
} else {
|
||||
sillTitle.setTextColor(getYellowColor());
|
||||
}
|
||||
|
||||
ObjectAnimator animator = ObjectAnimator.ofFloat(roomSillArrow, "rotation", 90f, 0f);
|
||||
animator.setDuration(500);
|
||||
@@ -344,6 +377,11 @@ public class SudGameListPopup extends BottomPopupView {
|
||||
animator.setInterpolator(new LinearInterpolator());
|
||||
animator.start();
|
||||
mRefreshView.initData();
|
||||
if ("0".equals(roomHolderType)) {
|
||||
houseOwnerTitle.setTextColor(getDefColor());
|
||||
} else {
|
||||
houseOwnerTitle.setTextColor(getYellowColor());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ public class SudGameSmallPopupPindow extends AttachPopupView {
|
||||
return;
|
||||
}
|
||||
if (sudGameUserModel.getMicStatus() == 3) {
|
||||
ToastUtil.show("对方未开麦!");
|
||||
ToastUtil.show(WordUtil.isNewZh() ? "對方未開麥!" : "The other side did not turn on the microphone");
|
||||
return;
|
||||
}
|
||||
if (!mute) {
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.yunbao.common.event;
|
||||
|
||||
import com.yunbao.common.bean.BaseModel;
|
||||
|
||||
public class FloatWarOrderEvent extends BaseModel {
|
||||
private boolean floatWarOrder;
|
||||
|
||||
public boolean isFloatWarOrder() {
|
||||
return floatWarOrder;
|
||||
}
|
||||
|
||||
public FloatWarOrderEvent setFloatWarOrder(boolean floatWarOrder) {
|
||||
this.floatWarOrder = floatWarOrder;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -329,6 +329,8 @@ public class CommonHttpUtil {
|
||||
isGoogle = "1";
|
||||
} else if (CommonAppConfig.IS_GOOGLE_PLAY == 2) {
|
||||
isGoogle = "2";
|
||||
}else if (CommonAppConfig.IS_GOOGLE_PLAY == 3) {
|
||||
isGoogle = "3";
|
||||
} else {
|
||||
isGoogle = "-1";
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ import com.yunbao.common.utils.L;
|
||||
import com.yunbao.common.utils.MD5Util;
|
||||
import com.yunbao.common.utils.StringUtil;
|
||||
import com.yunbao.common.utils.VersionUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
@@ -644,7 +645,40 @@ public class LiveHttpUtil {
|
||||
.params("appVersion", CommonAppConfig.getInstance().getVersion())
|
||||
.execute(callback);
|
||||
}
|
||||
|
||||
/**
|
||||
* 观众给主播送礼物 - 包裹
|
||||
*
|
||||
* @param isContactGift 是否为联系方式礼物
|
||||
*/
|
||||
public static void sendGiftForPage(String by, String liveUid, String stream, int giftId, String giftCount, int isContactGift, boolean isFansGroupGift, HttpCallback callback) {
|
||||
HttpClient.getInstance().get("Live.sendPackGift", LiveHttpConsts.SEND_GIFT)
|
||||
.params("liveuid", liveUid)
|
||||
.params("stream", stream)
|
||||
.params("giftid", giftId)
|
||||
.params("isContactGift", isContactGift)
|
||||
.params("giftcount", giftCount)
|
||||
.params("isprank", by)
|
||||
.params("fans_exclusive_pack", isFansGroupGift ? "1" : "0")
|
||||
.params("appVersion", CommonAppConfig.getInstance().getVersion())
|
||||
.execute(callback);
|
||||
}
|
||||
/**
|
||||
* 观众给主播送礼物 - 粉丝团
|
||||
*
|
||||
* @param isContactGift 是否为联系方式礼物
|
||||
*/
|
||||
public static void sendGiftForFansGroup(String by, String liveUid, String stream, int giftId, String giftCount, int isContactGift, boolean isFansGroupGift, HttpCallback callback) {
|
||||
HttpClient.getInstance().get("Live.fansExclusivePack", LiveHttpConsts.SEND_GIFT)
|
||||
.params("liveuid", liveUid)
|
||||
.params("stream", stream)
|
||||
.params("giftid", giftId)
|
||||
.params("isContactGift", isContactGift)
|
||||
.params("giftcount", giftCount)
|
||||
.params("isprank", by)
|
||||
.params("fans_exclusive_pack", isFansGroupGift ? "1" : "0")
|
||||
.params("appVersion", CommonAppConfig.getInstance().getVersion())
|
||||
.execute(callback);
|
||||
}
|
||||
public static void sendBlindBoxTicket(String by, String liveUid, String stream, int giftId, HttpCallback callback) {
|
||||
HttpClient.getInstance().get("Live.sendBlindBoxTicket", LiveHttpConsts.SEND_GIFT)
|
||||
.params("liveuid", liveUid)
|
||||
@@ -1003,5 +1037,13 @@ public class LiveHttpUtil {
|
||||
.execute(callback);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取短剧Url
|
||||
*/
|
||||
public static void getCoolydrama(HttpCallback callback){
|
||||
HttpClient.getInstance().get("cool.register", "Home.getFollow")
|
||||
.params("lang", WordUtil.isNewZh()?"zh_CN":"en")
|
||||
.execute(callback);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -58,6 +58,7 @@ import com.yunbao.common.bean.RedPacketDetailsBean;
|
||||
import com.yunbao.common.bean.RedPacketGiftModel;
|
||||
import com.yunbao.common.bean.RedPacketInfoModel;
|
||||
import com.yunbao.common.bean.RedPacketListBean;
|
||||
import com.yunbao.common.bean.RoomMicStatusModel;
|
||||
import com.yunbao.common.bean.SearchModel;
|
||||
import com.yunbao.common.bean.SetAttentsModel;
|
||||
import com.yunbao.common.bean.SlideInBannerModel;
|
||||
@@ -1142,16 +1143,23 @@ public interface PDLiveApi {
|
||||
Observable<ResponseModel<String>> battlePassRule();
|
||||
|
||||
@GET("/api/public/?service=Livebattlepass.addChatCount")
|
||||
Observable<ResponseModel<List<BaseModel>>> addChatCount();
|
||||
Observable<ResponseModel<List<BaseModel>>> addChatCount(@Query("stream") String stream);
|
||||
|
||||
@GET("/api/public/?service=Sudgameserver.joinMic")
|
||||
Observable<ResponseModel<List<BaseModel>>> joinMic(@Query("room_id") String roomId);
|
||||
|
||||
@GET("/api/public/?service=Sudgameserver.onMic")
|
||||
Observable<ResponseModel<List<BaseModel>>> onMic(@Query("room_id") String roomId);
|
||||
|
||||
@GET("/api/public/?service=Sudgameserver.offMic")
|
||||
Observable<ResponseModel<List<BaseModel>>> offMic(@Query("room_id") String roomId);
|
||||
|
||||
@GET("/api/public/?service=Sudgameserver.leaveMic")
|
||||
Observable<ResponseModel<List<BaseModel>>> leaveMic(@Query("room_id") String roomId);
|
||||
|
||||
@GET("/api/public/?service=Sudgameserver.getRoomMicData")
|
||||
Observable<ResponseModel<List<SudGameUserModel>>> getRoomMicData(@Query("room_id") String roomId);
|
||||
|
||||
@GET("/api/public/?service=Sudgameserver.getRoomMicStatus")
|
||||
Observable<ResponseModel<RoomMicStatusModel>> getRoomMicStatus();
|
||||
}
|
||||
|
||||
@@ -56,6 +56,7 @@ import com.yunbao.common.bean.RedPacketDetailsBean;
|
||||
import com.yunbao.common.bean.RedPacketGiftModel;
|
||||
import com.yunbao.common.bean.RedPacketInfoModel;
|
||||
import com.yunbao.common.bean.RedPacketListBean;
|
||||
import com.yunbao.common.bean.RoomMicStatusModel;
|
||||
import com.yunbao.common.bean.SetAttentsModel;
|
||||
import com.yunbao.common.bean.StarChallengeStatusModel;
|
||||
import com.yunbao.common.bean.SudGameUserModel;
|
||||
@@ -2674,9 +2675,7 @@ public class LiveNetManager {
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(responseModel -> {
|
||||
if (callback != null) {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(new HttpCallbackModel(responseModel.getData().getCode(), responseModel.getData().getMsg()));
|
||||
}
|
||||
callback.onSuccess(new HttpCallbackModel(responseModel.getData().getCode(), responseModel.getData().getMsg()));
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
@@ -2771,9 +2770,9 @@ public class LiveNetManager {
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
public void addChatCount(HttpCallback<HttpCallbackModel> callback) {
|
||||
public void addChatCount(String stream,HttpCallback<HttpCallbackModel> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.addChatCount()
|
||||
.addChatCount(stream)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(responseModel -> {
|
||||
@@ -2908,6 +2907,30 @@ public class LiveNetManager {
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
public void getRoomMicStatus(HttpCallback<RoomMicStatusModel> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.getRoomMicStatus()
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<RoomMicStatusModel>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<RoomMicStatusModel> roomMicStatusModelResponseModel) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(roomMicStatusModelResponseModel.getData().getInfo());
|
||||
}
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
throwable.printStackTrace();
|
||||
if (callback != null) {
|
||||
callback.onError(mContext.getString(R.string.net_error));
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 直播间取消网络请求
|
||||
*/
|
||||
|
||||
@@ -8,6 +8,7 @@ import android.text.TextUtils;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.google.gson.Gson;
|
||||
import com.lzf.easyfloat.EasyFloat;
|
||||
import com.umeng.analytics.MobclickAgent;
|
||||
@@ -16,6 +17,7 @@ import com.yunbao.common.bean.IMLoginModel;
|
||||
import com.yunbao.common.event.DataUserInfoEvent;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.http.HttpClient;
|
||||
import com.yunbao.common.interfaces.OnItemClickListener;
|
||||
import com.yunbao.common.manager.base.BaseCacheManager;
|
||||
import com.yunbao.common.manager.imrongcloud.MessageIMManager;
|
||||
import com.yunbao.common.manager.imrongcloud.RongcloudIMManager;
|
||||
@@ -509,5 +511,39 @@ public class IMLoginManager extends BaseCacheManager {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void updateUserCoin(){
|
||||
HttpClient.getInstance().get("User.getUserBalance", "User.getUserBalance")
|
||||
.execute(new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if (code == 0) {
|
||||
JSONObject obj = JSONObject.parseObject(info[0]);
|
||||
String golds = obj.getString("gold");
|
||||
String coins = obj.getString("coin");
|
||||
String yuanbaos = obj.getString("yuanbao");
|
||||
userInfo.setCoin(obj.getLong("coin"));
|
||||
userInfo.setGold(obj.getLong("gold"));
|
||||
userInfo.setYuanbao(yuanbaos);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
public void updateUserCoin(OnItemClickListener<JSONObject> listener){
|
||||
HttpClient.getInstance().get("User.getUserBalance", "User.getUserBalance")
|
||||
.execute(new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if (code == 0) {
|
||||
JSONObject obj = JSONObject.parseObject(info[0]);
|
||||
listener.onItemClick(obj,0);
|
||||
String golds = obj.getString("gold");
|
||||
String coins = obj.getString("coin");
|
||||
String yuanbaos = obj.getString("yuanbao");
|
||||
userInfo.setCoin(obj.getLong("coin"));
|
||||
userInfo.setGold(obj.getLong("gold"));
|
||||
userInfo.setYuanbao(yuanbaos);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -245,7 +245,7 @@ public class GameMicManager {
|
||||
|
||||
|
||||
try {
|
||||
getView().onSubscribeSuccess(userID,mute,position);
|
||||
getView().onSubscribeSuccess(userID, mute, position);
|
||||
} catch (IllegalStateException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
@@ -355,39 +355,44 @@ public class GameMicManager {
|
||||
RCRTCEngine.getInstance().getDefaultAudioStream().setAudioQuality(RCRTCParamsType.AudioQuality.MUSIC_HIGH, RCRTCParamsType.AudioScenario.MUSIC_CHATROOM);
|
||||
}
|
||||
|
||||
public void joinRoom(String roomId) {
|
||||
public void joinRoom(String roomId, boolean imOff) {
|
||||
mRoomID = roomId;
|
||||
RCRTCRoomConfig roomConfig = RCRTCRoomConfig.Builder.create()
|
||||
// 根据实际场景,选择音视频直播:LIVE_AUDIO_VIDEO 或音频直播:LIVE_AUDIO
|
||||
.setRoomType(RCRTCRoomType.MEETING)
|
||||
if (imOff) {
|
||||
|
||||
.build();
|
||||
RCRTCEngine.getInstance().joinRoom("v" + roomId, roomConfig, new IRCRTCResultDataCallback<RCRTCRoom>() {
|
||||
@Override
|
||||
public void onSuccess(final RCRTCRoom rcrtcRoom) {
|
||||
GameMicManager.this.mRtcRoom = rcrtcRoom;
|
||||
// 注册房间回调
|
||||
rcrtcRoom.registerRoomListener(roomEventsListener);
|
||||
try {
|
||||
getView().onJoinRoomSuccess(rcrtcRoom);
|
||||
} catch (IllegalStateException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
RCRTCRoomConfig roomConfig = RCRTCRoomConfig.Builder.create()
|
||||
// 根据实际场景,选择音视频直播:LIVE_AUDIO_VIDEO 或音频直播:LIVE_AUDIO
|
||||
.setRoomType(RCRTCRoomType.MEETING)
|
||||
|
||||
@Override
|
||||
public void onFailed(RTCErrorCode rtcErrorCode) {
|
||||
try {
|
||||
getView().onJoinRoomFailed(rtcErrorCode);
|
||||
} catch (IllegalStateException e) {
|
||||
e.printStackTrace();
|
||||
.build();
|
||||
RCRTCEngine.getInstance().joinRoom("v" + roomId, roomConfig, new IRCRTCResultDataCallback<RCRTCRoom>() {
|
||||
@Override
|
||||
public void onSuccess(final RCRTCRoom rcrtcRoom) {
|
||||
GameMicManager.this.mRtcRoom = rcrtcRoom;
|
||||
// 注册房间回调
|
||||
rcrtcRoom.registerRoomListener(roomEventsListener);
|
||||
try {
|
||||
getView().onJoinRoomSuccess(rcrtcRoom);
|
||||
} catch (IllegalStateException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@Override
|
||||
public void onFailed(RTCErrorCode rtcErrorCode) {
|
||||
try {
|
||||
getView().onJoinRoomFailed(rtcErrorCode);
|
||||
} catch (IllegalStateException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
RongChatRoomClient.getInstance().joinChatRoom("v" + roomId, -1, new IRongCoreCallback.OperationCallback() {
|
||||
@Override
|
||||
public void onSuccess() {
|
||||
Log.i("tx", "加入成功");
|
||||
enterRoom();
|
||||
|
||||
}
|
||||
|
||||
@@ -436,7 +441,18 @@ public class GameMicManager {
|
||||
SudGameSocketImEvent.MsgDTO msgDTO = msgDTOS.get(0);
|
||||
//正常文字消息
|
||||
if (TextUtils.equals(msgDTO.getMethod(), "SendMsg")) {
|
||||
getView().insertItem(new SudGameChatImModel().setNickname(msgDTO.getUname()).setTextMessage(msgDTO.getCt()));
|
||||
getView().insertItem(new SudGameChatImModel().setWelcomMessage(false).setNickname(msgDTO.getUname()).setTextMessage(msgDTO.getCt()));
|
||||
} else if (TextUtils.equals(msgDTO.getMethod(), "welcomMessage")) {
|
||||
// 欢迎(用户名)进入房间 Welcome (username) to the room
|
||||
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
if (WordUtil.isNewZh()) {
|
||||
stringBuffer.append("歡迎 ").append(msgDTO.getCt()).append(" 進入房間");
|
||||
} else {
|
||||
stringBuffer.append("Welcome ").append(msgDTO.getCt()).append(" to enter the room");
|
||||
}
|
||||
|
||||
getView().insertItem(new SudGameChatImModel().setWelcomMessage(true).setNickname(msgDTO.getCt()).setTextMessage(stringBuffer.toString()));
|
||||
} else if (TextUtils.equals(msgDTO.getMethod(), "sudGameRoomVoiceList")) {
|
||||
List<SudGameUserModel> personList = new Gson().fromJson(msgDTO.getCt(), new TypeToken<List<SudGameUserModel>>() {
|
||||
}.getType());
|
||||
@@ -447,12 +463,7 @@ public class GameMicManager {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送聊天信息
|
||||
*
|
||||
* @param textMessage
|
||||
*/
|
||||
public void sendMessage(String textMessage) {
|
||||
private void sendChatMessage(String textMessage, String method) {
|
||||
IMLoginModel loginModel = IMLoginManager.get(CommonAppContext.sInstance.getApplicationContext()).getUserInfo();
|
||||
SudGameSocketImEvent sudGameSocketImEvent = new SudGameSocketImEvent();
|
||||
sudGameSocketImEvent.setRetcode("000000");
|
||||
@@ -463,7 +474,7 @@ public class GameMicManager {
|
||||
.setCt(textMessage)
|
||||
.setEquipment("app")
|
||||
.setUid(String.valueOf(loginModel.getId()))
|
||||
.setMethod("SendMsg")
|
||||
.setMethod(method)
|
||||
.setUname(loginModel.getUserNicename())
|
||||
.setRoomnum(mRoomID);
|
||||
|
||||
@@ -490,11 +501,28 @@ public class GameMicManager {
|
||||
|
||||
@Override
|
||||
public void onError(Message message, RongIMClient.ErrorCode errorCode) {
|
||||
|
||||
Log.i("tx", "发送成功" + errorCode.toString());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送聊天信息
|
||||
*
|
||||
* @param textMessage
|
||||
*/
|
||||
public void sendMessage(String textMessage) {
|
||||
sendChatMessage(textMessage, "SendMsg");
|
||||
}
|
||||
|
||||
/**
|
||||
* 进房间
|
||||
*/
|
||||
public void enterRoom() {
|
||||
IMLoginModel loginModel = IMLoginManager.get(CommonAppContext.sInstance.getApplicationContext()).getUserInfo();
|
||||
sendChatMessage(loginModel.getUserNicename(), "welcomMessage");
|
||||
}
|
||||
|
||||
/**
|
||||
* activity相关回调
|
||||
*/
|
||||
@@ -515,9 +543,11 @@ public class GameMicManager {
|
||||
void onSubscribeSuccess(List<RCRTCInputStream> inputStreamList);
|
||||
|
||||
void onSubscribeFailed();
|
||||
void onSubscribeSuccess(String userID,boolean mute, int position);
|
||||
|
||||
void onSubscribeSuccess(String userID, boolean mute, int position);
|
||||
|
||||
void onSubscribeFailed(String userID);
|
||||
|
||||
void onUserJoined(RCRTCRemoteUser rcrtcRemoteUser);
|
||||
|
||||
void onUserLeft(RCRTCRemoteUser rcrtcRemoteUser);
|
||||
|
||||
@@ -11,7 +11,6 @@ import com.samsung.android.sdk.iap.lib.listener.OnPaymentListener;
|
||||
import com.samsung.android.sdk.iap.lib.vo.ConsumeVo;
|
||||
import com.samsung.android.sdk.iap.lib.vo.ErrorVo;
|
||||
import com.samsung.android.sdk.iap.lib.vo.OwnedProductVo;
|
||||
import com.samsung.android.sdk.iap.lib.vo.PurchaseVo;
|
||||
import com.yunbao.common.utils.L;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -41,9 +40,16 @@ public class SamsungUtil {
|
||||
public void init() {
|
||||
iapHelper = IapHelper.getInstance(mContext);
|
||||
//设置支付模式 OPERATION_MODE_PRODUCTION 正式模式 OPERATION_MODE_TEST 测试模式
|
||||
iapHelper.setOperationMode(HelperDefine.OperationMode.OPERATION_MODE_TEST);
|
||||
iapHelper.setOperationMode(HelperDefine.OperationMode.OPERATION_MODE_PRODUCTION);
|
||||
}
|
||||
|
||||
public void dispose() {
|
||||
if (iapHelper != null) {
|
||||
iapHelper.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 购买
|
||||
*
|
||||
|
||||
@@ -9,6 +9,8 @@ import android.view.ViewTreeObserver;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
import android.widget.FrameLayout;
|
||||
|
||||
import com.yunbao.common.activity.AbsActivity;
|
||||
|
||||
/**
|
||||
* 修复全屏WebView输入法遮挡输入框的问题
|
||||
* <a href="https://github.com/madebycm/AndroidBug5497Workaround/tree/master">GitHub</a>
|
||||
@@ -21,11 +23,14 @@ public class AndroidBug5497Workaround {
|
||||
public static void assistActivity(Activity activity) {
|
||||
new AndroidBug5497Workaround(activity);
|
||||
}
|
||||
public static void assistActivity(View webView) {
|
||||
new AndroidBug5497Workaround(webView);
|
||||
}
|
||||
|
||||
private View mChildOfContent;
|
||||
private int usableHeightPrevious;
|
||||
private int defHeight = ViewGroup.LayoutParams.MATCH_PARENT;
|
||||
private FrameLayout.LayoutParams frameLayoutParams;
|
||||
private ViewGroup.LayoutParams frameLayoutParams;
|
||||
|
||||
private AndroidBug5497Workaround(Activity activity) {
|
||||
FrameLayout content = (FrameLayout) activity.findViewById(android.R.id.content);
|
||||
@@ -34,6 +39,7 @@ public class AndroidBug5497Workaround {
|
||||
public void onGlobalLayout() {
|
||||
possiblyResizeChildOfContent();
|
||||
int heightDiff = mChildOfContent.getRootView().getHeight() - mChildOfContent.getHeight();
|
||||
System.out.println("heightDiff = " + heightDiff);
|
||||
if (heightDiff < 100) {
|
||||
frameLayoutParams.height = defHeight;
|
||||
mChildOfContent.requestLayout();
|
||||
@@ -41,7 +47,24 @@ public class AndroidBug5497Workaround {
|
||||
}
|
||||
});
|
||||
|
||||
frameLayoutParams = (FrameLayout.LayoutParams) mChildOfContent.getLayoutParams();
|
||||
frameLayoutParams = (ViewGroup.LayoutParams) mChildOfContent.getLayoutParams();
|
||||
}
|
||||
|
||||
public AndroidBug5497Workaround(View content) {
|
||||
mChildOfContent = content;
|
||||
mChildOfContent.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
|
||||
public void onGlobalLayout() {
|
||||
possiblyResizeChildOfContent();
|
||||
int heightDiff = mChildOfContent.getRootView().getHeight() - mChildOfContent.getHeight();
|
||||
System.out.println("heightDiff = " + heightDiff);
|
||||
if (heightDiff < 100) {
|
||||
frameLayoutParams.height = defHeight;
|
||||
mChildOfContent.requestLayout();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
frameLayoutParams = (ViewGroup.LayoutParams) mChildOfContent.getLayoutParams();
|
||||
}
|
||||
|
||||
private void possiblyResizeChildOfContent() {
|
||||
@@ -51,7 +74,7 @@ public class AndroidBug5497Workaround {
|
||||
int heightDifference = usableHeightSansKeyboard - usableHeightNow;
|
||||
if (heightDifference > (usableHeightSansKeyboard / 4)) {
|
||||
// keyboard probably just became visible
|
||||
frameLayoutParams.height = usableHeightSansKeyboard - heightDifference;
|
||||
frameLayoutParams.height = usableHeightSansKeyboard - heightDifference - AbsActivity.getCurrentNavigationBarHeight((Activity) mChildOfContent.getContext());
|
||||
} else {
|
||||
// keyboard probably just became hidden
|
||||
frameLayoutParams.height = usableHeightSansKeyboard;
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.yunbao.common.utils;
|
||||
|
||||
import com.yunbao.common.http.Data;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
|
||||
@@ -13,10 +15,13 @@ public class DateFormatUtil {
|
||||
private static SimpleDateFormat sFormat2;
|
||||
private static SimpleDateFormat sFormat3;
|
||||
|
||||
private static SimpleDateFormat sFormat4;
|
||||
|
||||
static {
|
||||
sFormat = new SimpleDateFormat("yyyyMMddHHmmssSSS");
|
||||
sFormat2 = new SimpleDateFormat("yyyyMMdd_HHmmss_SSS");
|
||||
sFormat3 = new SimpleDateFormat("MM.dd-HH:mm:ss");
|
||||
sFormat4 = new SimpleDateFormat("yyyy年MM月dd日 HH:mm");
|
||||
}
|
||||
|
||||
|
||||
@@ -24,6 +29,14 @@ public class DateFormatUtil {
|
||||
return sFormat.format(new Date());
|
||||
}
|
||||
|
||||
public static String getTimeString(long time) {
|
||||
Date date = new Date(time); // 创建Date对象并传入时间戳参数
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); // 设置日期格式
|
||||
String formattedDate = sdf.format(date); // 格式化日期字符串
|
||||
return formattedDate;
|
||||
}
|
||||
|
||||
|
||||
public static String getVideoCurTimeString() {
|
||||
return sFormat2.format(new Date());
|
||||
}
|
||||
|
||||
@@ -69,7 +69,8 @@ public class DialogUitl {
|
||||
}
|
||||
return dialog;
|
||||
}
|
||||
public static void showToast(Context context,String content,long delayMillis){
|
||||
|
||||
public static void showToast(Context context, String content, long delayMillis) {
|
||||
Dialog dialog = new Dialog(context, R.style.dialog);
|
||||
dialog.setContentView(R.layout.dialog_toast);
|
||||
dialog.setCancelable(false);
|
||||
@@ -82,7 +83,7 @@ public class DialogUitl {
|
||||
}
|
||||
}
|
||||
dialog.show();
|
||||
new Handler(Looper.getMainLooper()).postDelayed(dialog::dismiss,delayMillis);
|
||||
new Handler(Looper.getMainLooper()).postDelayed(dialog::dismiss, delayMillis);
|
||||
}
|
||||
|
||||
|
||||
@@ -94,6 +95,16 @@ public class DialogUitl {
|
||||
showSimpleTipDialog(context, null, content);
|
||||
}
|
||||
|
||||
public static void showBackDialog(Context context, String content, String cancel, String sure, SimpleCallback callback) {
|
||||
if (context instanceof Activity) {
|
||||
if (((Activity) context).isDestroyed() || ((Activity) context).isFinishing()) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
new Builder(context).setTitle(content).setCancelable(true).isShowContent(false).setCancelString(cancel).setConfirmString(sure).setClickCallback(callback).build().show();
|
||||
}
|
||||
|
||||
|
||||
public static void showSimpleTipDialog(Context context, String title, String content) {
|
||||
if (context instanceof Activity) {
|
||||
if (((Activity) context).isDestroyed() || ((Activity) context).isFinishing()) {
|
||||
@@ -121,6 +132,38 @@ public class DialogUitl {
|
||||
dialog.show();
|
||||
}
|
||||
|
||||
|
||||
public static void showDelSysMsg(Context context, String content, SimpleCallback simpleCallback) {
|
||||
if (context instanceof Activity) {
|
||||
if (((Activity) context).isDestroyed() || ((Activity) context).isFinishing()) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
final Dialog dialog = new Dialog(context, R.style.dialog2);
|
||||
dialog.setContentView(R.layout.dialog_del_sys_msg);
|
||||
dialog.setCancelable(true);
|
||||
dialog.setCanceledOnTouchOutside(true);
|
||||
if (!TextUtils.isEmpty(content)) {
|
||||
TextView contentTextView = (TextView) dialog.findViewById(R.id.content);
|
||||
contentTextView.setText(content);
|
||||
}
|
||||
dialog.findViewById(R.id.btn_cancel).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
dialog.dismiss();
|
||||
}
|
||||
});
|
||||
dialog.findViewById(R.id.btn_confirm).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
simpleCallback.onConfirmClick(dialog, "");
|
||||
dialog.dismiss();
|
||||
}
|
||||
});
|
||||
dialog.show();
|
||||
}
|
||||
|
||||
|
||||
public static void showSimpleDialog(Context context, String content, SimpleCallback callback) {
|
||||
showSimpleDialog(context, content, false, callback);
|
||||
}
|
||||
@@ -135,13 +178,7 @@ public class DialogUitl {
|
||||
return;
|
||||
}
|
||||
}
|
||||
new Builder(context)
|
||||
.setTitle(title)
|
||||
.setContent(content)
|
||||
.setCancelable(cancelable)
|
||||
.setClickCallback(callback)
|
||||
.build()
|
||||
.show();
|
||||
new Builder(context).setTitle(title).setContent(content).setCancelable(cancelable).setClickCallback(callback).build().show();
|
||||
}
|
||||
|
||||
public static void showSimpleDialog(Context context, String title, String content, boolean cancelable, SimpleCallback3 callback) {
|
||||
@@ -150,13 +187,7 @@ public class DialogUitl {
|
||||
return;
|
||||
}
|
||||
}
|
||||
new Builder(context)
|
||||
.setTitle(title)
|
||||
.setContent(content)
|
||||
.setCancelable(cancelable)
|
||||
.setClickCallback3(callback)
|
||||
.build()
|
||||
.show();
|
||||
new Builder(context).setTitle(title).setContent(content).setCancelable(cancelable).setClickCallback3(callback).build().show();
|
||||
}
|
||||
|
||||
public static void showSimpleInputDialog(Context context, String title, String hint, int inputType, int length, SimpleCallback callback) {
|
||||
@@ -165,15 +196,7 @@ public class DialogUitl {
|
||||
return;
|
||||
}
|
||||
}
|
||||
new Builder(context).setTitle(title)
|
||||
.setCancelable(true)
|
||||
.setInput(true)
|
||||
.setHint(hint)
|
||||
.setInputType(inputType)
|
||||
.setLength(length)
|
||||
.setClickCallback(callback)
|
||||
.build()
|
||||
.show();
|
||||
new Builder(context).setTitle(title).setCancelable(true).setInput(true).setHint(hint).setInputType(inputType).setLength(length).setClickCallback(callback).build().show();
|
||||
}
|
||||
|
||||
|
||||
@@ -338,6 +361,7 @@ public class DialogUitl {
|
||||
private String mHint;
|
||||
private int mInputType;
|
||||
private int mLength;
|
||||
boolean isShowContent = true;
|
||||
private SimpleCallback mClickCallback;
|
||||
private SimpleCallback3 mClickCallback3;
|
||||
private SimpleCallbackView mSimpleCallbackView;
|
||||
@@ -380,6 +404,11 @@ public class DialogUitl {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder isShowContent(boolean isShow) {
|
||||
isShowContent = isShow;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setCancelable(boolean cancelable) {
|
||||
mCancelable = cancelable;
|
||||
return this;
|
||||
@@ -458,6 +487,9 @@ public class DialogUitl {
|
||||
if (mLength > 0 && content instanceof EditText) {
|
||||
content.setFilters(new InputFilter[]{new InputFilter.LengthFilter(mLength)});
|
||||
}
|
||||
if (!isShowContent) {
|
||||
content.setVisibility(View.GONE);
|
||||
}
|
||||
TextView btnConfirm = (TextView) dialog.findViewById(R.id.btn_confirm);
|
||||
if (!TextUtils.isEmpty(mConfirmString)) {
|
||||
btnConfirm.setText(mConfirmString);
|
||||
@@ -483,8 +515,8 @@ public class DialogUitl {
|
||||
mClickCallback3.onConfirmClick(dialog);
|
||||
}
|
||||
if (mSimpleCallbackView != null) {
|
||||
mSimpleCallbackView.onConfirmClick(dialog,titleView, content, btnConfirm, btnCancel);
|
||||
}else{
|
||||
mSimpleCallbackView.onConfirmClick(dialog, titleView, content, btnConfirm, btnCancel);
|
||||
} else {
|
||||
dialog.dismiss();
|
||||
}
|
||||
|
||||
@@ -501,8 +533,8 @@ public class DialogUitl {
|
||||
((SimpleCallback2) mClickCallback).onCancelClick();
|
||||
}
|
||||
if (mSimpleCallbackView != null) {
|
||||
mSimpleCallbackView.onCancel(dialog,titleView, content, btnConfirm, btnCancel);
|
||||
}else{
|
||||
mSimpleCallbackView.onCancel(dialog, titleView, content, btnConfirm, btnCancel);
|
||||
} else {
|
||||
dialog.dismiss();
|
||||
}
|
||||
}
|
||||
@@ -510,17 +542,17 @@ public class DialogUitl {
|
||||
}
|
||||
}
|
||||
};
|
||||
if(btnConfirm!=null) {
|
||||
if (btnConfirm != null) {
|
||||
btnConfirm.setOnClickListener(listener);
|
||||
}
|
||||
if(btnCancel!=null) {
|
||||
if (btnCancel != null) {
|
||||
btnCancel.setOnClickListener(listener);
|
||||
}
|
||||
dialog.setOnShowListener(new DialogInterface.OnShowListener() {
|
||||
@Override
|
||||
public void onShow(DialogInterface dialogInterface) {
|
||||
if (mSimpleCallbackView != null) {
|
||||
mSimpleCallbackView.onShow(dialog,titleView, content, btnConfirm, btnCancel);
|
||||
mSimpleCallbackView.onShow(dialog, titleView, content, btnConfirm, btnCancel);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -563,8 +595,7 @@ public class DialogUitl {
|
||||
/**
|
||||
* 城市选择
|
||||
*/
|
||||
public static void showCityChooseDialog(Activity activity, ArrayList<Province> list,
|
||||
String province, String city, String district, AddressPicker.OnAddressPickListener listener) {
|
||||
public static void showCityChooseDialog(Activity activity, ArrayList<Province> list, String province, String city, String district, AddressPicker.OnAddressPickListener listener) {
|
||||
AddressPicker picker = new AddressPicker(activity, list);
|
||||
picker.setTextColor(0xff323232);
|
||||
picker.setDividerColor(0xffdcdcdc);
|
||||
|
||||
@@ -11,6 +11,7 @@ import com.yunbao.common.R;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.util.Arrays;
|
||||
import java.util.Timer;
|
||||
import java.util.TimerTask;
|
||||
|
||||
@@ -44,7 +45,7 @@ public class GoogleUtils {
|
||||
|
||||
|
||||
public boolean getGoogleService() {
|
||||
boolean flag;
|
||||
boolean flag = false;
|
||||
try {
|
||||
Class<?> clz = mActivity.getClassLoader().loadClass("com.shayu.lib_google.utils.GoogleBillingManage");
|
||||
googlePay = clz.getConstructor(Activity.class).newInstance(mActivity);
|
||||
@@ -227,6 +228,20 @@ public class GoogleUtils {
|
||||
}
|
||||
}
|
||||
|
||||
public void setFirebaseCrashData(String uid, String userData, String isGoogle, String cpu, String runTime, String enterRoom, String slidingRoom, String playSvga, String ActivitySize) {
|
||||
|
||||
try {
|
||||
Class<?> clz = mContext.getClassLoader().loadClass("com.shayu.lib_google.utils.FirebaseManage");
|
||||
googlePay= clz.getConstructor(Context.class).newInstance(mContext);
|
||||
googlePay.getClass()
|
||||
.getMethod("setFirebaseCrashData", String.class, String.class, String.class, String.class, String.class, String.class, String.class, String.class, String.class)
|
||||
.invoke(googlePay, uid, userData, isGoogle, cpu, runTime, enterRoom, slidingRoom, playSvga, ActivitySize);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void setQueryPurchaseListener(Activity activity, QueryPurchasesListener queryPurchasesListener) {
|
||||
Timer timer = new Timer();
|
||||
TimerTask task = new TimerTask() {
|
||||
|
||||
@@ -607,7 +607,7 @@ public class JavascriptInterfaceUtils {
|
||||
public void androidClickToTaskPage() {
|
||||
ARouter.getInstance().build(PATH_REWARD).withString("url",
|
||||
CommonAppConfig.HOST + "/index.php?g=Appapi&m=task&a=index" + "&uid=" + CommonAppConfig.getInstance().getUid()
|
||||
+ "&token=" + CommonAppConfig.getInstance().getToken() + "&tabIndex=1"+ "&isZh=" + (WordUtil.isNewZh() ? "1" : "0")).navigation();
|
||||
+ "&token=" + CommonAppConfig.getInstance().getToken() + "&tabIndex=1" + "&isZh=" + (WordUtil.isNewZh() ? "1" : "0")).navigation();
|
||||
}
|
||||
|
||||
@JavascriptInterface
|
||||
@@ -678,4 +678,14 @@ public class JavascriptInterfaceUtils {
|
||||
});
|
||||
}
|
||||
|
||||
@JavascriptInterface
|
||||
public void androidGotoCustomerService(String url) {
|
||||
ToastUtil.showDebug("网页跳客服页面");
|
||||
RouteUtil.forwardCustomerService(url);
|
||||
}
|
||||
|
||||
@JavascriptInterface
|
||||
public void androidtoCommunityVideo() {
|
||||
RouteUtil.forwardCommunityActivity();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.yunbao.common.utils;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
|
||||
@@ -30,6 +31,7 @@ public class RouteUtil {
|
||||
public static final String PATH_LIVEREPORT = "/live/LiveReportActivity";
|
||||
public static final String PATH_MYWEBVIEWACTIVTITY = "/main/MyWebViewActivity";
|
||||
public static final String PATH_ZHUANGBANACTIVITY = "/main/ZhuangBanActivity";
|
||||
public static final String PATH_COMPENSATE_ACTIVITY = "/live/CompensateActivity";
|
||||
public static final String PATH_LiveZHUANGBANACTIVITY = "/live/ZhuangBanActivity";
|
||||
public static final String PATH_FACEBOOKACTIVITY = "/baidu/FacebookLoginActivity";
|
||||
public static final String PATH_MAIN = "/main/MainActivity";
|
||||
@@ -47,7 +49,13 @@ public class RouteUtil {
|
||||
public static final String PATH_SELECT_AVATAR="/main/UserAvatarSelectActivity";
|
||||
public static final String PATH_BattlePassActivity="/main/BattlePassActivity";
|
||||
public static final String PATH_SudGameActivity="/live/SudGameActivity";
|
||||
public static final String PATH_COMMUNITY_Activity="/main/MainHomeCommunityActivity";
|
||||
|
||||
|
||||
public static void forwardCommunityActivity() {
|
||||
ARouter.getInstance().build(PATH_COMMUNITY_Activity)
|
||||
.navigation();
|
||||
}
|
||||
public static void forwardFansActivity(String uid) {
|
||||
ARouter.getInstance().build(PATH_FANSACTIVITY)
|
||||
.withString(Constants.TO_UID, uid)
|
||||
@@ -134,6 +142,23 @@ public class RouteUtil {
|
||||
.navigation();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 跳转到
|
||||
*/
|
||||
public static void forwardLiveCompensateActivity(Context context, String msgid, String banner, String title, String content, String time, String link, boolean receive) {
|
||||
ARouter.getInstance().build(PATH_COMPENSATE_ACTIVITY)
|
||||
.withString("msgid", msgid)
|
||||
.withString("banner", banner)
|
||||
.withString("title", title)
|
||||
.withString("content", content)
|
||||
.withString("time", time)
|
||||
.withString("link", link)
|
||||
.withBoolean("receive", receive)
|
||||
.navigation();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 跳转到装扮
|
||||
*/
|
||||
@@ -318,7 +343,7 @@ public class RouteUtil {
|
||||
/**
|
||||
* 系统头像选择
|
||||
*/
|
||||
public static void forwardUserAvatarSelect(){
|
||||
public static void forwardUserAvatarSelect() {
|
||||
ARouter.getInstance().build(PATH_SELECT_AVATAR)
|
||||
.navigation();
|
||||
}
|
||||
|
||||
@@ -33,10 +33,12 @@ public class SpUtil {
|
||||
public static final String BEAUTY_SDK_TYPE = "beautySdkType";
|
||||
public static final String TURNTABLE_ENABLE = "turntableEnable";
|
||||
public static final String BEAUTY_360_TIEZHI_URL = "beauty360TiezhiUrl";
|
||||
public static final String BEAUTY_360_TIEZHI_EXIST = "beauty360TiezhiExist";
|
||||
public static final String ANCHOR_PK_TIME = "anchorPkTime";
|
||||
public static final String BEAUTY_360_TIEZHI_EXIST = "beauty360TiezhiExist";
|
||||
public static final String ANCHOR_PK_TIME = "anchorPkTime";
|
||||
//播放短视频上下滑动引导页
|
||||
public static final String READ_VIDEO_GUIDE = "readVideoGuide";
|
||||
public static final String READ_VIDEO_GUIDE = "readVideoGuide";
|
||||
|
||||
public static final String MESSAGE_SYS_DEL = "FIRST_DEL";
|
||||
|
||||
|
||||
public SpUtil() {
|
||||
@@ -73,8 +75,8 @@ public class SpUtil {
|
||||
/**
|
||||
* 判断一个值是否存在
|
||||
*/
|
||||
public boolean isExists(String key){
|
||||
return mSharedPreferences.contains(key);
|
||||
public boolean isExists(String key) {
|
||||
return mSharedPreferences.contains(key);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -97,9 +97,13 @@ public class APKUpdateCustomPopup extends CenterPopupView {
|
||||
if (CommonAppConfig.IS_GOOGLE_PLAY == 2 && APKManager.get().getAPKGoogleIsUp() != 1) {
|
||||
dismiss();
|
||||
}
|
||||
if (CommonAppConfig.IS_GOOGLE_PLAY == 3 && APKManager.get().getAPKGoogleIsUp() != 1) {
|
||||
dismiss();
|
||||
}
|
||||
if (CommonAppConfig.IS_GOOGLE_PLAY == 0 && APKManager.get().getApkIsUp() != 1) {
|
||||
dismiss();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
package com.yunbao.common.views;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Paint;
|
||||
import android.text.TextUtils;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.ViewTreeObserver;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.yunbao.common.utils.StringUtil;
|
||||
|
||||
public class AutoSplitTextView extends androidx.appcompat.widget.AppCompatTextView {
|
||||
private boolean mEnabled = true;
|
||||
|
||||
public AutoSplitTextView(Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
public AutoSplitTextView(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
}
|
||||
|
||||
public AutoSplitTextView(Context context, AttributeSet attrs, int defStyle) {
|
||||
super(context, attrs, defStyle);
|
||||
}
|
||||
|
||||
public void setAutoSplitEnabled(boolean enabled) {
|
||||
mEnabled = enabled;
|
||||
}
|
||||
|
||||
/* @Override
|
||||
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
|
||||
if (MeasureSpec.getMode(widthMeasureSpec) == MeasureSpec.EXACTLY
|
||||
&& MeasureSpec.getMode(heightMeasureSpec) == MeasureSpec.EXACTLY
|
||||
&& getWidth() > 0
|
||||
&& getHeight() > 0
|
||||
&& mEnabled) {
|
||||
String newText = autoSplitText(this);
|
||||
if (!TextUtils.isEmpty(newText)) {
|
||||
setText(newText);
|
||||
}
|
||||
}
|
||||
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
|
||||
}*/
|
||||
public void setAutoText(CharSequence text) {
|
||||
this.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
|
||||
|
||||
@Override
|
||||
public void onGlobalLayout() {
|
||||
//String[] split = text.toString().split("\n");
|
||||
setText(text);
|
||||
setText(autoSplitText(AutoSplitTextView.this, text));
|
||||
/*setText("");
|
||||
boolean test=false;
|
||||
if(text.toString().startsWith("累計送出1000鑽石的礼物")){
|
||||
test=true;
|
||||
System.out.println("新字測試");
|
||||
}
|
||||
for (String s : split) {
|
||||
if(StringUtil.isEmpty(getText().toString())){
|
||||
setText(autoSplitText(AutoSplitTextView.this,s));
|
||||
}else{
|
||||
setText(getText() + "\n" + autoSplitText(AutoSplitTextView.this, s));
|
||||
if(test)
|
||||
System.out.println(getText());
|
||||
}
|
||||
}*/
|
||||
AutoSplitTextView.this.getViewTreeObserver().removeOnGlobalLayoutListener(this);
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
private String autoSplitText(final TextView textView, CharSequence text) {
|
||||
final String originalText = text.toString(); //原始文本
|
||||
final Paint tvPaint = textView.getPaint();//获取TextView的Paint
|
||||
final float tvWidth = textView.getWidth() - textView.getPaddingLeft() - textView.getPaddingRight(); //TextView的可用宽度
|
||||
//将原始文本按行拆分
|
||||
String[] originalTextLines = originalText.replaceAll("\r", "").split("\n");
|
||||
StringBuilder newTextBuilder = new StringBuilder();
|
||||
for (String originalTextLine : originalTextLines) {
|
||||
//文本内容小于TextView宽度,即不换行,不作处理
|
||||
if (tvPaint.measureText(originalTextLine) <= tvWidth) {
|
||||
newTextBuilder.append(originalTextLine);
|
||||
} else {
|
||||
//如果整行宽度超过控件可用宽度,则按字符测量,在超过可用宽度的前一个字符处手动换行
|
||||
float lineWidth = 0;
|
||||
for (int i = 0; i != originalTextLine.length(); ++i) {
|
||||
char charAt = originalTextLine.charAt(i);
|
||||
lineWidth += tvPaint.measureText(String.valueOf(charAt));
|
||||
if (lineWidth <= tvWidth) {
|
||||
newTextBuilder.append(charAt);
|
||||
} else {
|
||||
//单行超过TextView可用宽度,换行
|
||||
newTextBuilder.append("\n");
|
||||
lineWidth = 0;
|
||||
--i;//该代码作用是将本轮循环回滚,在新的一行重新循环判断该字符
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return newTextBuilder.toString();
|
||||
}
|
||||
}
|
||||
@@ -98,8 +98,10 @@ public class LiveSudGamePopup extends BottomPopupView {
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.exit), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
|
||||
gameViewModel.onDestroy();
|
||||
Bus.get().post(new LiveSudGamePopupShowOrHideEvent().setType(2));
|
||||
dismiss();
|
||||
}
|
||||
});
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.sud_history), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.yunbao.common.views;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.lxj.xpopup.core.AttachPopupView;
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.event.CustomDrawerPopupEvent;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
|
||||
public class MsgSysDelPopupView extends AttachPopupView {
|
||||
|
||||
ItemDelListener itemDelListener;
|
||||
|
||||
public MsgSysDelPopupView(@NonNull Context context, ItemDelListener itemDelListener) {
|
||||
super(context);
|
||||
this.itemDelListener = itemDelListener;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getImplLayoutId() {
|
||||
return R.layout.view_msg_sys_del;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate() {
|
||||
//特效设置
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.del), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
dismiss();
|
||||
itemDelListener.onItemDel();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public interface ItemDelListener {
|
||||
void onItemDel();
|
||||
}
|
||||
}
|
||||
@@ -32,18 +32,29 @@ public class SudGameChatViewHolder extends RecyclerView.ViewHolder {
|
||||
public void sudGameChat(SudGameChatImModel msgModel) {
|
||||
new LoadDian9TuUtilSud().loadDian9TuAssets(itemView.getContext(), mBg, 1);
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
String userName = msgModel.getNickname() + ":";
|
||||
buffer.append(userName)
|
||||
.append(" ")
|
||||
.append(msgModel.getTextMessage());
|
||||
|
||||
String msg = buffer.toString();
|
||||
|
||||
int unameIndexOf = msg.indexOf(userName);
|
||||
int unameSize = userName.length();
|
||||
SpannableStringBuilder builder = new SpannableStringBuilder();
|
||||
builder.append(msg);
|
||||
builder.setSpan(new ForegroundColorSpan(Color.parseColor("#FFBD0D")), unameIndexOf, unameIndexOf + unameSize, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
if (msgModel.isWelcomMessage()) {
|
||||
String userName = msgModel.getNickname();
|
||||
buffer.append(msgModel.getTextMessage());
|
||||
String msg = buffer.toString();
|
||||
int unameIndexOf = msg.indexOf(userName);
|
||||
int unameSize = userName.length();
|
||||
builder.append(msg);
|
||||
builder.setSpan(new ForegroundColorSpan(Color.parseColor("#FFBD0D")), unameIndexOf, unameIndexOf + unameSize, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
} else {
|
||||
|
||||
String userName = msgModel.getNickname() + ":";
|
||||
buffer.append(userName)
|
||||
.append(" ")
|
||||
.append(msgModel.getTextMessage());
|
||||
String msg = buffer.toString();
|
||||
|
||||
int unameIndexOf = msg.indexOf(userName);
|
||||
int unameSize = userName.length();
|
||||
|
||||
builder.append(msg);
|
||||
builder.setSpan(new ForegroundColorSpan(Color.parseColor("#FFBD0D")), unameIndexOf, unameIndexOf + unameSize, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
}
|
||||
chatMessage.setText(builder);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
package com.yunbao.common.views;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
@@ -19,11 +17,11 @@ import com.yunbao.common.bean.SudGameUserModel;
|
||||
import com.yunbao.common.dialog.SudGameSmallPopupPindow;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.utils.DeviceUtils;
|
||||
import com.yunbao.common.utils.DpUtil;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
|
||||
public class SudGameUserListViewHolder extends RecyclerView.ViewHolder {
|
||||
private ImageView vacancy_sud_game, mic_status;
|
||||
private ImageView vacancy_sud_game, mic_status, game_status;
|
||||
private FrameLayout user_layout;
|
||||
private RoundedImageView sud_game_user;
|
||||
private LinearLayout layout;
|
||||
@@ -35,6 +33,7 @@ public class SudGameUserListViewHolder extends RecyclerView.ViewHolder {
|
||||
user_layout = itemView.findViewById(R.id.user_layout);
|
||||
mic_status = itemView.findViewById(R.id.mic_status);
|
||||
layout = itemView.findViewById(R.id.layout);
|
||||
game_status = itemView.findViewById(R.id.game_status);
|
||||
}
|
||||
|
||||
public void upData(SudGameUserModel sudGameUserModel, SudGameUserListAdapter.SudGameSmallCallBack sudGameSmallCallBack, int position) {
|
||||
@@ -67,13 +66,19 @@ public class SudGameUserListViewHolder extends RecyclerView.ViewHolder {
|
||||
if (sudGameUserModel.isMute()) {
|
||||
ImgLoader.display2(itemView.getContext(), R.mipmap.icon_game_close_wheat_mute, mic_status);
|
||||
}
|
||||
if (sudGameUserModel.isGameIng()) {
|
||||
game_status.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
game_status.setVisibility(View.GONE);
|
||||
}
|
||||
ViewClicksAntiShake.clicksAntiShake(user_layout, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
XPopup.Builder builder = new XPopup.Builder(itemView.getContext()).atView(user_layout);
|
||||
XPopup.Builder builder = new XPopup.Builder(itemView.getContext()).atView(sud_game_user);
|
||||
builder.hasShadowBg(false)
|
||||
.isDestroyOnDismiss(true)
|
||||
.isLightStatusBar(false)
|
||||
.maxHeight(DpUtil.dp2px(70))
|
||||
.popupPosition(PopupPosition.Bottom)
|
||||
.asCustom(new SudGameSmallPopupPindow(itemView.getContext(),
|
||||
sudGameUserModel,
|
||||
|
||||
@@ -1,9 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- <item>
|
||||
<bitmap
|
||||
android:gravity="fill_vertical|fill_horizontal"
|
||||
android:src="@drawable/background_order_dialog_out_layout" />
|
||||
</item>-->
|
||||
<item>
|
||||
<bitmap
|
||||
android:gravity="fill_vertical|fill_horizontal"
|
||||
android:src="@drawable/background_order_dialog_out_layout" />
|
||||
<shape>
|
||||
<stroke
|
||||
android:width="10dp"
|
||||
android:color="#CCBEF3" />
|
||||
<corners android:radius="10dp" />
|
||||
</shape>
|
||||
</item>
|
||||
<item
|
||||
android:bottom="3dp"
|
||||
@@ -11,12 +19,15 @@
|
||||
android:right="4dp"
|
||||
android:top="4dp">
|
||||
<shape>
|
||||
|
||||
<solid android:color="#F5F5FF" />
|
||||
|
||||
<corners android:radius="10dp" />
|
||||
|
||||
<stroke
|
||||
android:width="3dp"
|
||||
android:color="#657FE4" />
|
||||
|
||||
</shape>
|
||||
</item>
|
||||
</layer-list>
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<corners android:radius="90dp" />
|
||||
<gradient
|
||||
android:endColor="#4B4B4B"
|
||||
android:startColor="#4B4B4B" />
|
||||
</shape>
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<corners android:radius="19dp" />
|
||||
<corners android:radius="360dp" />
|
||||
<solid android:color="#B3414141" />
|
||||
</shape>
|
||||
5
common/src/main/res/drawable/bg_sys_svga.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<corners android:radius="6dp" />
|
||||
<solid android:color="#E0E1E6" />
|
||||
</shape>
|
||||
@@ -21,22 +21,22 @@
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginStart="23dp"
|
||||
android:layout_marginTop="25dp"
|
||||
android:layout_marginTop="48dp"
|
||||
android:background="@drawable/bg_live_sud_game_top_new"
|
||||
android:gravity="center">
|
||||
android:gravity="start|center_vertical">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:layout_marginStart="10dp"
|
||||
android:gravity="start"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/room_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
@@ -69,34 +69,34 @@
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end"
|
||||
android:layout_marginTop="29dp"
|
||||
android:layout_marginTop="49dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/sud_history"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginEnd="14dp"
|
||||
android:src="@mipmap/icon_sud_history_live_new" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/exit"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:background="@drawable/bg_live_sud_game_back_new"
|
||||
android:gravity="center"
|
||||
android:text="@string/video_exit"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="8sp" />
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="137dp"
|
||||
android:layout_width="34dp"
|
||||
android:layout_height="34dp"
|
||||
android:layout_gravity="bottom"
|
||||
android:layout_marginStart="12dp"
|
||||
@@ -106,10 +106,8 @@
|
||||
android:id="@+id/game_review_input"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/bg_live_sud_game_bottom_input"
|
||||
android:background="@mipmap/icon_game_review_input"
|
||||
android:gravity="center"
|
||||
android:text="@string/game_review_input"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp" />
|
||||
|
||||
</LinearLayout>
|
||||
@@ -148,14 +146,15 @@
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginTop="80dp"
|
||||
android:gravity="center">
|
||||
android:layout_height="70dp"
|
||||
android:layout_marginTop="98dp">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/user_list"
|
||||
android:layout_marginStart="11dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="50dp" />
|
||||
android:layout_height="match_parent" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
55
common/src/main/res/layout/dialog_del_sys_msg.xml
Normal file
@@ -0,0 +1,55 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="280dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_dialog"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/content"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="50dp"
|
||||
android:layout_marginBottom="50dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:padding="20dp"
|
||||
android:text="@string/dialog_tip"
|
||||
android:textColor="@color/textColor"
|
||||
android:textSize="15sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginBottom="30dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/btn_cancel"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="35dp"
|
||||
android:background="@mipmap/icon_del_sys_confirm"
|
||||
android:gravity="center"
|
||||
android:paddingBottom="2dp"
|
||||
android:text="@string/sys_msg_cancel"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/btn_confirm"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="35dp"
|
||||
android:layout_marginLeft="30dp"
|
||||
android:background="@mipmap/icon_del_sys_cancel"
|
||||
android:gravity="center"
|
||||
android:paddingBottom="2dp"
|
||||
android:text="@string/confirm"
|
||||
android:textColor="@color/yellow_ff6c00"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -32,21 +32,21 @@
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginEnd="14dp"
|
||||
android:src="@mipmap/icon_sud_history_live" />
|
||||
android:src="@mipmap/icon_sud_history_live_new" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/min_game"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:src="@mipmap/icon_min_game"
|
||||
android:src="@mipmap/icon_min_game_new"
|
||||
android:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/exit"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:background="@drawable/bg_live_sud_game_back"
|
||||
android:background="@drawable/bg_live_sud_game_back_new2"
|
||||
android:gravity="center"
|
||||
android:text="@string/video_exit"
|
||||
android:textColor="#FFFFFF"
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<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="290dp"
|
||||
android:layout_height="200dp"
|
||||
android:layout_width="250dp"
|
||||
android:layout_height="150dp"
|
||||
app:cardCornerRadius="18dp"
|
||||
app:cardElevation="16dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="270dp"
|
||||
android:layout_height="180dp"
|
||||
android:layout_width="250dp"
|
||||
android:layout_height="150dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical">
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<TextView
|
||||
android:id="@+id/contest"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="90dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:gravity="center"
|
||||
@@ -40,8 +40,8 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/live_open_cancel"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_width="110dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:background="@drawable/backgroud_live_open_lfet"
|
||||
android:gravity="center"
|
||||
@@ -58,8 +58,8 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/live_open_ok"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_width="110dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:background="@drawable/backgroud_live_open_right"
|
||||
android:gravity="center"
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="88dp"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginTop="14dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:background="@mipmap/background_home_sud_game_list"
|
||||
android:orientation="horizontal">
|
||||
@@ -48,11 +48,12 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/room_name"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:textStyle="bold"
|
||||
android:text="@string/interactive_game_create_room_name"
|
||||
android:textColor="#000"
|
||||
android:textSize="14sp" />
|
||||
@@ -76,14 +77,14 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/player_we_are_2"
|
||||
android:layout_width="70dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="3dp"
|
||||
android:layout_marginBottom="3dp"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:text="@string/interactive_game_player_we_are_2"
|
||||
android:textColor="#000"
|
||||
android:textColor="#B3000000"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<LinearLayout
|
||||
@@ -162,6 +163,7 @@
|
||||
android:layout_width="68dp"
|
||||
android:layout_height="26dp"
|
||||
android:layout_gravity="end"
|
||||
android:layout_marginTop="2dp"
|
||||
android:background="@drawable/bg_home_sud_list_sill"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
android:text="@string/upgrade_elite_type1"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="#F36100"
|
||||
android:textSize="14sp" />
|
||||
android:textSize="12sp" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/button_enjoy"
|
||||
@@ -75,7 +75,7 @@
|
||||
android:text="@string/upgrade_elite_type2"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="#F36100"
|
||||
android:textSize="14sp" />
|
||||
android:textSize="12sp" />
|
||||
</FrameLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
18
common/src/main/res/layout/view_msg_sys_del.xml
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<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="50dp"
|
||||
android:layout_height="25dp"
|
||||
app:cardBackgroundColor="#0F0B14"
|
||||
app:cardCornerRadius="4dp"
|
||||
app:cardElevation="16dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/del"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="@string/delete"
|
||||
android:textColor="#FF9A9A9A"
|
||||
android:textSize="12sp" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
@@ -15,6 +15,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="9dp"
|
||||
android:paddingBottom="2dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:gravity="center_vertical"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="110dp"
|
||||
android:layout_height="70dp"
|
||||
android:background="@mipmap/backgroud_sud_game_small_window"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/layout"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/layout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical"
|
||||
@@ -9,8 +9,8 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/vacancy_sud_game"
|
||||
android:layout_width="34dp"
|
||||
android:layout_height="34dp"
|
||||
android:layout_width="45dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_marginStart="12dp"
|
||||
android:src="@mipmap/icon_vacancy_sud_game"
|
||||
android:visibility="visible" />
|
||||
@@ -18,14 +18,14 @@
|
||||
<FrameLayout
|
||||
android:id="@+id/user_layout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="50dp"
|
||||
android:layout_height="60dp"
|
||||
android:visibility="visible">
|
||||
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/sud_game_user"
|
||||
android:layout_width="34dp"
|
||||
android:layout_height="34dp"
|
||||
android:layout_width="45dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginStart="12dp"
|
||||
android:scaleType="centerCrop"
|
||||
@@ -39,5 +39,14 @@
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:src="@mipmap/icon_game_close_wheat_mute" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/game_status"
|
||||
android:layout_width="18dp"
|
||||
android:layout_height="14dp"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_gravity="bottom|center_horizontal"
|
||||
|
||||
android:src="@mipmap/icon_game_status" />
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
@@ -32,10 +32,12 @@
|
||||
android:layout_marginTop="19dp">
|
||||
<ImageView
|
||||
android:id="@+id/exchange_particulars"
|
||||
android:layout_width="99dp"
|
||||
android:layout_height="99dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@mipmap/ic_integral"
|
||||
android:layout_margin="12dp"
|
||||
android:layout_gravity="center"
|
||||
android:scaleType="centerCrop"
|
||||
android:scaleType="fitCenter"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
BIN
common/src/main/res/mipmap-mdpi/icon_del_sys_cancel.png
Normal file
|
After Width: | Height: | Size: 31 KiB |
BIN
common/src/main/res/mipmap-mdpi/icon_del_sys_confirm.png
Normal file
|
After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 6.7 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/icon_game_review_input.png
Normal file
|
After Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 6.4 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/icon_game_status.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/icon_min_game_new.png
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
@@ -628,7 +628,7 @@
|
||||
<string name="accept">accept</string>
|
||||
<string name="all">whole</string>
|
||||
<string name="alumb">Album</string>
|
||||
<string name="cancel">cancel</string>
|
||||
<string name="cancel">Cancel</string>
|
||||
<string name="camera">camera</string>
|
||||
<string name="pic_choose_look">Picture selection/Preview</string>
|
||||
<string name="preview">Preview</string>
|
||||
@@ -1426,8 +1426,28 @@ Limited ride And limited avatar frame</string>
|
||||
<string name="battlepass_exchange_buy_max">The quantity of goods exchanged has reached the upper limit</string>
|
||||
<string name="battlepass_zl_get">Successfully opened</string>
|
||||
<string name="battlepass_buy_max">You have purchased the BattlePass</string>
|
||||
|
||||
<string name="msg_del_sys01">The items inside have not been claimed yet.Are you sure to delete the message?</string>
|
||||
<string name="msg_del_sys02">Are you sure to delete the message?</string>
|
||||
|
||||
<string name="receive_success">Successfully claimed</string>
|
||||
<string name="receive1">Receive</string>
|
||||
<string name="receive2">Received</string>
|
||||
|
||||
<string name="del_suc">Delete successful</string>
|
||||
|
||||
<string name="sys_msg_year">-</string>
|
||||
<string name="sys_msg_month">-</string>
|
||||
<string name="sys_msg_day"></string>
|
||||
|
||||
<string name="main_suspension_war_order">BattlePass</string>
|
||||
<string name="game_review_input">Comment</string>
|
||||
<string name="game_review_view_information">Information</string>
|
||||
<string name="game_review_view_unmute">Unmute</string>
|
||||
<string name="game_review_view_sound_off">Mute</string>
|
||||
|
||||
<string name="sys_msg_cancel">Cancel</string>
|
||||
<string name="community_back">Are you sure to return?</string>
|
||||
|
||||
<string name="back_community_sure">Sure</string>
|
||||
</resources>
|
||||
|
||||
@@ -1388,6 +1388,10 @@
|
||||
<string name="conversion_quantity_need">余额 %s</string>
|
||||
<string name="conversion_quantity_need_of_use">兌換&使用規則:</string>
|
||||
|
||||
|
||||
<string name="msg_del_sys01">內含物品還未領取,是否確定刪除消息?</string>
|
||||
<string name="msg_del_sys02">是否確定刪除消息?</string>
|
||||
|
||||
<string name="pay_cancel">支付取消</string>
|
||||
<string name="pay_suc">支付成功</string>
|
||||
<string name="pay_fail">支付失敗</string>
|
||||
@@ -1427,4 +1431,22 @@
|
||||
<string name="game_review_view_information">查看信息</string>
|
||||
<string name="game_review_view_unmute">取消靜音</string>
|
||||
<string name="game_review_view_sound_off">靜音</string>
|
||||
|
||||
<string name="receive_success">領取成功</string>
|
||||
<string name="receive1">領取</string>
|
||||
<string name="receive2">已領取</string>
|
||||
|
||||
<string name="del_suc">刪除成功</string>
|
||||
|
||||
<string name="sys_msg_year">年</string>
|
||||
<string name="sys_msg_month">月</string>
|
||||
<string name="sys_msg_day">日</string>
|
||||
|
||||
<string name="main_suspension_war_order">直播通行證</string>
|
||||
|
||||
<string name="sys_msg_cancel">取消</string>
|
||||
|
||||
<string name="community_back">是否確認返回?</string>
|
||||
|
||||
<string name="back_community_sure">確定</string>
|
||||
</resources>
|
||||
|
||||
@@ -1387,6 +1387,10 @@
|
||||
<string name="conversion_quantity_need">余额 %s</string>
|
||||
<string name="conversion_quantity_need_of_use">兌換&使用規則:</string>
|
||||
|
||||
|
||||
<string name="msg_del_sys01">內含物品還未領取,是否確定刪除消息?</string>
|
||||
<string name="msg_del_sys02">是否確定刪除消息?</string>
|
||||
|
||||
<string name="pay_cancel">支付取消</string>
|
||||
<string name="pay_suc">支付成功</string>
|
||||
<string name="pay_fail">支付失敗</string>
|
||||
@@ -1426,4 +1430,23 @@
|
||||
<string name="game_review_view_information">查看信息</string>
|
||||
<string name="game_review_view_unmute">取消靜音</string>
|
||||
<string name="game_review_view_sound_off">靜音</string>
|
||||
|
||||
<string name="receive_success">領取成功</string>
|
||||
<string name="receive1">領取</string>
|
||||
<string name="receive2">已領取</string>
|
||||
|
||||
<string name="del_suc">刪除成功</string>
|
||||
|
||||
<string name="sys_msg_year">年</string>
|
||||
<string name="sys_msg_month">月</string>
|
||||
<string name="sys_msg_day">日</string>
|
||||
|
||||
<string name="main_suspension_war_order">直播通行證</string>
|
||||
|
||||
<string name="sys_msg_cancel">取消</string>
|
||||
|
||||
<string name="community_back">是否確認返回?</string>
|
||||
|
||||
<string name="back_community_sure">確定</string>
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -1425,4 +1425,25 @@
|
||||
<string name="game_review_view_information">查看信息</string>
|
||||
<string name="game_review_view_unmute">取消靜音</string>
|
||||
<string name="game_review_view_sound_off">靜音</string>
|
||||
<string name="msg_del_sys01">內含物品還未領取,是否確定刪除消息?</string>
|
||||
<string name="msg_del_sys02">是否確定刪除消息?</string>
|
||||
|
||||
<string name="receive_success">領取成功</string>
|
||||
<string name="receive1">领取</string>
|
||||
<string name="receive2">已領取</string>
|
||||
|
||||
<string name="del_suc">刪除成功</string>
|
||||
|
||||
<string name="sys_msg_year">年</string>
|
||||
<string name="sys_msg_month">月</string>
|
||||
<string name="sys_msg_day">日</string>
|
||||
|
||||
<string name="main_suspension_war_order">直播通行證</string>
|
||||
|
||||
<string name="sys_msg_cancel">取消</string>
|
||||
|
||||
<string name="community_back">是否確認返回?</string>
|
||||
|
||||
<string name="back_community_sure">確定</string>
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -82,4 +82,6 @@
|
||||
|
||||
<color name="gray_f6f7fb">#F6F7FB</color>
|
||||
<color name="gray_f6f6f6f6">#FFF6F6F6</color>
|
||||
|
||||
<color name="gray_F4F4F4">#F4F4F4</color>
|
||||
</resources>
|
||||
|
||||
@@ -1397,6 +1397,10 @@ Limited ride And limited avatar frame</string>
|
||||
<string name="conversion_quantity_need_of_use2">2.One ticket can be used to watch one episode of a short drama. After successful redemption, you can return to the viewing page and use the ticket to continue watching the movie;</string>
|
||||
<string name="conversion_quantity_need_of_use3">3.Ticket prohibit illegal activities such as offline trading and acquisitions, and PDLIVE will crack down severely on various profit-making trading activities.</string>
|
||||
|
||||
<string name="msg_del_sys01">The items inside have not been claimed yet.Are you sure to delete the message?</string>
|
||||
<string name="msg_del_sys02">Are you sure to delete the message?</string>
|
||||
|
||||
|
||||
<string name="pay_cancel">Payment cancellation</string>
|
||||
<string name="pay_suc">Payment successful</string>
|
||||
<string name="pay_fail">Payment failed</string>
|
||||
@@ -1432,4 +1436,23 @@ Limited ride And limited avatar frame</string>
|
||||
<string name="game_review_view_information">Information</string>
|
||||
<string name="game_review_view_unmute">Unmute</string>
|
||||
<string name="game_review_view_sound_off">Mute</string>
|
||||
|
||||
<string name="receive_success">Successfully claimed</string>
|
||||
<string name="receive1">Receive</string>
|
||||
<string name="receive2">Received</string>
|
||||
|
||||
<string name="del_suc">Delete successful</string>
|
||||
|
||||
<string name="sys_msg_year">-</string>
|
||||
<string name="sys_msg_month">-</string>
|
||||
<string name="sys_msg_day"></string>
|
||||
|
||||
<string name="main_suspension_war_order">BattlePass</string>
|
||||
|
||||
<string name="sys_msg_cancel">Cancel</string>
|
||||
|
||||
<string name="community_back">Are you sure to return?</string>
|
||||
|
||||
<string name="back_community_sure">Sure</string>
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -4,14 +4,14 @@ ext {
|
||||
buildToolsVersion: "29.0.2",
|
||||
minSdkVersion : 21,
|
||||
targetSdkVersion : 33,
|
||||
versionCode : 460,
|
||||
versionName : "6.6.3"
|
||||
versionCode : 464,
|
||||
versionName : "6.6.5"
|
||||
]
|
||||
manifestPlaceholders = [
|
||||
//正式、
|
||||
// serverHost : "https://napi.yaoulive.com",
|
||||
serverHost : "https://napi.yaoulive.com",
|
||||
// 测试
|
||||
serverHost : " https://ceshi.yaoulive.com",
|
||||
//serverHost : "https://ceshi.yaoulive.com",
|
||||
|
||||
//百度语音识别
|
||||
|
||||
@@ -20,7 +20,7 @@ ext {
|
||||
|
||||
baiduAppSecretKey: "nEVSgmuGpU0pjPr6VleEGGAl0hzGW52S",
|
||||
|
||||
// true表示谷歌支付 false 0 链接包 1 谷歌包 2华为包
|
||||
// true表示谷歌支付 false 0 链接包 1 谷歌包 2华为包 3 samsung包
|
||||
isGooglePlay : 0,
|
||||
//是否上报异常日志
|
||||
isUploadLog : true,
|
||||
|
||||
@@ -35,4 +35,11 @@ dependencies {
|
||||
api 'com.google.android.gms:play-services-ads-identifier:15.0.1'
|
||||
api 'com.google.firebase:firebase-messaging:23.0.6'
|
||||
api 'cn.rongcloud.sdk:sight:5.2.5.4'
|
||||
|
||||
implementation platform('com.google.firebase:firebase-bom:30.5.0')
|
||||
implementation 'com.google.firebase:firebase-crashlytics'
|
||||
|
||||
//implementation platform('com.google.firebase:firebase-bom:30.5.0')
|
||||
//implementation 'com.google.firebase:firebase-crashlytics'
|
||||
|
||||
}
|
||||
@@ -2,13 +2,16 @@ package com.shayu.lib_google.utils;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.os.Build;
|
||||
import android.util.Log;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.google.android.gms.tasks.OnCompleteListener;
|
||||
import com.google.android.gms.tasks.Task;
|
||||
import com.google.firebase.FirebaseApp;
|
||||
import com.google.firebase.crashlytics.FirebaseCrashlytics;
|
||||
import com.google.firebase.messaging.FirebaseMessaging;
|
||||
|
||||
import io.rong.push.PushManager;
|
||||
@@ -53,4 +56,27 @@ public class FirebaseManage {
|
||||
public void initializeApp() {
|
||||
FirebaseApp.initializeApp(mContext);
|
||||
}
|
||||
|
||||
public void setFirebaseCrashData(String uid, String userData, String isGoogle, String cpu, String runTime, String enterRoom, String slidingRoom, String playSvga, String ActivitySize) {
|
||||
|
||||
FirebaseCrashlytics.getInstance().setUserId(uid);
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.GINGERBREAD) {
|
||||
if (uid != null && !uid.isEmpty()) {
|
||||
FirebaseCrashlytics.getInstance().setCustomKey("uid", uid);
|
||||
} else {
|
||||
FirebaseCrashlytics.getInstance().setCustomKey("uid", "uid is null");
|
||||
}
|
||||
}
|
||||
FirebaseCrashlytics.getInstance().setCustomKey("userData", userData);
|
||||
FirebaseCrashlytics.getInstance().setCustomKey("isGoogle", isGoogle);
|
||||
FirebaseCrashlytics.getInstance().setCustomKey("PhoneName", Build.BRAND);
|
||||
FirebaseCrashlytics.getInstance().setCustomKey("Phone", Build.MODEL);
|
||||
FirebaseCrashlytics.getInstance().setCustomKey("CPU", cpu);
|
||||
FirebaseCrashlytics.getInstance().setCustomKey("RunTime", (System.currentTimeMillis() - Long.parseLong(runTime)));
|
||||
FirebaseCrashlytics.getInstance().setCustomKey("enterRoom", enterRoom);
|
||||
FirebaseCrashlytics.getInstance().setCustomKey("slidingRoom", slidingRoom);
|
||||
FirebaseCrashlytics.getInstance().setCustomKey("playSvga", playSvga);
|
||||
FirebaseCrashlytics.getInstance().setCustomKey("ActivitySize", ActivitySize);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -204,10 +204,6 @@ public class GoogleBillingManage implements PurchasesUpdatedListener {
|
||||
}
|
||||
}
|
||||
|
||||
public boolean getGoogleService() {
|
||||
int code = GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(mContext);
|
||||
return code == 0;
|
||||
}
|
||||
|
||||
int resultCode = -1;
|
||||
String resultToken = "";
|
||||
|
||||
@@ -120,6 +120,10 @@
|
||||
<activity
|
||||
android:name=".views.OlineListActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
|
||||
<activity
|
||||
android:name=".activity.CompensateActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
@@ -0,0 +1,157 @@
|
||||
package com.yunbao.live.activity;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.graphics.Outline;
|
||||
import android.text.format.DateUtils;
|
||||
import android.view.View;
|
||||
import android.view.ViewOutlineProvider;
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.blankj.utilcode.util.StringUtils;
|
||||
import com.ms.banner.Banner;
|
||||
import com.ms.banner.BannerConfig;
|
||||
import com.ms.banner.listener.OnBannerClickListener;
|
||||
import com.umeng.analytics.MobclickAgent;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.activity.AbsActivity;
|
||||
import com.yunbao.common.bean.IMLoginModel;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.utils.RouteUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.common.views.TopGradual;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.adapter.MsgSysGiftAdapter;
|
||||
import com.yunbao.live.bean.MsgSysGiftInfoBean;
|
||||
import com.yunbao.live.bean.SlideBean;
|
||||
import com.yunbao.live.bean.SystemMessageBean;
|
||||
import com.yunbao.live.http.ImHttpUtil;
|
||||
import com.yunbao.live.views.CustomMyViewHolder;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Route(path = RouteUtil.PATH_COMPENSATE_ACTIVITY)
|
||||
public class CompensateActivity extends AbsActivity {
|
||||
|
||||
TextView content;
|
||||
TextView time;
|
||||
RecyclerView recyclerView;
|
||||
MsgSysGiftAdapter msgSysGiftAdapter;
|
||||
String msgId, mBanner, mContent, link;
|
||||
Button submit;
|
||||
|
||||
ImageView imgContent;
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.activity_compensate;
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void refreshStatus(SystemMessageBean systemMessageBean) {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void main() {
|
||||
setTitle(getIntent().getStringExtra("title"));
|
||||
EventBus.getDefault().register(this);
|
||||
content = findViewById(R.id.content);
|
||||
submit = findViewById(R.id.submit);
|
||||
time = findViewById(R.id.time);
|
||||
imgContent = findViewById(R.id.img_content);
|
||||
|
||||
recyclerView = findViewById(R.id.hor_recycler);
|
||||
recyclerView.setLayoutManager(new LinearLayoutManager(mContext, LinearLayoutManager.HORIZONTAL, false));
|
||||
recyclerView.addItemDecoration(new TopGradual());
|
||||
|
||||
msgSysGiftAdapter = new MsgSysGiftAdapter(mContext);
|
||||
|
||||
recyclerView.setAdapter(msgSysGiftAdapter);
|
||||
|
||||
msgId = getIntent().getStringExtra("msgid");
|
||||
mBanner = getIntent().getStringExtra("banner");
|
||||
mContent = getIntent().getStringExtra("content");
|
||||
link = getIntent().getStringExtra("link");
|
||||
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy" + getString(R.string.sys_msg_year) + "MM" + getString(R.string.sys_msg_month) + "dd" + getString(R.string.sys_msg_day) + " HH:mm");
|
||||
Date currenTimeZone = new Date(Long.parseLong(getIntent().getStringExtra("time") + "000"));
|
||||
time.setText(sdf.format(currenTimeZone));
|
||||
|
||||
content.setText(mContent);
|
||||
if (!getIntent().getBooleanExtra("receive", false)) {
|
||||
submit.setBackground(mContext.getDrawable(R.mipmap.icon_sys_received));
|
||||
submit.setText(getString(R.string.receive2));
|
||||
submit.setTextColor(mContext.getResources().getColor(R.color.gray_F4F4F4));
|
||||
}
|
||||
submit.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
ImHttpUtil.receiveGift(msgId, new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if (code == 0) {
|
||||
SystemMessageBean systemMessageBean = new SystemMessageBean();
|
||||
systemMessageBean.setId(msgId);
|
||||
EventBus.getDefault().post(systemMessageBean);
|
||||
submit.setBackground(mContext.getDrawable(R.mipmap.icon_sys_received));
|
||||
submit.setText(getString(R.string.receive2));
|
||||
submit.setTextColor(mContext.getResources().getColor(R.color.gray_F4F4F4));
|
||||
ToastUtil.show(msg);
|
||||
} else {
|
||||
ToastUtil.show(msg);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
getMessageGiftInfo();
|
||||
|
||||
if (!StringUtils.isEmpty(mBanner)) {
|
||||
ImgLoader.display(mContext, mBanner, imgContent);
|
||||
findViewById(R.id.lt_advertisement).setVisibility(View.VISIBLE);
|
||||
|
||||
if (!StringUtils.isEmpty(link)) {
|
||||
IMLoginModel userInfo = IMLoginManager.get(mContext).getUserInfo();
|
||||
StringBuffer urlBuffer = new StringBuffer();
|
||||
urlBuffer.append(link).append("&uid=").append(userInfo.getId()).append("&token=").append(userInfo.getToken()).append("&isZh=").append(WordUtil.isNewZh() ? "1" : 0);
|
||||
|
||||
findViewById(R.id.lt_advertisement).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
mContext.startActivity(new Intent(mContext, ZhuangBanActivity.class).putExtra("url", urlBuffer.toString()));
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void getMessageGiftInfo() {
|
||||
ImHttpUtil.getMessageGiftInfo(msgId, new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
List<MsgSysGiftInfoBean> list = JSON.parseArray(Arrays.toString(info), MsgSysGiftInfoBean.class);
|
||||
msgSysGiftAdapter.setList(list);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -729,23 +729,38 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
|
||||
Log.e("ry", "pkUid = " + pkUid + ", pkhead = " + pkhead + ", pkname = " + pkname + ", isLadders = " + isLadders);
|
||||
if (mLiveRyLinkMicPkPresenter != null && mLiveRoomViewHolder != null) {
|
||||
mLiveRyLinkMicPkPresenter.onLinkMicPkStart(pkUid, 1);
|
||||
Handler handler = new Handler();
|
||||
handler.postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (mLiveRoomViewHolder != null) {
|
||||
Log.e("tasdsdg", mLiveUid + "1111" + CommonAppConfig.getInstance().getUid());
|
||||
if (!mLiveUid.equals(CommonAppConfig.getInstance().getUid())) {
|
||||
mLiveRoomViewHolder.setOtherInfo(pkUid, pkhead, pkname);
|
||||
mLiveRoomViewHolder.initPkRank(isLadders);
|
||||
}
|
||||
}
|
||||
}
|
||||
}, 4000);//3秒后执行Runnable中的run方法
|
||||
pr = new pkRunnable(pkUid, pkhead, pkname, isLadders);
|
||||
mHandler.postDelayed(pr, 4000);//3秒后执行Runnable中的run方法
|
||||
|
||||
}
|
||||
}
|
||||
public Handler mHandler = new Handler();
|
||||
public pkRunnable pr;
|
||||
|
||||
public class pkRunnable implements Runnable {
|
||||
private String pkUid;
|
||||
private String pkhead;
|
||||
private String pkname;
|
||||
private String isLadders;
|
||||
|
||||
public pkRunnable(String pkUid, String pkhead, String pkname, String isLadders) {
|
||||
this.pkUid = pkUid;
|
||||
this.pkhead = pkhead;
|
||||
this.pkname = pkname;
|
||||
this.isLadders = isLadders;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
if (mLiveRoomViewHolder != null) {
|
||||
Log.e("tasdsdg", mLiveUid + "1111" + CommonAppConfig.getInstance().getUid());
|
||||
if (!mLiveUid.equals(CommonAppConfig.getInstance().getUid())) {
|
||||
mLiveRoomViewHolder.setOtherInfo(pkUid, pkhead, pkname);
|
||||
mLiveRoomViewHolder.initPkRank(isLadders);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 主播与主播PK 所有人收到断开连麦pk的回调
|
||||
@@ -951,7 +966,7 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
|
||||
}
|
||||
String[] data = new String[]{obj.getString("barragetoken")};
|
||||
SocketRyChatUtil.sendDanmuMessage(mLiveUid, contents, obj.getIntValue("level_fans"));
|
||||
} else if (code==1001) {
|
||||
} else if (code == 1001) {
|
||||
DialogUitl.showSimpleDialog(mContext, msg, new DialogUitl.SimpleCallback2() {
|
||||
@Override
|
||||
public void onCancelClick() {
|
||||
@@ -1289,9 +1304,9 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
|
||||
//粉絲團粉絲團
|
||||
//不是粉絲
|
||||
if (LiveAudienceActivity.is_fans != null && LiveAudienceActivity.is_fans.equals("2")) {
|
||||
bundle.putString(Constants.URL, CommonAppConfig.HOST + "/h5/live/joinFansClub.html" + "?uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&anchorUid=" + uid+ "&isZh=" + (WordUtil.isNewZh() ? "1" : 0));
|
||||
bundle.putString(Constants.URL, CommonAppConfig.HOST + "/h5/live/joinFansClub.html" + "?uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&anchorUid=" + uid + "&isZh=" + (WordUtil.isNewZh() ? "1" : 0));
|
||||
} else {
|
||||
bundle.putString(Constants.URL, CommonAppConfig.HOST + "/h5/live/fansClub.html" + "?uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&anchorUid=" + uid+ "&isZh=" + (WordUtil.isNewZh() ? "1" : 0));
|
||||
bundle.putString(Constants.URL, CommonAppConfig.HOST + "/h5/live/fansClub.html" + "?uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&anchorUid=" + uid + "&isZh=" + (WordUtil.isNewZh() ? "1" : 0));
|
||||
}
|
||||
bundle.putString("liveUid", mLiveUid);
|
||||
bundle.putString("anchorName", mAncherName);
|
||||
@@ -1331,7 +1346,7 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
Log.e("LiveUserMoreDialog", error);
|
||||
ToastUtil.show(WordUtil.isNewZh()?"抱歉!出錯了!":"i \\'m sorry! An error occurred");
|
||||
ToastUtil.show(WordUtil.isNewZh() ? "抱歉!出錯了!" : "i \\'m sorry! An error occurred");
|
||||
}
|
||||
});
|
||||
} else {
|
||||
@@ -1470,7 +1485,7 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
|
||||
*/
|
||||
public void openLuckGiftTip() {
|
||||
UserBean u = CommonAppConfig.getInstance().getUserBean();
|
||||
String url = CommonAppConfig.HOST + "/h5/Noble/index.html?nickname=" + u.getUserNiceName() + "&usernobId=" + u.getNoble_id() + "&token=" + CommonAppConfig.getInstance().getToken() + "&uid=" + CommonAppConfig.getInstance().getUid() + "&anchorUid=" + mLiveUid + "&anchorName=" + mAncherName+ "&isZh=" + (WordUtil.isNewZh() ? "1" : "0");
|
||||
String url = CommonAppConfig.HOST + "/h5/Noble/index.html?nickname=" + u.getUserNiceName() + "&usernobId=" + u.getNoble_id() + "&token=" + CommonAppConfig.getInstance().getToken() + "&uid=" + CommonAppConfig.getInstance().getUid() + "&anchorUid=" + mLiveUid + "&anchorName=" + mAncherName + "&isZh=" + (WordUtil.isNewZh() ? "1" : "0");
|
||||
startActivity(new Intent(this, ZhuangBanActivity.class).putExtra("url", url).putExtra("title", ""));
|
||||
}
|
||||
|
||||
|
||||
@@ -392,7 +392,12 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
mStream = mLiveBean.getStream();
|
||||
mAncherName = mLiveBean.getUserNiceName();
|
||||
mAncherIcon = mLiveBean.getAvatar();
|
||||
if (pr != null) {
|
||||
mHandler.removeCallbacks(pr);
|
||||
pr = null;
|
||||
}
|
||||
manager.onAdd(mLiveBean, mLiveType, mLiveTypeVal, mLiveSDK);
|
||||
|
||||
//加载完页面后再后台静默下载礼物svga
|
||||
downloadAllGift();
|
||||
over();
|
||||
@@ -824,7 +829,7 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
if (manager != null && !StringUtil.isEmpty(is_fans)) {
|
||||
if (is_fans.equals("-2")) {
|
||||
manager.setAttention(0);
|
||||
if (mLiveRoomViewHolder!=null){
|
||||
if (mLiveRoomViewHolder != null) {
|
||||
mLiveRoomViewHolder.setFansGroup("0");
|
||||
}
|
||||
|
||||
@@ -860,6 +865,8 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
if (!TextUtils.isEmpty(event.getMethod())) {
|
||||
if (TextUtils.equals(event.getMethod(), "closeLiveRoom")) {
|
||||
onBackPressed();
|
||||
}else if (TextUtils.equals(event.getMethod(), "androidtoCommunityVideo")) {
|
||||
RouteUtil.forwardCommunityActivity();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1285,6 +1285,10 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
|
||||
*/
|
||||
public void linkDrMicAnchorApply(String pkUid, String stream) {
|
||||
linkDrMicAnchorApply(pkUid, stream, SOCKET_LIVE_DRPK);
|
||||
if (mLiveAnchorViewHolder != null) {
|
||||
mLiveAnchorViewHolder.setYaoqing(pkUid);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -27,6 +27,7 @@ import com.yunbao.common.bean.CreateSudRoomModel;
|
||||
import com.yunbao.common.bean.CustomSidebarChildModel;
|
||||
import com.yunbao.common.bean.CustomSidebarInfoModel;
|
||||
import com.yunbao.common.bean.HttpCallbackModel;
|
||||
import com.yunbao.common.bean.RoomMicStatusModel;
|
||||
import com.yunbao.common.bean.SudGameChatImModel;
|
||||
import com.yunbao.common.bean.SudGameUserModel;
|
||||
import com.yunbao.common.dialog.SudGameInputPopupWindow;
|
||||
@@ -83,6 +84,7 @@ public class SudGameActivity extends AbsActivity implements GameMicManager.Meeti
|
||||
private SudGameUserListAdapter sudGameUserListAdapter;
|
||||
private ProcessResultUtil mProcessResultUtil;
|
||||
private List<String> muteUser = new ArrayList<>();
|
||||
private boolean imOff;
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
@@ -118,36 +120,74 @@ public class SudGameActivity extends AbsActivity implements GameMicManager.Meeti
|
||||
|
||||
}
|
||||
});
|
||||
gameMicManager = new GameMicManager();
|
||||
gameMicManager.attachView(this);
|
||||
gameMicManager.config(this);
|
||||
gameMicManager.joinRoom(mLiveUid);
|
||||
|
||||
// 设置禁用麦克风采集
|
||||
RCRTCEngine.getInstance().getDefaultAudioStream().setMicrophoneDisable(disable);
|
||||
ImgLoader.display(mContext, R.mipmap.icon_game_close_wheat, gameCloseWheat);
|
||||
gameCloseWheat.setVisibility(View.INVISIBLE);
|
||||
|
||||
new Handler().postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (!mProcessResultUtil.checkPermissions(new String[]{Manifest.permission.RECORD_AUDIO})) {
|
||||
ToastUtil.show("拒绝权限将无法使用上麦功能");
|
||||
mProcessResultUtil.requestPermissions(new String[]{Manifest.permission.RECORD_AUDIO}, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}, 1500);
|
||||
mProcessResultUtil = new ProcessResultUtil(this);
|
||||
LiveNetManager.get(mContext)
|
||||
.getRoomMicStatus(new HttpCallback<RoomMicStatusModel>() {
|
||||
@Override
|
||||
public void onSuccess(RoomMicStatusModel data) {
|
||||
gameMicManager = new GameMicManager();
|
||||
gameMicManager.attachView(SudGameActivity.this);
|
||||
gameMicManager.config(SudGameActivity.this);
|
||||
//语音
|
||||
if (TextUtils.equals(data.getMicStatus(), "1")) {
|
||||
imOff = true;
|
||||
gameSeat.setVisibility(View.VISIBLE);
|
||||
userList.setVisibility(View.VISIBLE);
|
||||
new Handler().postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (!mProcessResultUtil.checkPermissions(new String[]{Manifest.permission.RECORD_AUDIO})) {
|
||||
ToastUtil.show("拒绝权限将无法使用上麦功能");
|
||||
mProcessResultUtil.requestPermissions(new String[]{Manifest.permission.RECORD_AUDIO}, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}, 1500);
|
||||
} else {
|
||||
imOff = false;
|
||||
gameSeat.setVisibility(View.GONE);
|
||||
userList.setVisibility(View.GONE);
|
||||
}
|
||||
if (TextUtils.equals(data.getImStatus(), "1")) {
|
||||
findViewById(R.id.game_review_input).setVisibility(View.VISIBLE);
|
||||
chatList.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
findViewById(R.id.game_review_input).setVisibility(View.GONE);
|
||||
chatList.setVisibility(View.GONE);
|
||||
}
|
||||
gameMicManager.joinRoom(mLiveUid, imOff);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
imOff = false;
|
||||
//文字
|
||||
findViewById(R.id.game_review_input).setVisibility(View.GONE);
|
||||
chatList.setVisibility(View.GONE);
|
||||
//语音
|
||||
gameCloseWheat.setVisibility(View.GONE);
|
||||
gameSeat.setVisibility(View.GONE);
|
||||
userList.setVisibility(View.GONE);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
|
||||
LiveNetManager.get(mContext)
|
||||
.leaveMic(mLiveUid, new HttpCallback<HttpCallbackModel>() {
|
||||
@Override
|
||||
@@ -160,9 +200,13 @@ public class SudGameActivity extends AbsActivity implements GameMicManager.Meeti
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
if (gameMicManager != null) {
|
||||
gameMicManager.leaveRoom();
|
||||
gameMicManager.detachView();
|
||||
}
|
||||
Bus.getOff(this);
|
||||
gameMicManager.leaveRoom();
|
||||
gameMicManager.detachView();
|
||||
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
@@ -253,31 +297,34 @@ public class SudGameActivity extends AbsActivity implements GameMicManager.Meeti
|
||||
.asCustom(new LiveSudGameHistoryPopup(mContext, customSidebarChildModels)).show();
|
||||
}
|
||||
});
|
||||
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.game_seat), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
if (mProcessResultUtil.checkPermissions(new String[]{Manifest.permission.RECORD_AUDIO})) {
|
||||
if (publishDefault) {
|
||||
disable = true;
|
||||
// 设置禁用麦克风采集
|
||||
RCRTCEngine.getInstance().getDefaultAudioStream().setMicrophoneDisable(disable);
|
||||
ImgLoader.display(mContext, R.mipmap.icon_game_close_wheat, gameCloseWheat);
|
||||
gameMicManager.unPublishStreams();
|
||||
} else {
|
||||
if (sudGameUserListAdapter.isMicMax()) {
|
||||
ToastUtil.show(WordUtil.isNewZh() ? "上麥人數最大7人" : "The maximum number of people on the microphone is 7");
|
||||
if (imOff && gameMicManager != null) {
|
||||
if (mProcessResultUtil.checkPermissions(new String[]{Manifest.permission.RECORD_AUDIO})) {
|
||||
if (publishDefault) {
|
||||
disable = true;
|
||||
// 设置禁用麦克风采集
|
||||
RCRTCEngine.getInstance().getDefaultAudioStream().setMicrophoneDisable(disable);
|
||||
// ImgLoader.display(mContext, R.mipmap.icon_game_close_wheat, gameCloseWheat);
|
||||
gameMicManager.unPublishStreams();
|
||||
} else {
|
||||
gameMicManager.publishDefaultAVStream();
|
||||
}
|
||||
if (sudGameUserListAdapter.isMicMax()) {
|
||||
ToastUtil.show(WordUtil.isNewZh() ? "上麥人數最大7人" : "The maximum number of people on the microphone is 7");
|
||||
} else {
|
||||
gameMicManager.publishDefaultAVStream();
|
||||
}
|
||||
|
||||
}
|
||||
} else {
|
||||
mProcessResultUtil.requestPermissions(new String[]{Manifest.permission.RECORD_AUDIO}, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
mProcessResultUtil.requestPermissions(new String[]{Manifest.permission.RECORD_AUDIO}, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -286,54 +333,55 @@ public class SudGameActivity extends AbsActivity implements GameMicManager.Meeti
|
||||
ViewClicksAntiShake.clicksAntiShake(gameCloseWheat, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
if (mProcessResultUtil.checkPermissions(new String[]{Manifest.permission.RECORD_AUDIO})) {
|
||||
if (disable) {
|
||||
disable = false;
|
||||
// 设置禁用麦克风采集
|
||||
RCRTCEngine.getInstance().getDefaultAudioStream().setMicrophoneDisable(disable);
|
||||
ImgLoader.display(mContext, R.mipmap.icon_game_open_wheat, gameCloseWheat);
|
||||
LiveNetManager.get(mContext)
|
||||
.onMic(mLiveUid, new HttpCallback<HttpCallbackModel>() {
|
||||
@Override
|
||||
public void onSuccess(HttpCallbackModel data) {
|
||||
if (imOff && gameMicManager != null) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
|
||||
}
|
||||
});
|
||||
ToastUtil.show(WordUtil.isNewZh() ? "麥克風已開啟" : "Microphone turned on");
|
||||
} else {
|
||||
disable = true;
|
||||
// 设置禁用麦克风采集
|
||||
RCRTCEngine.getInstance().getDefaultAudioStream().setMicrophoneDisable(disable);
|
||||
ImgLoader.display(mContext, R.mipmap.icon_game_close_wheat, gameCloseWheat);
|
||||
LiveNetManager.get(mContext)
|
||||
.offMic(mLiveUid, new HttpCallback<HttpCallbackModel>() {
|
||||
@Override
|
||||
public void onSuccess(HttpCallbackModel data) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
|
||||
}
|
||||
});
|
||||
ToastUtil.show(WordUtil.isNewZh() ? "麥克風已關閉" : "Microphone turned off");
|
||||
}
|
||||
|
||||
} else {
|
||||
mProcessResultUtil.requestPermissions(new String[]{Manifest.permission.RECORD_AUDIO}, new Runnable() {
|
||||
gameCloseWheat.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (disable) {
|
||||
disable = false;
|
||||
// 设置禁用麦克风采集
|
||||
RCRTCEngine.getInstance().getDefaultAudioStream().setMicrophoneDisable(disable);
|
||||
ImgLoader.display(mContext, R.mipmap.icon_game_open_wheat, gameCloseWheat);
|
||||
LiveNetManager.get(mContext)
|
||||
.onMic(mLiveUid, new HttpCallback<HttpCallbackModel>() {
|
||||
@Override
|
||||
public void onSuccess(HttpCallbackModel data) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
|
||||
}
|
||||
});
|
||||
ToastUtil.show(WordUtil.isNewZh() ? "麥克風已開啟" : "Microphone turned on");
|
||||
} else {
|
||||
disable = true;
|
||||
// 设置禁用麦克风采集
|
||||
RCRTCEngine.getInstance().getDefaultAudioStream().setMicrophoneDisable(disable);
|
||||
ImgLoader.display(mContext, R.mipmap.icon_game_close_wheat, gameCloseWheat);
|
||||
LiveNetManager.get(mContext)
|
||||
.offMic(mLiveUid, new HttpCallback<HttpCallbackModel>() {
|
||||
@Override
|
||||
public void onSuccess(HttpCallbackModel data) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
|
||||
}
|
||||
});
|
||||
ToastUtil.show(WordUtil.isNewZh() ? "麥克風已關閉" : "Microphone turned off");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.game_review_input), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@@ -406,7 +454,7 @@ public class SudGameActivity extends AbsActivity implements GameMicManager.Meeti
|
||||
LiveNetManager.get(mContext).checkRemainingBalance(mCreateSudRoomModel.getSudGameRoomId(), new HttpCallback<CheckRemainingBalance>() {
|
||||
@Override
|
||||
public void onSuccess(CheckRemainingBalance data) {
|
||||
if (TextUtils.equals(String.valueOf(data.getGoldenBeanRemainingBalance() ),"1")) {
|
||||
if (TextUtils.equals(String.valueOf(data.getGoldenBeanRemainingBalance()), "1")) {
|
||||
gameViewModel.sudFSTAPPDecorator.notifyAPPCommonSelfIn(true, event.getSeatIndex(), true, 1);
|
||||
} else {
|
||||
if (IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) {
|
||||
@@ -466,6 +514,7 @@ public class SudGameActivity extends AbsActivity implements GameMicManager.Meeti
|
||||
LiveNetManager.get(mContext).getRoomMicData(mLiveUid, new HttpCallback<List<SudGameUserModel>>() {
|
||||
@Override
|
||||
public void onSuccess(List<SudGameUserModel> data) {
|
||||
|
||||
gameMicManager.refreshStreams(data);
|
||||
sudGameUserListAdapter.refreshSudGameUserList(data, muteUser);
|
||||
}
|
||||
@@ -481,7 +530,7 @@ public class SudGameActivity extends AbsActivity implements GameMicManager.Meeti
|
||||
|
||||
@Override
|
||||
public void onJoinRoomFailed(RTCErrorCode rtcErrorCode) {
|
||||
ToastUtil.show("加入失败 "+rtcErrorCode.toString());
|
||||
ToastUtil.show("加入失败 " + rtcErrorCode.toString());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -10,9 +10,15 @@ import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.activity.AbsActivity;
|
||||
import com.yunbao.common.activity.SelectImageActivity;
|
||||
import com.yunbao.common.bean.ImageEntity;
|
||||
import com.yunbao.common.bean.UserBean;
|
||||
import com.yunbao.common.interfaces.CommonCallback;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.bean.SystemMessageBean;
|
||||
import com.yunbao.live.views.SystemMessageViewHolder;
|
||||
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
|
||||
@@ -32,11 +38,7 @@ public class SystemMessageActivity extends AbsActivity {
|
||||
public static String nowUid, nowTitle, mowHeadImg;
|
||||
|
||||
public static void forward(Context context, String type, String uid, String title, String headImg) {
|
||||
context.startActivity(new Intent(context, SystemMessageActivity.class)
|
||||
.putExtra("type", type)
|
||||
.putExtra("uid", uid)
|
||||
.putExtra("title", title)
|
||||
.putExtra("headImg", headImg));
|
||||
context.startActivity(new Intent(context, SystemMessageActivity.class).putExtra("type", type).putExtra("uid", uid).putExtra("title", title).putExtra("headImg", headImg));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -15,15 +15,17 @@ import com.yunbao.common.adapter.RefreshAdapter;
|
||||
import com.yunbao.common.bean.RandomPkUserBean;
|
||||
import com.yunbao.common.bean.SetAttentsModel;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.http.LiveHttpUtil;
|
||||
import com.yunbao.common.http.base.HttpCallback;
|
||||
import com.yunbao.common.http.live.LiveNetManager;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.activity.LiveRyAnchorActivity;
|
||||
import com.yunbao.common.http.LiveHttpUtil;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 单人PK/多人PK邀请的对话框适配器
|
||||
@@ -86,7 +88,7 @@ public class FreePkRecyclerAdapter extends RefreshAdapter<RandomPkUserBean> {
|
||||
}
|
||||
|
||||
public void setData(RandomPkUserBean bean, int position) {
|
||||
if (!WordUtil.isNewZh() && itemView.findViewById(R.id.text1)!=null) {
|
||||
if (!WordUtil.isNewZh() && itemView.findViewById(R.id.text1) != null) {
|
||||
((TextView) itemView.findViewById(R.id.text1)).setText("number");
|
||||
((TextView) itemView.findViewById(R.id.text2)).setText("user");
|
||||
((TextView) itemView.findViewById(R.id.text3)).setText("status");
|
||||
@@ -96,6 +98,7 @@ public class FreePkRecyclerAdapter extends RefreshAdapter<RandomPkUserBean> {
|
||||
}
|
||||
}
|
||||
|
||||
private Map<String, String> yaoqing = new HashMap<>();
|
||||
|
||||
public class ItemViewHolder extends HeadViewHolder {
|
||||
private TextView mNum;
|
||||
@@ -152,7 +155,15 @@ public class FreePkRecyclerAdapter extends RefreshAdapter<RandomPkUserBean> {
|
||||
}
|
||||
return;
|
||||
}
|
||||
((LiveRyAnchorActivity) mContext).linkDrMicAnchorApply(bean.getId(), bean.getId());
|
||||
yaoqing.put(bean.getId(), bean.getId());
|
||||
if (yaoqing.size() < 5) {
|
||||
((LiveRyAnchorActivity) mContext).linkDrMicAnchorApply(bean.getId(), bean.getId());
|
||||
} else {
|
||||
ToastUtil.show(WordUtil.isNewZh() ? "多人PK最大參與人數為4人" : "The maximum number of participants in a multiplayer PK is 4 people");
|
||||
}
|
||||
if (freePkRecyclerListener != null) {
|
||||
freePkRecyclerListener.onClose();
|
||||
}
|
||||
|
||||
} else {
|
||||
if (WordUtil.isNewZh()) {
|
||||
@@ -183,7 +194,7 @@ public class FreePkRecyclerAdapter extends RefreshAdapter<RandomPkUserBean> {
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
ToastUtil.show(WordUtil.isNewZh()?"抱歉!出錯了!":"i \\'m sorry! An error occurred");
|
||||
ToastUtil.show(WordUtil.isNewZh() ? "抱歉!出錯了!" : "i \\'m sorry! An error occurred");
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -229,4 +240,15 @@ public class FreePkRecyclerAdapter extends RefreshAdapter<RandomPkUserBean> {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private FreePkRecyclerListener freePkRecyclerListener;
|
||||
|
||||
public FreePkRecyclerAdapter setFreePkRecyclerListener(FreePkRecyclerListener freePkRecyclerListener) {
|
||||
this.freePkRecyclerListener = freePkRecyclerListener;
|
||||
return this;
|
||||
}
|
||||
|
||||
public interface FreePkRecyclerListener {
|
||||
void onClose();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,6 +42,7 @@ public class LiveParcelItemAdapter extends RecyclerView.Adapter {
|
||||
frameGiftViewHolder.giftSelect(giftJson.get(position), position, mStream, mLiveUid, new LiveParcelItemViewHolder.FrameGiftClickListener() {
|
||||
@Override
|
||||
public void onCallBack(int position, LiveGiftBean model) {
|
||||
model.setPageGift(true);
|
||||
Bus.get().post(new LiveGiftItemEvent().setLiveGiftModel(model));
|
||||
giftSelect(model);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,101 @@
|
||||
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.utils.StringUtil;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.bean.MsgSysGiftInfoBean;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class MsgSysGiftAdapter extends RecyclerView.Adapter {
|
||||
private Context mContext;
|
||||
private RecyclerView mRecyclerView;
|
||||
private List<MsgSysGiftInfoBean> mList;
|
||||
private LayoutInflater mInflater;
|
||||
|
||||
public MsgSysGiftAdapter(Context context) {
|
||||
mContext = context;
|
||||
mList = new ArrayList<>();
|
||||
mList.add(new MsgSysGiftInfoBean());
|
||||
mInflater = LayoutInflater.from(context);
|
||||
}
|
||||
|
||||
public void setList(List<MsgSysGiftInfoBean> list) {
|
||||
if (list != null && list.size() > 0) {
|
||||
mList.clear();
|
||||
mList.addAll(list);
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemViewType(int position) {
|
||||
return position;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
return new Vh(mInflater.inflate(R.layout.item_msg_sys_gift, parent, false));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder vh, int position, @NonNull List payloads) {
|
||||
Object payload = payloads.size() > 0 ? payloads.get(0) : null;
|
||||
((Vh) vh).setData(mList.get(position), position, payload);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return mList.size();
|
||||
}
|
||||
|
||||
|
||||
class Vh extends RecyclerView.ViewHolder {
|
||||
|
||||
ImageView mAvatar;
|
||||
TextView mName, name_remarks;
|
||||
|
||||
public Vh(View itemView) {
|
||||
super(itemView);
|
||||
mAvatar = (ImageView) itemView.findViewById(R.id.avatar);
|
||||
mName = (TextView) itemView.findViewById(R.id.name);
|
||||
name_remarks = (TextView) itemView.findViewById(R.id.name_remarks);
|
||||
}
|
||||
|
||||
void setData(MsgSysGiftInfoBean bean, int position, Object payload) {
|
||||
itemView.setTag(position);
|
||||
ImgLoader.display(mContext, bean.getItem_image(), mAvatar);
|
||||
mName.setText(bean.getItem_name());
|
||||
name_remarks.setText(String.valueOf(bean.getStr_value()));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAttachedToRecyclerView(RecyclerView recyclerView) {
|
||||
super.onAttachedToRecyclerView(recyclerView);
|
||||
mRecyclerView = recyclerView;
|
||||
}
|
||||
|
||||
public interface ActionListener {
|
||||
void onItemClick(MsgSysGiftInfoBean bean);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2,9 +2,12 @@ package com.yunbao.live.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.cardview.widget.CardView;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
@@ -14,10 +17,12 @@ import android.widget.TextView;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.adapter.RefreshAdapter;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.bean.SystemMessageBean;
|
||||
import com.yunbao.live.activity.ZhuangBanActivity;
|
||||
import com.yunbao.live.http.ImHttpUtil;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
@@ -52,7 +57,9 @@ public class SystemMessageAdapter extends RefreshAdapter<SystemMessageBean> {
|
||||
TextView mTime, text;
|
||||
LinearLayout toView, bg;
|
||||
ImageView img_content;
|
||||
CardView cv_img_content;
|
||||
CardView cv_img_content, radius;
|
||||
|
||||
|
||||
public Vh(View itemView) {
|
||||
super(itemView);
|
||||
mContent = itemView.findViewById(R.id.content);
|
||||
@@ -62,6 +69,7 @@ public class SystemMessageAdapter extends RefreshAdapter<SystemMessageBean> {
|
||||
text = itemView.findViewById(R.id.text);
|
||||
img_content = itemView.findViewById(R.id.img_content);
|
||||
cv_img_content = itemView.findViewById(R.id.cv_img_content);
|
||||
radius = itemView.findViewById(R.id.radius);
|
||||
}
|
||||
|
||||
void setData(SystemMessageBean bean) {
|
||||
@@ -69,10 +77,22 @@ public class SystemMessageAdapter extends RefreshAdapter<SystemMessageBean> {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (bean.getLink() != null && !bean.getLink().equals("")) {
|
||||
startActivity(new Intent(mContext, ZhuangBanActivity.class).putExtra("url", bean.getLink()+ "&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken()+ "&isZh=" + (WordUtil.isNewZh() ? "1" : "0")));
|
||||
startActivity(new Intent(mContext, ZhuangBanActivity.class).putExtra("url", bean.getLink() + "&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&isZh=" + (WordUtil.isNewZh() ? "1" : "0")));
|
||||
if (bean.getRead_status() == 2) {
|
||||
ImHttpUtil.readMsg(bean.getId(), new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
|
||||
}
|
||||
});
|
||||
radius.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
radius.setVisibility((bean.getRead_status() == 2 && !TextUtils.isEmpty(bean.getLink())) ? View.VISIBLE : View.GONE);
|
||||
|
||||
mContent.setText(bean.getContent());
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
|
||||
Date currenTimeZone = new Date(Long.parseLong(bean.getAddtime() + "000"));
|
||||
@@ -91,5 +111,4 @@ public class SystemMessageAdapter extends RefreshAdapter<SystemMessageBean> {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,23 +1,32 @@
|
||||
package com.yunbao.live.adapter;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.cardview.widget.CardView;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.blankj.utilcode.util.StringUtils;
|
||||
import com.yunbao.common.adapter.RefreshAdapter;
|
||||
import com.yunbao.common.bean.IMLoginModel;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.utils.L;
|
||||
import com.yunbao.common.utils.RouteUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.activity.ZhuangBanActivity;
|
||||
import com.yunbao.live.bean.SystemMessageBean;
|
||||
import com.yunbao.live.http.ImHttpUtil;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
@@ -28,12 +37,13 @@ import java.util.Date;
|
||||
|
||||
public class SystemMessageNewAdapter extends RefreshAdapter<SystemMessageBean> {
|
||||
|
||||
public SystemMessageNewAdapter(Context context) {
|
||||
ItemLongListener itemLongListener;
|
||||
|
||||
public SystemMessageNewAdapter(Context context, ItemLongListener itemLongListener) {
|
||||
super(context);
|
||||
|
||||
this.itemLongListener = itemLongListener;
|
||||
}
|
||||
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
@@ -42,46 +52,105 @@ public class SystemMessageNewAdapter extends RefreshAdapter<SystemMessageBean> {
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder vh, int position) {
|
||||
((Vh) vh).setData(mList.get(position));
|
||||
((Vh) vh).setData(mList.get(position), position);
|
||||
}
|
||||
|
||||
class Vh extends RecyclerView.ViewHolder {
|
||||
TextView messageContext, messageTime;
|
||||
LinearLayout layoutMore;
|
||||
TextView messageContext, messageTime, title, del;
|
||||
CardView radius, bannerImgLayout;
|
||||
LinearLayout layoutMore, itemLayout;
|
||||
ImageView img_content;
|
||||
ImageView icon;
|
||||
|
||||
public Vh(View itemView) {
|
||||
super(itemView);
|
||||
messageContext = itemView.findViewById(R.id.message_context);
|
||||
layoutMore = itemView.findViewById(R.id.layout_more);
|
||||
itemLayout = itemView.findViewById(R.id.itemLayout);
|
||||
messageTime = itemView.findViewById(R.id.message_time);
|
||||
radius = itemView.findViewById(R.id.radius);
|
||||
icon = itemView.findViewById(R.id.icon);
|
||||
img_content = itemView.findViewById(R.id.img_content);
|
||||
bannerImgLayout = itemView.findViewById(R.id.cv_img_content);
|
||||
title = itemLayout.findViewById(R.id.title);
|
||||
del = itemLayout.findViewById(R.id.del);
|
||||
}
|
||||
|
||||
void setData(SystemMessageBean bean) {
|
||||
void setData(SystemMessageBean bean, int position) {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("MM-dd HH:mm");
|
||||
Date currenTimeZone = new Date(Long.parseLong(bean.getAddtime() + "000"));
|
||||
messageTime.setText(sdf.format(currenTimeZone));
|
||||
messageContext.setText(bean.getContent());
|
||||
layoutMore.setVisibility(TextUtils.isEmpty(bean.getLink()) ? View.GONE : View.VISIBLE);
|
||||
layoutMore.setOnClickListener(new View.OnClickListener() {
|
||||
title.setText(String.valueOf(bean.getTitle()));
|
||||
|
||||
if (bean.getSystem_message_type() == 2) {
|
||||
//带礼物的消息
|
||||
if (bean.getGet_status() == 2) {
|
||||
icon.setImageDrawable(mContext.getDrawable(R.mipmap.icon_msg_sys_gift));
|
||||
} else {
|
||||
icon.setImageDrawable(mContext.getDrawable(R.mipmap.icon_msg_sys_gifted));
|
||||
}
|
||||
messageContext.setVisibility(View.GONE);
|
||||
radius.setVisibility((bean.getRead_status() == 2) ? View.VISIBLE : View.GONE);
|
||||
layoutMore.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
//普通消息
|
||||
icon.setImageDrawable(mContext.getDrawable(R.mipmap.icon_notification_speaker));
|
||||
if (StringUtils.isEmpty(bean.getLink())) {
|
||||
//无跳转
|
||||
messageContext.setVisibility(View.VISIBLE);
|
||||
layoutMore.setVisibility(View.GONE);
|
||||
} else {
|
||||
messageContext.setVisibility(View.GONE);
|
||||
}
|
||||
layoutMore.setVisibility(TextUtils.isEmpty(bean.getLink()) ? View.GONE : View.VISIBLE);
|
||||
radius.setVisibility((bean.getRead_status() == 2 && !TextUtils.isEmpty(bean.getLink())) ? View.VISIBLE : View.GONE);
|
||||
}
|
||||
if (!StringUtils.isEmpty(bean.getImgBanner())) {
|
||||
ImgLoader.display(mContext, bean.getImgBanner(), img_content);
|
||||
img_content.setVisibility(View.VISIBLE);
|
||||
bannerImgLayout.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
img_content.setVisibility(View.GONE);
|
||||
bannerImgLayout.setVisibility(View.GONE);
|
||||
}
|
||||
itemLayout.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (bean.getLink() != null && !bean.getLink().equals("")) {
|
||||
IMLoginModel userInfo = IMLoginManager.get(mContext).getUserInfo();
|
||||
StringBuffer urlBuffer = new StringBuffer();
|
||||
urlBuffer.append(bean.getLink())
|
||||
.append("&uid=")
|
||||
.append(userInfo.getId())
|
||||
.append("&token=")
|
||||
.append(userInfo.getToken()) .append("&isZh=")
|
||||
.append(WordUtil.isNewZh() ? "1" : 0);
|
||||
mContext.startActivity(
|
||||
new Intent(mContext, ZhuangBanActivity.class)
|
||||
.putExtra("url", urlBuffer.toString()));
|
||||
|
||||
//普通消息
|
||||
if (bean.getSystem_message_type() == 1) {
|
||||
if (bean.getLink() != null && !bean.getLink().equals("")) {
|
||||
IMLoginModel userInfo = IMLoginManager.get(mContext).getUserInfo();
|
||||
StringBuffer urlBuffer = new StringBuffer();
|
||||
urlBuffer.append(bean.getLink()).append("&uid=").append(userInfo.getId()).append("&token=").append(userInfo.getToken()).append("&isZh=").append(WordUtil.isNewZh() ? "1" : 0);
|
||||
mContext.startActivity(new Intent(mContext, ZhuangBanActivity.class).putExtra("url", urlBuffer.toString()));
|
||||
}
|
||||
} else {
|
||||
RouteUtil.forwardLiveCompensateActivity(mContext, String.valueOf(bean.getId()), bean.getImgBanner(), bean.getTitle(), bean.getContent(), bean.getAddtime(), bean.getLink(), bean.getGet_status() == 2);
|
||||
}
|
||||
//未读才调用
|
||||
if (bean.getRead_status() == 2) {
|
||||
ImHttpUtil.readMsg(bean.getId(), new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
|
||||
}
|
||||
});
|
||||
radius.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
});
|
||||
itemLayout.setOnLongClickListener(new View.OnLongClickListener() {
|
||||
@Override
|
||||
public boolean onLongClick(View v) {
|
||||
itemLongListener.onItemLong(bean, position, del);
|
||||
return true;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public interface ItemLongListener {
|
||||
void onItemLong(SystemMessageBean bean, int position, View view);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.yunbao.live.bean;
|
||||
|
||||
public class MsgSysGiftInfoBean {
|
||||
int id;
|
||||
String item_name;
|
||||
String restrict_time;
|
||||
String item_image;
|
||||
String str_value;
|
||||
|
||||
public String getStr_value() {
|
||||
return str_value;
|
||||
}
|
||||
|
||||
public void setStr_value(String str_value) {
|
||||
this.str_value = str_value;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getItem_name() {
|
||||
return item_name;
|
||||
}
|
||||
|
||||
public void setItem_name(String item_name) {
|
||||
this.item_name = item_name;
|
||||
}
|
||||
|
||||
public String getRestrict_time() {
|
||||
return restrict_time;
|
||||
}
|
||||
|
||||
public void setRestrict_time(String restrict_time) {
|
||||
this.restrict_time = restrict_time;
|
||||
}
|
||||
|
||||
public String getItem_image() {
|
||||
return item_image;
|
||||
}
|
||||
|
||||
public void setItem_image(String item_image) {
|
||||
this.item_image = item_image;
|
||||
}
|
||||
}
|
||||
@@ -19,6 +19,36 @@ public class SystemMessageBean {
|
||||
private String showImg;
|
||||
private String imgBanner;
|
||||
|
||||
private int system_message_type; //1 普通消息 2 礼包消息
|
||||
|
||||
private int get_status; // 1 已领取 2 未领取
|
||||
|
||||
private int read_status; // 1 已读 2 未读
|
||||
|
||||
public int getRead_status() {
|
||||
return read_status;
|
||||
}
|
||||
|
||||
public void setRead_status(int read_status) {
|
||||
this.read_status = read_status;
|
||||
}
|
||||
|
||||
public int getSystem_message_type() {
|
||||
return system_message_type;
|
||||
}
|
||||
|
||||
public void setSystem_message_type(int system_message_type) {
|
||||
this.system_message_type = system_message_type;
|
||||
}
|
||||
|
||||
public int getGet_status() {
|
||||
return get_status;
|
||||
}
|
||||
|
||||
public void setGet_status(int get_status) {
|
||||
this.get_status = get_status;
|
||||
}
|
||||
|
||||
@JSONField(name = "banner")
|
||||
public String getImgBanner() {
|
||||
return imgBanner;
|
||||
|
||||
@@ -152,6 +152,12 @@ public class FreePkDialogFragment extends AbsDialogFragment implements View.OnCl
|
||||
mRecyclerView.setRefreshEnable(false);
|
||||
mRecyclerView.setEmptyLayoutId(R.layout.view_live_search_list_empty);
|
||||
adapter.setDrPkNum(mDrPkNum);
|
||||
adapter.setFreePkRecyclerListener(new FreePkRecyclerAdapter.FreePkRecyclerListener() {
|
||||
@Override
|
||||
public void onClose() {
|
||||
dismiss();
|
||||
}
|
||||
});
|
||||
adapter.setOnItemClickListener(new OnItemClickListener<RandomPkUserBean>() {
|
||||
@Override
|
||||
public void onItemClick(RandomPkUserBean bean, int position) {
|
||||
|
||||
@@ -55,7 +55,7 @@ public class LiveFansGroupSendGiftDialog extends AbsDialogCenterPopupWindow {
|
||||
recyclerView = findViewById(R.id.giftList);
|
||||
adapter = new LiveFansGroupSendGiftAdapter(mContext);
|
||||
adapter.setOnItemClickListener((bean, position) -> {
|
||||
LiveHttpUtil.sendGift("0",
|
||||
LiveHttpUtil.sendGiftForFansGroup("0",
|
||||
liveUid,
|
||||
mStream,
|
||||
bean.getId(),
|
||||
|
||||
@@ -161,6 +161,13 @@ public class LiveGameDialogFragment extends AbsDialogFragment {
|
||||
.setLiveZhuangBana(true).
|
||||
setDialogClose(true).
|
||||
setPageClose(false), "androidObject");
|
||||
|
||||
|
||||
/* mWebView.addJavascriptInterface(JavascriptInterfaceUtils.getInstance().setmContext(getActivity(), mWebView)
|
||||
.setLiveZhuangBana(true).
|
||||
setDialogClose(true).
|
||||
setPageClose(false), "androidObject");*/
|
||||
|
||||
mWebView.getSettings().setJavaScriptEnabled(true);
|
||||
mWebView.getSettings().setDomStorageEnabled(true);
|
||||
String appCachePath = mContext.getCacheDir().getAbsolutePath();
|
||||
@@ -417,6 +424,8 @@ public class LiveGameDialogFragment extends AbsDialogFragment {
|
||||
);
|
||||
|
||||
}
|
||||
}else if (TextUtils.equals(event.getMethod(), "androidtoCommunityVideo")) {
|
||||
RouteUtil.forwardCommunityActivity();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -129,7 +129,7 @@ public class LiveGiftPopup extends AbsDialogFragment {
|
||||
private MarqueeTextView giftDescription, namingName;
|
||||
private boolean isPk;
|
||||
|
||||
private FragmentTransaction transaction=null;
|
||||
private FragmentTransaction transaction = null;
|
||||
private FragmentManager fragmentManager;
|
||||
private Fragment contentFragment;
|
||||
|
||||
@@ -137,8 +137,8 @@ public class LiveGiftPopup extends AbsDialogFragment {
|
||||
@Override
|
||||
public void onActivityCreated(Bundle savedInstanceState) {
|
||||
super.onActivityCreated(savedInstanceState);
|
||||
if(transaction==null){
|
||||
transaction=getChildFragmentManager().beginTransaction();
|
||||
if (transaction == null) {
|
||||
transaction = getChildFragmentManager().beginTransaction();
|
||||
}
|
||||
Bus.getOn(this);
|
||||
initView();
|
||||
@@ -243,12 +243,13 @@ public class LiveGiftPopup extends AbsDialogFragment {
|
||||
giftTitleAdapter.uncheck();
|
||||
liveWrap.setAlpha(1.0f);
|
||||
liveWrap.setTypeface(Typeface.SANS_SERIF, Typeface.BOLD);
|
||||
transaction=getTransaction();
|
||||
contentFragment=LiveParcelFragment.newInstance(mStream, mLiveUid);
|
||||
transaction = getTransaction();
|
||||
contentFragment = LiveParcelFragment.newInstance(mStream, mLiveUid);
|
||||
transaction.replace(R.id.context_layout_gift, contentFragment);
|
||||
transaction.commitAllowingStateLoss();
|
||||
isWrap = true;
|
||||
findViewById(R.id.red_point).setVisibility(View.GONE);
|
||||
hideLianBtn();
|
||||
}
|
||||
});
|
||||
//;连送
|
||||
@@ -328,13 +329,13 @@ public class LiveGiftPopup extends AbsDialogFragment {
|
||||
.append(userInfo.getToken())
|
||||
.append("&no_back=1")
|
||||
.append("&type=")
|
||||
.append(blindBoxType-1)
|
||||
.append(blindBoxType - 1)
|
||||
|
||||
.append("&isZh=")
|
||||
.append(WordUtil.isNewZh() ? "1" : 0);
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString("url", htmlUrl.toString());
|
||||
// System.out.println("盲盒页面 = "+htmlUrl.toString());
|
||||
// System.out.println("盲盒页面 = "+htmlUrl.toString());
|
||||
LiveHDDialogFragment fragment = new LiveHDDialogFragment();
|
||||
fragment.setArguments(bundle);
|
||||
fragment.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "LiveHDDialogFragment");
|
||||
@@ -399,7 +400,7 @@ public class LiveGiftPopup extends AbsDialogFragment {
|
||||
.append(userInfo.getId())
|
||||
.append("&token=")
|
||||
.append(userInfo.getToken())
|
||||
.append("&for") .append("&isZh=")
|
||||
.append("&for").append("&isZh=")
|
||||
.append(WordUtil.isNewZh() ? "1" : 0);
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString("url", htmlUrl.toString());
|
||||
@@ -480,8 +481,8 @@ public class LiveGiftPopup extends AbsDialogFragment {
|
||||
List<LiveGiftBean> liveGiftBeans = JSONArray.parseArray(giftJson, LiveGiftBean.class);
|
||||
for (LiveGiftBean model : liveGiftBeans) {
|
||||
if (TextUtils.equals(model.getId() + "", mWishGiftId)) {
|
||||
transaction=getTransaction();
|
||||
contentFragment=LiveGiftFragment.newInstance(giftJson,
|
||||
transaction = getTransaction();
|
||||
contentFragment = LiveGiftFragment.newInstance(giftJson,
|
||||
liveGiftList.getJSONObject(i).getString("name"),
|
||||
mStream, mLiveUid, mWishGiftId);
|
||||
transaction.replace(R.id.context_layout_gift, contentFragment);
|
||||
@@ -495,11 +496,11 @@ public class LiveGiftPopup extends AbsDialogFragment {
|
||||
|
||||
JSONObject obj2 = liveGiftList.getJSONObject(0);
|
||||
String giftJson = obj2.getString("giftlist");
|
||||
transaction=getTransaction();
|
||||
contentFragment= LiveGiftFragment.newInstance(giftJson,
|
||||
transaction = getTransaction();
|
||||
contentFragment = LiveGiftFragment.newInstance(giftJson,
|
||||
liveGiftList.getJSONObject(0).getString("name"),
|
||||
mStream, mLiveUid, mWishGiftId);
|
||||
transaction.replace(R.id.context_layout_gift,contentFragment);
|
||||
transaction.replace(R.id.context_layout_gift, contentFragment);
|
||||
transaction.commitAllowingStateLoss();
|
||||
}
|
||||
|
||||
@@ -620,7 +621,11 @@ public class LiveGiftPopup extends AbsDialogFragment {
|
||||
if (isWrap && liveGiftModel.getType() == 7) {
|
||||
sendBlindBoxTicket();
|
||||
} else {
|
||||
sendGift();
|
||||
if (liveGiftModel.isPageGift()) {
|
||||
sendGiftForPage();
|
||||
} else {
|
||||
sendGift();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -636,7 +641,7 @@ public class LiveGiftPopup extends AbsDialogFragment {
|
||||
LiveHttpUtil.sendBlindBoxTicket((by != null ? "1" : "0"),
|
||||
mLiveUid,
|
||||
mStream,
|
||||
isWrap ? liveGiftModel.getId() : liveGiftModel.getBlindBoxTicketId(), new HttpCallback() {
|
||||
isWrap ? liveGiftModel.getGift_id() : liveGiftModel.getBlindBoxTicketId(), new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if (code == 0) {
|
||||
@@ -752,6 +757,23 @@ public class LiveGiftPopup extends AbsDialogFragment {
|
||||
} else {
|
||||
LiveHttpUtil.sendGift("0", mLiveUid, mStream, liveGiftModel.getId(), mCount, isContactGift, callback);
|
||||
}
|
||||
if (!liveGiftModel.getSwf().contains("svga")) {
|
||||
showLianBtn();
|
||||
}
|
||||
if (liveGiftModel.getType() == 7) {
|
||||
showLianBtn();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void sendGiftForPage() {
|
||||
if (liveGiftModel == null) return;
|
||||
SendGiftCallback callback = new SendGiftCallback(liveGiftModel);
|
||||
if (by != null) {
|
||||
LiveHttpUtil.sendGiftForPage("1", mLiveUid, mStream, liveGiftModel.getGift_id(), mCount, 0, false, callback);
|
||||
} else {
|
||||
LiveHttpUtil.sendGiftForPage("0", mLiveUid, mStream, liveGiftModel.getGift_id(), mCount, 0, false, callback);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -767,68 +789,42 @@ public class LiveGiftPopup extends AbsDialogFragment {
|
||||
//连送逻辑
|
||||
private int mLianCountDownCount;//连送倒计时的数字
|
||||
|
||||
private Handler lianSongHandler = new Handler();
|
||||
private Runnable lianSongRunnable = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (removeRunnable) {
|
||||
lianSongHandler.removeCallbacks(lianSongRunnable);
|
||||
if (mLianText != null) {
|
||||
mLianText.setText("5s");
|
||||
}
|
||||
mLianCountDownCount = 5;
|
||||
lianSongHandler.postDelayed(lianSongRunnable, 1000);
|
||||
removeRunnable = false;
|
||||
} else {
|
||||
mLianCountDownCount--;
|
||||
if (mLianCountDownCount == 0) {
|
||||
hideLianBtn();
|
||||
} else {
|
||||
if (mLianText != null) {
|
||||
mLianText.setText(mLianCountDownCount + "s");
|
||||
lianSongHandler.postDelayed(lianSongRunnable, 1000);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* 显示连送按钮
|
||||
*/
|
||||
private boolean mShowLianBtn = false;
|
||||
private boolean removeRunnable = false;
|
||||
|
||||
private void showLianBtn() {
|
||||
|
||||
|
||||
if (mShowLianBtn) {
|
||||
removeRunnable = true;
|
||||
} else {
|
||||
if (mLianText != null) {
|
||||
mLianText.setText("5s");
|
||||
}
|
||||
mLianCountDownCount = 5;
|
||||
lianSongHandler.postDelayed(lianSongRunnable, 1000);
|
||||
mBtnSendGroup.setVisibility(View.VISIBLE);
|
||||
giftSendLayout.setVisibility(View.INVISIBLE);
|
||||
mShowLianBtn = true;
|
||||
}
|
||||
|
||||
|
||||
mBtnSendGroup.removeCallbacks(newLianSongRunnable);
|
||||
mBtnSendGroup.setVisibility(View.VISIBLE);
|
||||
giftSendLayout.setVisibility(View.INVISIBLE);
|
||||
mLianCountDownCount = 5;
|
||||
mBtnSendGroup.post(newLianSongRunnable);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新连送回调
|
||||
*/
|
||||
private Runnable newLianSongRunnable = new Runnable() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
if (mLianCountDownCount == 0) {
|
||||
hideLianBtn();
|
||||
} else {
|
||||
mLianCountDownCount--;
|
||||
if (mLianText != null) {
|
||||
mLianText.setText(mLianCountDownCount + "s");
|
||||
mBtnSendGroup.postDelayed(newLianSongRunnable, 1000);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* 隐藏连送按钮 包裹
|
||||
*/
|
||||
private void hideLianBtn() {
|
||||
mBtnSendGroup.setVisibility(View.INVISIBLE);
|
||||
giftSendLayout.setVisibility(View.VISIBLE);
|
||||
lianSongHandler.removeCallbacks(lianSongRunnable);
|
||||
mShowLianBtn = false;
|
||||
mBtnSendGroup.removeCallbacks(newLianSongRunnable);
|
||||
getCoin();
|
||||
|
||||
LiveNetManager.get(mContext)
|
||||
.getGiftNamingInfo(liveGiftModel.getId() + "", new com.yunbao.common.http.base.HttpCallback<GiftNamingInfoModel>() {
|
||||
@Override
|
||||
@@ -888,8 +884,8 @@ public class LiveGiftPopup extends AbsDialogFragment {
|
||||
giftNumberLayout.setVisibility(View.INVISIBLE);
|
||||
JSONObject obj2 = liveGiftList.getJSONObject(event.getmPosition());
|
||||
String giftJson = obj2.getString("giftlist");
|
||||
transaction=getTransaction();
|
||||
contentFragment=LiveGiftFragment.newInstance(giftJson, event.getGiftTitle(), mStream, mLiveUid, mWishGiftId);
|
||||
transaction = getTransaction();
|
||||
contentFragment = LiveGiftFragment.newInstance(giftJson, event.getGiftTitle(), mStream, mLiveUid, mWishGiftId);
|
||||
transaction.replace(R.id.context_layout_gift, contentFragment);
|
||||
transaction.commitAllowingStateLoss();
|
||||
isWrap = false;
|
||||
@@ -985,7 +981,7 @@ public class LiveGiftPopup extends AbsDialogFragment {
|
||||
} else {
|
||||
operateImage.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
hideLianBtn();
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
@@ -1115,12 +1111,12 @@ public class LiveGiftPopup extends AbsDialogFragment {
|
||||
}
|
||||
if (!TextUtils.isEmpty(event.getDressName()) && !TextUtils.isEmpty(event.getDressMsg())) {
|
||||
SpannableStringBuilder stringBuilder = new SpannableStringBuilder();
|
||||
String boxBlindMsg = String.format(mContext.getString(R.string.random_availability2), WordUtil.isNewZh()?event.getGiftname():event.getGiftname_en(),WordUtil.isNewZh()? event.getDressName():event.getDress_nameen());
|
||||
String boxBlindMsg = String.format(mContext.getString(R.string.random_availability2), WordUtil.isNewZh() ? event.getGiftname() : event.getGiftname_en(), WordUtil.isNewZh() ? event.getDressName() : event.getDress_nameen());
|
||||
stringBuilder.append(boxBlindMsg);
|
||||
int dressNameIndex = boxBlindMsg.indexOf(WordUtil.isNewZh()? event.getDressName():event.getDress_nameen());
|
||||
int dressNameSize =(WordUtil.isNewZh()? event.getDressName():event.getDress_nameen()).length();
|
||||
int giftNameIndex = boxBlindMsg.indexOf(WordUtil.isNewZh()?event.getGiftname():event.getGiftname_en());
|
||||
int giftNameSize = (WordUtil.isNewZh()?event.getGiftname():event.getGiftname_en()).length();
|
||||
int dressNameIndex = boxBlindMsg.indexOf(WordUtil.isNewZh() ? event.getDressName() : event.getDress_nameen());
|
||||
int dressNameSize = (WordUtil.isNewZh() ? event.getDressName() : event.getDress_nameen()).length();
|
||||
int giftNameIndex = boxBlindMsg.indexOf(WordUtil.isNewZh() ? event.getGiftname() : event.getGiftname_en());
|
||||
int giftNameSize = (WordUtil.isNewZh() ? event.getGiftname() : event.getGiftname_en()).length();
|
||||
stringBuilder.setSpan(new ForegroundColorSpan(Color.parseColor(event.getDressColour())),
|
||||
dressNameIndex,
|
||||
dressNameIndex + dressNameSize,
|
||||
@@ -1132,11 +1128,11 @@ public class LiveGiftPopup extends AbsDialogFragment {
|
||||
stringBuilders.add(stringBuilder);
|
||||
} else {
|
||||
SpannableStringBuilder stringBuilder = new SpannableStringBuilder();
|
||||
String boxBlindMsg = String.format(mContext.getString(R.string.random_availability3), WordUtil.isNewZh()?event.getGiftname():event.getGiftname_en());
|
||||
String boxBlindMsg = String.format(mContext.getString(R.string.random_availability3), WordUtil.isNewZh() ? event.getGiftname() : event.getGiftname_en());
|
||||
stringBuilder.append(boxBlindMsg);
|
||||
if (!TextUtils.isEmpty(event.getGiftname_en())){
|
||||
int giftNameIndex = boxBlindMsg.indexOf(WordUtil.isNewZh()?event.getGiftname():event.getGiftname_en());
|
||||
int giftNameSize = (WordUtil.isNewZh()?event.getGiftname():event.getGiftname_en()).length();
|
||||
if (!TextUtils.isEmpty(event.getGiftname_en())) {
|
||||
int giftNameIndex = boxBlindMsg.indexOf(WordUtil.isNewZh() ? event.getGiftname() : event.getGiftname_en());
|
||||
int giftNameSize = (WordUtil.isNewZh() ? event.getGiftname() : event.getGiftname_en()).length();
|
||||
stringBuilder.setSpan(new ForegroundColorSpan(Color.parseColor(event.getGiftColour())),
|
||||
giftNameIndex,
|
||||
giftNameIndex + giftNameSize,
|
||||
@@ -1371,13 +1367,7 @@ public class LiveGiftPopup extends AbsDialogFragment {
|
||||
goldText.setText(goldCoin);
|
||||
}
|
||||
|
||||
if (!mGiftBean.getSwf().contains("svga")) {
|
||||
showLianBtn();
|
||||
}
|
||||
if (mGiftBean.getType() == 7) {
|
||||
showLianBtn();
|
||||
|
||||
}
|
||||
|
||||
// //刷新包裹列表wrap_gift_num -1:表示数量没有变化
|
||||
// mObjGiftSendback = obj;
|
||||
@@ -1446,15 +1436,16 @@ public class LiveGiftPopup extends AbsDialogFragment {
|
||||
}
|
||||
}
|
||||
}
|
||||
private FragmentTransaction getTransaction(){
|
||||
if(contentFragment!=null && transaction!=null){
|
||||
|
||||
private FragmentTransaction getTransaction() {
|
||||
if (contentFragment != null && transaction != null) {
|
||||
transaction.remove(contentFragment);
|
||||
contentFragment=null;
|
||||
contentFragment = null;
|
||||
}
|
||||
if(fragmentManager==null){
|
||||
fragmentManager=getChildFragmentManager();
|
||||
if (fragmentManager == null) {
|
||||
fragmentManager = getChildFragmentManager();
|
||||
}
|
||||
transaction=fragmentManager.beginTransaction();
|
||||
transaction = fragmentManager.beginTransaction();
|
||||
return transaction;
|
||||
}
|
||||
|
||||
|
||||
@@ -77,10 +77,12 @@ public class LiveUserAnchorMailBoxPopDialog extends AbsDialogPopupWindow {
|
||||
empty.setVisibility(View.GONE);
|
||||
list.setVisibility(View.VISIBLE);
|
||||
return JSON.parseArray(Arrays.toString(info), LiveUserMailBoxModel.class);
|
||||
} else {
|
||||
} else if (adapter.getList().size() == 0) {
|
||||
empty.setVisibility(VISIBLE);
|
||||
list.setVisibility(GONE);
|
||||
return new ArrayList<LiveUserMailBoxModel>();
|
||||
}else{
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
@@ -248,6 +248,7 @@ public class LiveUserDialogFragment extends AbsDialogFragment implements View.On
|
||||
mHonorLayout.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
|
||||
if (!isAnchor) {
|
||||
MobclickAgent.onEvent(mContext, "user_avatar_honor", "荣誉墙按钮");
|
||||
} else {
|
||||
@@ -279,6 +280,7 @@ public class LiveUserDialogFragment extends AbsDialogFragment implements View.On
|
||||
ViewClicksAntiShake.clicksAntiShake(giftWall, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
if (TextUtils.equals(mLiveUid, "uid")) return;
|
||||
Bus.get().post(new LiveAudienceEvent()
|
||||
.setType(LiveAudienceEvent.LiveAudienceType.GIFT_WALL)
|
||||
.setUid(mToUid)
|
||||
|
||||
@@ -11,4 +11,6 @@ public class ImHttpConsts {
|
||||
public static final String CHECK_BLACK = "checkBlack";
|
||||
public static final String SEND_DYNAMICCOMMENT = "sendDynamicComment";
|
||||
public static final String SET_BLACK = "setBlack";
|
||||
|
||||
public static final String GET_MESSAGEGIFTINFO = "getMessageGiftInfo";
|
||||
}
|
||||
|
||||
@@ -73,4 +73,41 @@ public class ImHttpUtil {
|
||||
.params("touid", touid)
|
||||
.execute(callback);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取补偿消息详情
|
||||
*/
|
||||
public static void getMessageGiftInfo(String msgid, HttpCallback callback) {
|
||||
HttpClient.getInstance().get("Message.getMessageGiftInfo", ImHttpConsts.GET_MESSAGEGIFTINFO)
|
||||
.params("message_id", msgid)
|
||||
.execute(callback);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除系统消息
|
||||
*/
|
||||
public static void delMsg(String msgid, HttpCallback callback) {
|
||||
HttpClient.getInstance().get("Message.deleteSystemMessage", ImHttpConsts.GET_MESSAGEGIFTINFO)
|
||||
.params("message_id", msgid)
|
||||
.execute(callback);
|
||||
}
|
||||
|
||||
/**
|
||||
* 已读 系统消息
|
||||
*/
|
||||
public static void readMsg(String msgid, HttpCallback callback) {
|
||||
HttpClient.getInstance().get("Message.systemMessageRead", ImHttpConsts.GET_MESSAGEGIFTINFO)
|
||||
.params("message_id", msgid)
|
||||
.execute(callback);
|
||||
}
|
||||
|
||||
/**
|
||||
* 领取礼物
|
||||
*/
|
||||
public static void receiveGift(String msgid, HttpCallback callback) {
|
||||
HttpClient.getInstance().get("Message.getMessageGiftDetails", ImHttpConsts.GET_MESSAGEGIFTINFO)
|
||||
.params("message_id", msgid)
|
||||
.execute(callback);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ 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.activity.LiveActivity;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
|
||||
@@ -131,7 +132,7 @@ public class SocketRyChatUtil {
|
||||
SocketRyClient.mSocketHandler.processBroadcast(msg.mResult.toString() + "");
|
||||
}
|
||||
LiveNetManager.get(CommonAppContext.sInstance)
|
||||
.addChatCount(new com.yunbao.common.http.base.HttpCallback<HttpCallbackModel>() {
|
||||
.addChatCount(LiveActivity.mStream, new com.yunbao.common.http.base.HttpCallback<HttpCallbackModel>() {
|
||||
@Override
|
||||
public void onSuccess(HttpCallbackModel data) {
|
||||
|
||||
@@ -150,7 +151,7 @@ public class SocketRyChatUtil {
|
||||
if (errorCode.code == 23408) {
|
||||
ToastUtil.show(WordUtil.isNewZh() ? "您已被禁言" : "You have been banned");
|
||||
} else {
|
||||
ToastUtil.show(errorCode.code + ":" + errorCode.msg);
|
||||
ToastUtil.show(WordUtil.isNewZh() ? "抱歉!出錯了!" + errorCode.code : "I'm sorry! An error occurred:" + errorCode.code);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -491,7 +492,7 @@ public class SocketRyChatUtil {
|
||||
if (u == null) {
|
||||
return;
|
||||
}
|
||||
String s = action == 1 ? "被設為管理員(Set as Administrator)": "被取消管理員(Cancelled administrator)";
|
||||
String s = action == 1 ? "被設為管理員(Set as Administrator)" : "被取消管理員(Cancelled administrator)";
|
||||
final SocketSendBean msg = new SocketSendBean()
|
||||
.param("_method_", Constants.SOCKET_SET_ADMIN)
|
||||
.param("action", action)
|
||||
|
||||
@@ -7,7 +7,6 @@ import android.widget.ImageView;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.ms.banner.holder.BannerViewHolder;
|
||||
import com.yunbao.common.bean.BannerBean;
|
||||
import com.yunbao.live.bean.SlideBean;
|
||||
|
||||
public class CustomMyViewHolder implements BannerViewHolder<SlideBean> {
|
||||
|
||||
@@ -133,6 +133,7 @@ import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.common.utils.formatBigNum;
|
||||
import com.yunbao.common.views.AbsViewHolder;
|
||||
import com.yunbao.common.views.TopGradual;
|
||||
import com.yunbao.common.views.weight.ClipPathCircleImage;
|
||||
import com.yunbao.common.views.weight.FullServiceNotificationView;
|
||||
import com.yunbao.common.views.weight.NobleNoticeView;
|
||||
@@ -160,7 +161,6 @@ import com.yunbao.live.bean.LiveWishlistBean;
|
||||
import com.yunbao.live.bean.WishlistItemModel;
|
||||
import com.yunbao.live.custom.LiveLightView;
|
||||
import com.yunbao.live.custom.RightGradual;
|
||||
import com.yunbao.common.views.TopGradual;
|
||||
import com.yunbao.live.dialog.GiftWallDialog;
|
||||
import com.yunbao.live.dialog.LiveContactDetailsSendGiftDialog;
|
||||
import com.yunbao.live.dialog.LiveFaceUnityDialogFragment;
|
||||
@@ -315,7 +315,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
|
||||
public static Handler mHandler;
|
||||
private static final int WHAT_PK_TIME = 2;//pk时间变化 what
|
||||
private static int mPkTimeCount;//pk时间
|
||||
private static int mPkTimeCount, mPkTimeCount2;//pk时间
|
||||
|
||||
public static ImageView img_pk_fist_l, img_pk_fist_r;
|
||||
public RoundedImageView avatar_l1, avatar_l2, avatar_l3, avatar_r1, avatar_r2, avatar_r3;
|
||||
@@ -879,7 +879,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
d_pk_view.setVisibility(View.VISIBLE);
|
||||
if (time != 0) {
|
||||
mPkTimeCount = time;
|
||||
mHandler.sendEmptyMessageAtTime(WHAT_PK_TIME, getNextSecondTime());
|
||||
mHandler.sendEmptyMessageDelayed(WHAT_PK_TIME, getNextSecondTime());
|
||||
}
|
||||
|
||||
|
||||
@@ -1237,6 +1237,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
if (LivePushTxViewHolder.mTRTCCloud != null || LivePushRyViewHolder.rtcRoom != null) {
|
||||
fans_btn.setVisibility(View.GONE);
|
||||
}
|
||||
mPkRankTopIcon.setVisibility(View.GONE);
|
||||
goto_room_view = (LinearLayout) findViewById(R.id.goto_room_view);
|
||||
goto_room_view.setVisibility(View.GONE);
|
||||
avatarOther = (ImageView) findViewById(R.id.avatarOther);
|
||||
@@ -1817,13 +1818,13 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
mAnchorLayout.setBackgroundResource(R.drawable.bg_live_ico);
|
||||
mGoodNumberIcon.setVisibility(View.GONE);
|
||||
mAnchorSay.setVisibility(View.INVISIBLE);
|
||||
showAnchorSayAndCallAnchor();
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置数据
|
||||
*/
|
||||
public void resetView() {
|
||||
countdownHandler.removeCallbacks(countdownRunnable);
|
||||
svgaImageViewHashMap.clear();
|
||||
pa_pao_layout.removeAllViews();
|
||||
timeHandler.removeCallbacks(timeRunnable);
|
||||
@@ -1945,6 +1946,10 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
IMLoginModel userInfo = IMLoginManager.get(mContext).getUserInfo();
|
||||
BannerBean bean = mBannerList2.get(p);
|
||||
String type = "";
|
||||
if (bean.getLink().equals("BattlePass")) {
|
||||
RouteUtil.forwardBattlePass();
|
||||
return;
|
||||
}
|
||||
StringBuffer htmlUrl = new StringBuffer();
|
||||
//判断是否是星级活动
|
||||
if (bean.isStart()) {
|
||||
@@ -2014,6 +2019,10 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
if (p >= 0 && p < mBannerList2.size()) {
|
||||
IMLoginModel userInfo = IMLoginManager.get(mContext).getUserInfo();
|
||||
BannerBean bean = mBannerList2.get(p);
|
||||
if (bean.getLink().equals("BattlePass")) {
|
||||
RouteUtil.forwardBattlePass();
|
||||
return;
|
||||
}
|
||||
String type = "";
|
||||
StringBuffer htmlUrl = new StringBuffer();
|
||||
//判断是否是星级活动
|
||||
@@ -2205,6 +2214,10 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
BannerBean bean = mBannerList1.get(p);
|
||||
if (bean != null) {
|
||||
String link = bean.getLink();
|
||||
if (link.equals("BattlePass")) {
|
||||
RouteUtil.forwardBattlePass();
|
||||
return;
|
||||
}
|
||||
if (link.equals("sc")) {
|
||||
String url;
|
||||
if (!"".equals(bean.getmIntoUrl()) && bean.getmIntoUrl() != null) {
|
||||
@@ -2448,9 +2461,6 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
}
|
||||
pkRankLayout.setTag(mLiveUid);
|
||||
pkUidTmp = pkUid;
|
||||
mRedVal.setVisibility(View.GONE);
|
||||
mBlueVal.setVisibility(View.GONE);
|
||||
mPkRankTopIcon.setVisibility(View.GONE);
|
||||
new LoadDian9TuUtil().loadDian9TuAssets2(mContext, liveRankPk2, "rectangle_new.png", 1);
|
||||
|
||||
}
|
||||
@@ -2479,7 +2489,8 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
mBlueVal.setLayoutParams(blueValLayoutParams);
|
||||
}
|
||||
}
|
||||
public void initRankPKInfo(String mLiveUid){
|
||||
|
||||
public void initRankPKInfo(String mLiveUid, String pkUid) {
|
||||
LiveNetManager.get(mContext)
|
||||
.getRandomPk(mLiveUid, pkUid, new com.yunbao.common.http.base.HttpCallback<PkRankBean>() {
|
||||
@Override
|
||||
@@ -2834,9 +2845,14 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
Log.e("LiveRoomViewHolder", "closePkTwo: 隐藏PK信息" + goto_room_view.getVisibility());
|
||||
mPkRankTopIcon.setVisibility(View.GONE);
|
||||
lt_pk_line.setVisibility(View.GONE);
|
||||
pkHandler = false;
|
||||
pkUid = "";
|
||||
goto_room_view.setVisibility(View.GONE);
|
||||
livePKUserListBean = new LivePKUserListBean();
|
||||
mRedVal.setVisibility(View.GONE);
|
||||
mBlueVal.setVisibility(View.GONE);
|
||||
mPkRankTopIcon.setVisibility(View.GONE);
|
||||
showAnchorSayAndCallAnchor();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -4379,6 +4395,10 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
@Override
|
||||
public void onBannerClick(List datas, int p) {
|
||||
if (mBannerList3 != null) {
|
||||
if (mBannerList3.get(p).getLink().equals("BattlePass")) {
|
||||
RouteUtil.forwardBattlePass();
|
||||
return;
|
||||
}
|
||||
if (mBannerList3.get(p).getLink().equals("0")) {
|
||||
if (p == 0) {
|
||||
((LiveAudienceActivity) mContext).openGiftWindow("" + bean1.getId(), "1");
|
||||
@@ -4414,6 +4434,10 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
|
||||
@Override
|
||||
public void onBannerClick(List datas, int p) {
|
||||
if (mBannerList4.get(p).getLink().equals("BattlePass") || mBannerList4.get(p).getType() == 888) {
|
||||
RouteUtil.forwardBattlePass();
|
||||
return;
|
||||
}
|
||||
if (TextUtils.equals("特惠首冲", mBannerList4.get(p).getName())) {
|
||||
|
||||
Map<String, String> map_ekv = new HashMap<String, String>();
|
||||
@@ -4896,7 +4920,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
hideAnchorSayAndCallAnchor();
|
||||
break;
|
||||
case LIVE_PK_END:
|
||||
showAnchorSayAndCallAnchor();
|
||||
//showAnchorSayAndCallAnchor();
|
||||
break;
|
||||
case LIVE_FONT_SIZE:
|
||||
int fount = event.getNums();
|
||||
@@ -5037,7 +5061,6 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
|
||||
}
|
||||
};
|
||||
private Handler countdownHandler = new Handler();
|
||||
private View detailsView = null;
|
||||
private FrameLayout timeTitle;
|
||||
private TextView textTime;
|
||||
@@ -5050,13 +5073,37 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
* PK倒计时
|
||||
*/
|
||||
private String userId2, userId3 = "", userId4;
|
||||
private int drPKtIME;
|
||||
|
||||
public void seisShowGif(boolean isShowGif) {
|
||||
this.isShowGif = isShowGif;
|
||||
}
|
||||
|
||||
public void upDataPkScore(JSONArray pkScores, int time) {
|
||||
|
||||
private Runnable countdownRunnable = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
|
||||
if (mPkTimeCount2 > 0) {
|
||||
mPkTimeCount2--;
|
||||
if (mPkTimeCount2 == 0) {
|
||||
timeTitle.setVisibility(View.GONE);
|
||||
timeTitle.removeCallbacks(countdownRunnable);
|
||||
Bus.get().post(new LiveAudienceEvent()
|
||||
.setType(LiveAudienceEvent.LiveAudienceType.PK_TIME_COUNT));
|
||||
} else {
|
||||
timeTitle.setVisibility(View.VISIBLE);
|
||||
Log.e("多人Pk", "countdownRunnable mPkTimeCount:" + mPkTimeCount2);
|
||||
String s1 = StringUtil.getDurationText(mPkTimeCount2 * 1000);
|
||||
textTime.setText(String.format(mContext.getString(R.string.pk_time), s1));
|
||||
Log.e("多人Pk", "countdownRunnable s1:" + s1);
|
||||
timeTitle.postDelayed(countdownRunnable, 1000);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
public void upDataPkScore(JSONArray pkScores, int time) {
|
||||
isShowGif = true;
|
||||
if (detailsView == null) {
|
||||
detailsView = LayoutInflater.from(mContext).inflate(R.layout.view_live_pk_details, null);
|
||||
@@ -5096,15 +5143,14 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
detailsView.setLayoutParams(params);
|
||||
}
|
||||
});
|
||||
|
||||
countdownHandler.removeCallbacks(countdownRunnable);
|
||||
if (time > 0) {
|
||||
mPkTimeCount = time;
|
||||
timeTitle.setVisibility(View.VISIBLE);
|
||||
countdownHandler.post(countdownRunnable);
|
||||
}
|
||||
}
|
||||
Log.e("多人Pk", "upDataPkScore mPkTimeCount:" +mPkTimeCount);
|
||||
if (time > 0) {
|
||||
mPkTimeCount2 = time;
|
||||
drPKtIME = time;
|
||||
timeTitle.setVisibility(View.VISIBLE);
|
||||
timeTitle.post(countdownRunnable);
|
||||
}
|
||||
Log.e("多人Pk", "upDataPkScore mPkTimeCount:" + mPkTimeCount);
|
||||
for (int i = 0; i < pkScores.size(); i++) {
|
||||
JSONObject score = pkScores.getJSONObject(i);
|
||||
String userNiceName = score.getString("user_nicename");
|
||||
@@ -5190,25 +5236,6 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
|
||||
}
|
||||
|
||||
private Runnable countdownRunnable = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
mPkTimeCount--;
|
||||
if (mPkTimeCount > 0) {//
|
||||
Log.e("多人Pk", "countdownRunnable mPkTimeCount:" +mPkTimeCount);
|
||||
String s1 = StringUtil.getDurationText(mPkTimeCount * 1000);
|
||||
textTime.setText(String.format(mContext.getString(R.string.pk_time), s1));
|
||||
Log.e("多人Pk", "countdownRunnable s1:" +s1);
|
||||
countdownHandler.postAtTime(countdownRunnable, getNextSecondTime());
|
||||
} else {
|
||||
mPkTimeCount = 0;
|
||||
timeTitle.setVisibility(View.GONE);
|
||||
countdownHandler.removeCallbacks(countdownRunnable);
|
||||
Bus.get().post(new LiveAudienceEvent()
|
||||
.setType(LiveAudienceEvent.LiveAudienceType.PK_TIME_COUNT));
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
public void removeDetailView() {
|
||||
|
||||
@@ -5216,11 +5243,13 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
mRoot.removeView(detailsView);
|
||||
detailsView = null;
|
||||
}
|
||||
mPkTimeCount = 0;
|
||||
|
||||
showAnchorSayAndCallAnchor();
|
||||
if (mHandler != null) {
|
||||
mPkTimeCount = 0;
|
||||
mHandler.removeMessages(WHAT_PK_TIME);
|
||||
}
|
||||
|
||||
isShowGif = false;
|
||||
if (voteManager != null) {
|
||||
voteManager.hide();
|
||||
@@ -5483,7 +5512,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
|
||||
public void showAnchorSayAndCallAnchor() {
|
||||
isHinde = false;
|
||||
if (mAnchorSay.getVisibility() == View.GONE &&
|
||||
if (mAnchorSay.getVisibility() != View.VISIBLE &&
|
||||
sayModel != null && sayModel.getLivePreview() != null &&
|
||||
sayModel.getLivePreview().getIsShow() == 1
|
||||
) {
|
||||
|
||||
@@ -35,6 +35,7 @@ import com.yunbao.common.bean.MsgModel;
|
||||
import com.yunbao.common.bean.StarChallengeStatusModel;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.http.HttpClient;
|
||||
import com.yunbao.common.http.LiveHttpUtil;
|
||||
import com.yunbao.common.http.live.LiveNetManager;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
@@ -47,13 +48,14 @@ import com.yunbao.live.activity.ZhuangBanActivity;
|
||||
import com.yunbao.live.bean.WishlistModel;
|
||||
import com.yunbao.live.dialog.LiveHDDialogFragment;
|
||||
import com.yunbao.live.event.LiveAudienceEvent;
|
||||
import com.yunbao.common.http.LiveHttpUtil;
|
||||
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Created by cxf on 2018/10/9.
|
||||
@@ -88,6 +90,7 @@ public class LiveRyAnchorViewHolder extends AbsLiveViewHolder {
|
||||
super(context, parentView);
|
||||
|
||||
}
|
||||
|
||||
public long getmAnchorLiveTime() {
|
||||
return mAnchorLiveTime;
|
||||
}
|
||||
@@ -159,17 +162,24 @@ public class LiveRyAnchorViewHolder extends AbsLiveViewHolder {
|
||||
}
|
||||
});
|
||||
btn_start_dr_pk_view.setVisibility(View.GONE);
|
||||
yaoqing.clear();
|
||||
}
|
||||
});
|
||||
|
||||
btn_dr.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
if (PKing == false) {
|
||||
((LiveRyAnchorActivity) mContext).openLinkMicAnchorWindow(true);
|
||||
|
||||
if (yaoqing.size() < 3) {
|
||||
if (PKing == false) {
|
||||
((LiveRyAnchorActivity) mContext).openLinkMicAnchorWindow(true);
|
||||
} else {
|
||||
ToastUtil.show(WordUtil.isNewZh() ? "您已在PK中" : "You are already in the PK");
|
||||
}
|
||||
} else {
|
||||
ToastUtil.show(WordUtil.isNewZh()?"您已在PK中":"You are already in the PK");
|
||||
ToastUtil.show(WordUtil.isNewZh() ? "多人PK最大參與人數為4人" : "The maximum number of participants in a multiplayer PK is 4 people");
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
findViewById(R.id.btn_link_mic).setOnClickListener(this);
|
||||
@@ -178,6 +188,12 @@ public class LiveRyAnchorViewHolder extends AbsLiveViewHolder {
|
||||
mLiveRoomHandler = new LiveRoomHandler();
|
||||
}
|
||||
|
||||
private Map<String, String> yaoqing = new HashMap<>();
|
||||
|
||||
public void setYaoqing(String numinda) {
|
||||
yaoqing.put(numinda, numinda);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (!canClick()) {
|
||||
@@ -349,7 +365,7 @@ public class LiveRyAnchorViewHolder extends AbsLiveViewHolder {
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
Log.e("PortraitLiveManager", error);
|
||||
ToastUtil.show( mContext.getString(R.string.net_error));
|
||||
ToastUtil.show(mContext.getString(R.string.net_error));
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -477,7 +493,7 @@ public class LiveRyAnchorViewHolder extends AbsLiveViewHolder {
|
||||
.append("&uid=")
|
||||
.append(userInfo.getId())
|
||||
.append("&k=")
|
||||
.append(System.currentTimeMillis()) .append("&isZh=")
|
||||
.append(System.currentTimeMillis()).append("&isZh=")
|
||||
.append(WordUtil.isNewZh() ? "1" : 0);
|
||||
} else {
|
||||
type = bean.getShow_type();
|
||||
@@ -489,11 +505,11 @@ public class LiveRyAnchorViewHolder extends AbsLiveViewHolder {
|
||||
.append("&anchorUid=")
|
||||
.append(mLiveUid)
|
||||
.append("&t=")
|
||||
.append(System.currentTimeMillis()) .append("&isZh=")
|
||||
.append(System.currentTimeMillis()).append("&isZh=")
|
||||
.append(WordUtil.isNewZh() ? "1" : 0);
|
||||
}
|
||||
if (TextUtils.equals(type, "1")) {
|
||||
ZhuangBanActivity.forward(mContext, htmlUrl.toString(), false,0);
|
||||
ZhuangBanActivity.forward(mContext, htmlUrl.toString(), false, 0);
|
||||
} else {
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString("url", htmlUrl.toString());
|
||||
@@ -535,7 +551,7 @@ public class LiveRyAnchorViewHolder extends AbsLiveViewHolder {
|
||||
.append("&uid=")
|
||||
.append(userInfo.getId())
|
||||
.append("&k=")
|
||||
.append(System.currentTimeMillis()) .append("&isZh=")
|
||||
.append(System.currentTimeMillis()).append("&isZh=")
|
||||
.append(WordUtil.isNewZh() ? "1" : 0);
|
||||
} else {
|
||||
type = bean.getShow_type();
|
||||
@@ -550,11 +566,11 @@ public class LiveRyAnchorViewHolder extends AbsLiveViewHolder {
|
||||
.append(mLiveUid)
|
||||
.append("&t=")
|
||||
.append(System.currentTimeMillis())
|
||||
.append("&g=Appapi&m=Wish&a=index") .append("&isZh=")
|
||||
.append("&g=Appapi&m=Wish&a=index").append("&isZh=")
|
||||
.append(WordUtil.isNewZh() ? "1" : 0);
|
||||
}
|
||||
if (TextUtils.equals(type, "1")) {
|
||||
ZhuangBanActivity.forward(mContext, htmlUrl.toString(), false,0);
|
||||
ZhuangBanActivity.forward(mContext, htmlUrl.toString(), false, 0);
|
||||
} else {
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString("url", htmlUrl.toString());
|
||||
|
||||