Compare commits

...

142 Commits

Author SHA1 Message Date
18401019693
c20312b982 6.5.4礼物冠名 2023-08-18 18:43:47 +08:00
18401019693
643568f63b 6.5.4礼物冠名 2023-08-18 18:08:15 +08:00
18401019693
f03ba293b5 6.5.4礼物冠名 2023-08-18 17:43:13 +08:00
a2f954b28a Merge remote-tracking branch 'origin/master' 2023-08-18 14:48:41 +08:00
d4549793d1 调整头像相关 2023-08-18 14:48:33 +08:00
18401019693
5da8855948 6.5.4礼物冠名 2023-08-18 14:17:46 +08:00
18401019693
348dca8474 6.5.4礼物冠名 2023-08-18 13:49:20 +08:00
18401019693
5afed0ee43 6.5.4礼物冠名 2023-08-18 11:04:21 +08:00
18401019693
d065726274 6.5.4礼物冠名 2023-08-17 18:20:53 +08:00
18401019693
8f9d558043 6.5.4礼物冠名 2023-08-17 18:15:25 +08:00
c594364574 调整关注逻辑 2023-08-17 17:17:06 +08:00
18401019693
68140c8a3a 6.5.4礼物冠名 2023-08-17 15:38:59 +08:00
5a4001c858 调整退出粉丝团逻辑 2023-08-17 13:45:40 +08:00
18401019693
d5953bd651 6.5.4礼物冠名 2023-08-17 13:19:04 +08:00
18401019693
17a2f5e091 6.5.4礼物冠名 2023-08-16 20:01:46 +08:00
18401019693
b2297b062e 6.5.4礼物冠名 2023-08-16 18:17:26 +08:00
b53472de28 調整文案 2023-08-16 17:32:29 +08:00
18401019693
9bce235817 6.5.4礼物冠名 2023-08-16 16:23:28 +08:00
18401019693
60ce5572cf 6.5.4礼物冠名 2023-08-16 15:37:07 +08:00
18401019693
3761cad653 6.5.4礼物冠名 2023-08-16 14:50:50 +08:00
18401019693
2a276503b5 6.5.4礼物冠名 2023-08-16 13:31:56 +08:00
fd0ad36a58 补充英文 2023-08-15 14:07:33 +08:00
41c8783b53 调整一处英文UI下字数过长问题 2023-08-15 14:00:36 +08:00
18401019693
7226add482 6.5.4礼物冠名 2023-08-15 11:29:39 +08:00
09e5f9b984 Merge remote-tracking branch 'origin/master' 2023-08-15 10:37:25 +08:00
83ee1f94df 修复一处闪退bug 2023-08-15 10:37:06 +08:00
18401019693
7e1b054a98 6.5.4礼物冠名 2023-08-14 21:05:15 +08:00
18401019693
9e0c437af5 6.5.4礼物冠名 2023-08-14 19:55:58 +08:00
18401019693
ad26ae7db8 6.5.4礼物冠名 2023-08-14 19:16:02 +08:00
18401019693
84230e517e 6.5.4礼物冠名 2023-08-14 18:40:25 +08:00
9818a1af74 新增关注的code提示 2023-08-14 18:05:55 +08:00
f91ba79c5c 新增关注的code提示 2023-08-14 17:54:27 +08:00
18401019693
0ea9ffc2e8 6.5.4礼物冠名 2023-08-14 17:40:52 +08:00
18401019693
defb5fdd02 6.5.4礼物冠名 2023-08-14 15:50:35 +08:00
b443fdd683 调整页面英文UI 2023-08-14 14:58:13 +08:00
18401019693
c11c66f56f 6.5.4礼物冠名 2023-08-14 13:47:09 +08:00
18401019693
a618bee6b7 6.5.4礼物冠名 2023-08-14 11:18:33 +08:00
399bedb874 调整购买守护页面英文UI 2023-08-14 10:57:38 +08:00
18401019693
3b6e2d47f4 6.5.4礼物冠名 2023-08-14 10:31:01 +08:00
18401019693
96daf73a5c 6.5.4礼物冠名 2023-08-14 10:16:06 +08:00
18401019693
55cbd0ff5b 6.5.4礼物冠名 2023-08-11 14:37:35 +08:00
18401019693
a3ab9ff03e 6.5.4礼物冠名 2023-08-11 14:19:15 +08:00
18401019693
92ed82ea2a 6.5.4礼物冠名 2023-08-11 13:59:54 +08:00
18401019693
6d262d0c94 6.5.4礼物冠名 2023-08-11 09:42:18 +08:00
18401019693
ce1174a88c 6.5.4礼物冠名 2023-08-10 17:40:57 +08:00
18401019693
2406e9bede 6.5.4礼物冠名 2023-08-10 17:38:06 +08:00
9b3a011499 修复英文say hi下格式问题#131 2023-08-10 17:25:53 +08:00
18401019693
7859e7cb29 6.5.4礼物冠名 2023-08-10 17:16:14 +08:00
18401019693
1fd36e3ba0 6.5.4礼物冠名 2023-08-10 17:04:26 +08:00
ec3722b7d0 新增粉丝团任务红点提示 2023-08-10 16:53:00 +08:00
18401019693
35917a5848 6.5.4礼物冠名 2023-08-10 15:40:13 +08:00
18401019693
7ea6bb570d 6.5.4礼物冠名 2023-08-10 14:20:40 +08:00
18401019693
43f95260e6 6.5.4礼物冠名 2023-08-10 13:51:49 +08:00
18142669586
54a4c0b590 Merge remote-tracking branch 'origin/master' 2023-08-10 11:15:31 +08:00
18142669586
2057a3575f 修改融云结束连麦还有对方画面的问题 2023-08-10 11:15:06 +08:00
18401019693
aa809ebaf4 6.5.4礼物冠名 2023-08-10 10:03:01 +08:00
18401019693
dffa71e346 6.5.4礼物冠名 2023-08-09 18:11:42 +08:00
18401019693
fea46aab1f 6.5.4礼物冠名 2023-08-09 17:05:51 +08:00
18401019693
e032e0807b 6.5.4礼物冠名 2023-08-09 14:38:33 +08:00
18401019693
24ed313f60 6.5.4礼物冠名 2023-08-09 14:15:03 +08:00
18142669586
02b70d559d Merge remote-tracking branch 'origin/master' 2023-08-09 14:14:11 +08:00
18142669586
7a26e81f67 修改融云合流不成功的问题,退出画面有问题 2023-08-09 14:13:52 +08:00
d07439efcf update 主播端点礼物墙按钮置灰 2023-08-09 13:53:16 +08:00
18401019693
7bca817633 6.5.4礼物冠名 2023-08-09 13:31:31 +08:00
18401019693
bad2b3689a 6.5.4礼物冠名 2023-08-09 11:01:28 +08:00
3cc9b90151 update 简繁 2023-08-09 10:24:13 +08:00
18401019693
e32e6f95b0 6.5.4礼物冠名 2023-08-08 17:09:35 +08:00
18401019693
2162645da1 6.5.4礼物冠名 2023-08-08 16:12:07 +08:00
18401019693
af17c85366 6.5.4礼物冠名 2023-08-08 16:08:43 +08:00
18401019693
20c00e2896 6.5.4礼物冠名 2023-08-08 15:37:11 +08:00
18401019693
44b95cb1c6 6.5.4礼物冠名 2023-08-08 14:50:13 +08:00
40e744a533 修复粉丝团包裹为空时会关掉对话框的情况 2023-08-08 13:32:42 +08:00
18401019693
82ccd2d89c 6.5.4礼物冠名 2023-08-08 11:37:19 +08:00
18401019693
994bd2a3aa 6.5.4礼物冠名 2023-08-08 09:34:15 +08:00
3ab91a74d1 修复礼物栏自定义数量过长导致的闪退问题 2023-08-07 18:26:45 +08:00
18142669586
d899975495 修改融云合流不成功的问题 2023-08-07 18:06:46 +08:00
dbbe753492 调整【围观】为繁体 2023-08-07 17:05:33 +08:00
18401019693
017320ac09 6.5.4礼物冠名 2023-08-07 16:29:02 +08:00
7ce0bb3a7c 修复#93测试问题 2023-08-07 15:18:34 +08:00
18401019693
a78d5b4aba 6.5.4礼物冠名 2023-08-07 14:50:29 +08:00
37fd1e9f47 调整粉丝团入场英文翻译 2023-08-07 14:39:35 +08:00
18401019693
97ad28ba62 6.5.4礼物冠名 2023-08-07 13:36:59 +08:00
3304e8f673 update 粉丝团 2023-08-05 18:04:36 +08:00
e7daabe588 Merge branch 'dev_6.5.4' 2023-08-05 16:53:13 +08:00
d912ad6119 update 粉丝团 2023-08-05 16:52:48 +08:00
18401019693
dfeb1c246b 6.5.4礼物冠名 2023-08-05 15:22:49 +08:00
18401019693
9588619b73 6.5.4礼物冠名 2023-08-04 16:54:28 +08:00
18401019693
6ba71508ca 6.5.4礼物冠名 2023-08-04 16:28:43 +08:00
c8f443c105 Merge branch 'master' into dev_6.5.4_tmp 2023-08-04 16:15:25 +08:00
18401019693
ebcfddf450 6.5.4礼物冠名 2023-08-04 16:14:36 +08:00
e43fb5e479 Merge branch 'master' into dev_6.5.4_tmp 2023-08-04 16:13:14 +08:00
18401019693
0c096dcafc 6.5.4礼物冠名 2023-08-04 15:59:20 +08:00
18401019693
545c69ff8b 6.5.4礼物冠名 2023-08-04 15:50:32 +08:00
bf8d88608d Merge branch 'master' into dev_6.5.4_tmp
# Conflicts:
#	common/src/main/java/com/yunbao/common/http/PDLiveApi.java
#	common/src/main/java/com/yunbao/common/http/live/LiveNetManager.java
#	common/src/main/java/com/yunbao/common/utils/JavascriptInterfaceUtils.java
#	common/src/main/res/values-en-rUS/string.xml
#	common/src/main/res/values-zh-rHK/strings.xml
#	common/src/main/res/values-zh-rTW/strings.xml
#	common/src/main/res/values-zh/strings.xml
#	common/src/main/res/values/strings.xml
#	live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java
2023-08-04 15:41:11 +08:00
18401019693
45c256cbbb 6.5.4礼物冠名 2023-08-04 15:18:06 +08:00
18401019693
fb1d6c0688 6.5.4礼物冠名 2023-08-04 14:58:26 +08:00
fe921e25bb update 粉丝团 2023-08-04 14:25:49 +08:00
18401019693
d5ca010ec7 6.5.4礼物冠名 2023-08-04 13:57:36 +08:00
18401019693
04259472a1 Merge remote-tracking branch 'origin/dev_gift_6.5.4' 2023-08-04 10:19:18 +08:00
18401019693
d6032a0a0a 6.5.4礼物冠名 2023-08-04 10:18:05 +08:00
18401019693
4a7790d968 6.5.4礼物冠名 2023-08-04 10:11:03 +08:00
18401019693
49810407ce 6.5.4礼物冠名 2023-08-04 09:47:42 +08:00
18401019693
fa086dc5cb 6.5.4礼物冠名 2023-08-03 17:54:14 +08:00
18401019693
3f8d6ed4af 6.5.4礼物冠名 2023-08-03 16:08:43 +08:00
18401019693
986902886a 6.5.4礼物冠名 2023-08-03 14:29:04 +08:00
18401019693
8ed7595aec 6.5.4礼物冠名 2023-08-02 17:47:00 +08:00
18401019693
b78fef6adc 6.5.4礼物冠名 2023-08-02 16:55:36 +08:00
fae0d01dc2 update 粉丝团 2023-08-02 15:48:51 +08:00
9a8bc0505d 修复#248问题 2023-08-02 15:08:11 +08:00
e31fa0310c 修复#250问题 2023-08-02 14:43:20 +08:00
2705342e18 修复#249问题 2023-08-02 14:39:56 +08:00
1bdf3a2ba3 修复#246问题 2023-08-02 14:20:47 +08:00
18401019693
5afa3bd30b 6.5.4礼物冠名 2023-08-02 13:23:37 +08:00
18401019693
54458bd0c0 6.5.4礼物冠名 2023-07-31 18:25:32 +08:00
c53b9a6064 update 粉丝团相关 2023-07-31 16:28:42 +08:00
92d4130c45 update 粉丝团相关 2023-07-28 10:01:41 +08:00
18401019693
a353e51ba8 6.5.4礼物栏优化 2023-07-25 15:25:01 +08:00
18401019693
0646f245b6 6.5.4礼物栏优化 2023-07-25 14:08:52 +08:00
7e3ca79a01 调整随机PK弹框UI 2023-07-21 14:19:20 +08:00
dfeb3a78c1 修复英文模式下,购买是守护文案超长问题 2023-07-21 13:34:31 +08:00
e32d450ca1 修复随机PK文案在英文模式下过长问题 2023-07-21 09:45:11 +08:00
f29766731c 修复#232问题 2023-07-20 18:12:09 +08:00
736592b4e1 新增头像选择界面 2023-07-19 18:30:32 +08:00
3108c898c2 Merge branch 'dev_6.5.4_头像优化' into dev_6.5.4_联系方式 2023-07-19 15:35:48 +08:00
dd2f3db16a 新增头像选择界面 2023-07-19 15:35:30 +08:00
8af231e526 新增头像选择界面 2023-07-19 13:07:27 +08:00
fdbbc3b224 修復紅點檢測 2023-07-19 10:25:11 +08:00
1e4b0bb536 补充信箱角标点亮和防抖 2023-07-18 18:09:27 +08:00
4729f93515 新增获取联系方式的弹框新样式 2023-07-18 15:40:15 +08:00
18401019693
3376a57f9d 6.5.4版本更新-“@”功能优化 2023-07-18 13:48:37 +08:00
18401019693
410fcb5895 修改json的版本号 2023-07-17 16:56:29 +08:00
18401019693
9b62ab6011 修改json的版本号 2023-07-17 16:42:51 +08:00
18401019693
62aa1d63df 修改json的版本号 2023-07-17 16:15:04 +08:00
18142669586
034f2dba5d Merge remote-tracking branch 'origin/master'
# Conflicts:
#	app/src/main/AndroidManifest.xml
#	config.gradle
2023-07-17 16:11:17 +08:00
18142669586
aee1d6cad4 修改上架 2023-07-17 16:10:29 +08:00
9b01ae4d82 修改用户协议地址 2023-07-17 15:18:47 +08:00
16f23519b1 移除百度语言残留内容 2023-07-17 13:35:59 +08:00
9bfed0bc7b 移除腾讯地图残留配置和代码 2023-07-17 10:16:24 +08:00
18401019693
bc0ed26377 修复 2023-07-14 13:13:25 +08:00
18401019693
0d14ce5aee 修复 2023-07-14 11:14:10 +08:00
18142669586
4a7423a5b9 修改全服 2023-07-14 10:43:14 +08:00
18401019693
0a4425d705 修复 2023-07-14 10:18:50 +08:00
387 changed files with 14800 additions and 1141 deletions

View File

@@ -99,7 +99,6 @@
android:preserveLegacyExternalStorage="true"
android:requestLegacyExternalStorage="true"
android:theme="@style/AppTheme"
android:usesCleartextTraffic="true"
tools:replace="theme,label,icon,allowBackup">
<!-- <service-->
<!-- android:name="com.shayu.phonelive.utils.MyNotificationService">-->
@@ -133,20 +132,7 @@
<data android:scheme="smvslm" />
</intent-filter>
</activity> <!-- keytool -exportcert -alias androiddebugkey -keystore feixiong.jks | openssl sha1 -binary | openssl base64 -->
<meta-data
android:name="TencentMapSDK"
android:value="${txMapAppKey}" />
<!-- 百度语音识别 -->
<meta-data
android:name="com.baidu.speech.APP_ID"
android:value="${baiduAppId}" />
<meta-data
android:name="com.baidu.speech.API_KEY"
android:value="${baiduAppKey}" />
<meta-data
android:name="com.baidu.speech.SECRET_KEY"
android:value="${baiduAppSecretKey}" />
</activity>
<!-- 服务器地址 -->
<meta-data
@@ -200,12 +186,12 @@
<action android:name="com.huawei.push.action.MESSAGING_EVENT" />
</intent-filter>
</service>
<meta-data
android:name="com.huawei.hms.client.appid"
android:value="106936673"/>
<meta-data
android:name="com.huawei.hms.client.cpid"
android:value="30086000612391734"/>
<!-- <meta-data-->
<!-- android:name="com.huawei.hms.client.appid"-->
<!-- android:value="106936673"/>-->
<!-- <meta-data-->
<!-- android:name="com.huawei.hms.client.cpid"-->
<!-- android:value="30086000612391734"/>-->
</application>
</manifest>

View File

@@ -19,6 +19,8 @@ import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.alibaba.android.arouter.launcher.ARouter;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.blankj.utilcode.util.Utils;
import com.facebook.appevents.AppEventsLogger;
import com.fm.openinstall.OpenInstall;
@@ -34,6 +36,7 @@ import com.yunbao.common.BuildConfig;
import com.yunbao.common.CommonAppConfig;
import com.yunbao.common.CommonAppContext;
import com.yunbao.common.Constants;
import com.yunbao.common.bean.AnchorStartLiveBean;
import com.yunbao.common.bean.CrashSaveBean;
import com.yunbao.common.manager.imrongcloud.InstructorSendReward;
import com.yunbao.common.manager.imrongcloud.InstructorSendRewardProvider;
@@ -44,6 +47,7 @@ import com.yunbao.common.utils.AppManager;
import com.yunbao.common.utils.L;
import com.yunbao.common.utils.SpUtil;
import com.yunbao.common.utils.ToastUtil;
import com.yunbao.live.socket.SocketReceiveBean;
import com.yunbao.live.socket.SocketRyClient;
import com.yunbao.live.utils.LiveImDeletUtil;
import com.yunbao.live.views.PortraitLiveManager;
@@ -131,12 +135,6 @@ public class AppContext extends CommonAppContext {
if (!isMainProcess()) {
return;
}
AppManager.runDebugCode(new Runnable() {
@Override
public void run() {
ToastUtil.show("Debug代码");
}
});
CrashSaveBean.getInstance().setStartTime(System.currentTimeMillis());
//注册全局异常捕获
registerError();
@@ -201,11 +199,16 @@ public class AppContext extends CommonAppContext {
&& (TextUtils.equals("__system__", message.getTargetId())
|| ("g" + PortraitLiveManager.liveID).contains(message.getTargetId()))) {
SocketRyClient.mSocketHandler.sendMessage(msg);
} else if (content.getContent().contains("LivePK_anchorStartLiveNotify")) {//开播通知
SocketReceiveBean received = JSON.parseObject(content.getContent(), SocketReceiveBean.class);
JSONObject map = received.getMsg().getJSONObject(0);
sendStartAnchorLive(map);
}
//主播页面
if (TextUtils.isEmpty(PortraitLiveManager.liveID) && SocketRyClient.mSocketHandler != null) {
SocketRyClient.mSocketHandler.sendMessage(msg);
}
} else if (message.getConversationType() == Conversation.ConversationType.PRIVATE) {//私聊信息
EventBus.getDefault().post(message);
}
@@ -215,6 +218,14 @@ public class AppContext extends CommonAppContext {
}
return false;
}
private void sendStartAnchorLive(JSONObject map) {
AnchorStartLiveBean bean = new AnchorStartLiveBean();
bean.setAnchorName(map.getString("anchorName"));
bean.setRoomId(map.getString("roomid"));
bean.setAvatar(map.getString("avatar"));
EventBus.getDefault().post(bean);
}
});
@@ -322,7 +333,7 @@ public class AppContext extends CommonAppContext {
}
private void setFirebaseCrashData() {
public static void setFirebaseCrashData() {
if (!CommonAppConfig.IS_UPLOAD_ERROR_LOG) {
return;
}

View File

@@ -8,11 +8,13 @@ import android.os.Looper;
import android.util.Log;
import android.widget.Toast;
import com.google.firebase.crashlytics.FirebaseCrashlytics;
import com.yunbao.common.BuildConfig;
import com.yunbao.common.bean.CrashSaveBean;
import com.yunbao.common.utils.AppManager;
import com.yunbao.common.utils.FileUtil;
import com.yunbao.common.utils.SpUtil;
import com.yunbao.common.utils.ToastUtil;
import java.io.File;
import java.io.PrintWriter;
@@ -105,7 +107,8 @@ public class NeverCrashUtils {
Log.e(TAG, "未捕获的主线程异常行为", e);
}
e.printStackTrace();
AppContext.setFirebaseCrashData();
FirebaseCrashlytics.getInstance().recordException(e);
AppManager.runDebugCode(() -> Toast.makeText(application, "发生闪退:" + e.getMessage(), Toast.LENGTH_SHORT).show());
FileUtil.saveStringToFile(new File(application.getDir("files", Context.MODE_PRIVATE).getAbsolutePath()), throwableToString(e), "error.log");
getMainCrashHandler().mainException(Looper.getMainLooper().getThread(), e);

View File

@@ -116,8 +116,8 @@ dependencies {
api rootProject.ext.dependencies["ucrop"]
//腾讯定位地图sdk
api files('libs/TencentLocationSdk_v6.2.5.3.jar')
api files('libs/TencentMapSDK_1.2.8.1.jar')
// api files('libs/TencentLocationSdk_v6.2.5.3.jar')
// api files('libs/TencentMapSDK_1.2.8.1.jar')
//下拉刷新上拉加载
api rootProject.ext.dependencies["smartRefreshLayout"]
@@ -194,5 +194,6 @@ dependencies {
//选择器
api 'com.github.gzu-liyujiang.AndroidPicker:Common:4.1.11'
api 'com.github.gzu-liyujiang.AndroidPicker:WheelView:4.1.11'
//自定义圆角图片
api 'com.makeramen:roundedimageview:2.3.0'
}

Binary file not shown.

View File

@@ -8,7 +8,7 @@ public class HtmlConfig {
//登录即代表同意服务和隐私条款
public static final String LOGIN_PRIVCAY = CommonAppConfig.HOST + "/index.php?g=portal&m=page&a=index&id=3";
public static final String LOGIN_PRIVCAY1 = CommonAppConfig.HOST + "/portal/page/index/id/59";
public static final String LOGIN_PRIVCAY1 = CommonAppConfig.HOST + "/index.php?g=Portal&m=Page&a=index&id=59";
//注册用户协议
public static final String REG_PRIVCAY1 = CommonAppConfig.HOST + "/index.php?g=portal&m=page&a=index&id=2";

View File

@@ -23,12 +23,16 @@ import android.widget.ProgressBar;
import androidx.annotation.RequiresApi;
import com.alibaba.fastjson.JSON;
import com.lxj.xpopup.XPopup;
import com.yunbao.common.CommonAppConfig;
import com.yunbao.common.CommonAppContext;
import com.yunbao.common.Constants;
import com.yunbao.common.R;
import com.yunbao.common.bean.LiveBean;
import com.yunbao.common.event.JavascriptInterfaceEvent;
import com.yunbao.common.event.LiveRoomChangeEvent;
import com.yunbao.common.http.LiveHttpUtil;
import com.yunbao.common.http.base.HttpCallback;
import com.yunbao.common.http.live.LiveNetManager;
import com.yunbao.common.manager.IMLoginManager;
@@ -39,10 +43,13 @@ import com.yunbao.common.utils.DeviceUtils;
import com.yunbao.common.utils.DpUtil;
import com.yunbao.common.utils.JavascriptInterfaceUtils;
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.ToastUtil;
import com.yunbao.common.views.HintCustomPopup;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;
@@ -253,7 +260,8 @@ public class WebViewActivity extends AbsActivity {
}
public static void forward(Context context, String url) {
forward(context, url, true); }
forward(context, url, true);
}
@Override
@@ -374,6 +382,44 @@ public class WebViewActivity extends AbsActivity {
}
}))
.show();
} else if (TextUtils.equals(event.getMethod(), "androidMethodLookToLive")) {
//看直播
gotoLive(event.getLiveId());
}
}
private void gotoLive(final String live_id) {
LiveHttpUtil.getLiveInfo(live_id, new com.yunbao.common.http.HttpCallback() {
@Override
public void onSuccess(int code, String msg, String[] info) {
if (code == 0 && info.length > 0) {
LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class);
new LiveRoomCheckLivePresenter(mContext, liveBean.getUid(), liveBean.getStream(), new LiveRoomCheckLivePresenter.NewActionListener() {
@Override
public void onLiveRoomChanged(String liveUid, String stream, int liveType, String liveTypeVal, String liveSdk) {
if (liveBean == null) {
return;
}
if (MicStatusManager.getInstance().isMic(liveUid)) {
MicStatusManager.getInstance().showDownMicDialog(mContext);
return;
}
EventBus.getDefault().post(new LiveRoomChangeEvent(liveBean, liveType, Integer.parseInt(liveTypeVal)).setLiveEnd(true));
finish();
}
@Override
public void onCheckError(String contextError) {
}
});
} else {
RouteUtil.forwardUserHome(mContext, live_id, 0);
}
}
});
}
}

View File

@@ -0,0 +1,41 @@
package com.yunbao.common.adapter;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import com.yunbao.common.R;
import com.yunbao.common.bean.UserMedalModel;
import com.yunbao.common.views.AchievementDetailsViewHolder;
import java.util.ArrayList;
import java.util.List;
public class AchievementDetailsAdapter extends RecyclerView.Adapter {
private List<UserMedalModel> dressInfo = new ArrayList<>();
public AchievementDetailsAdapter(List<UserMedalModel> dressInfo) {
this.dressInfo = dressInfo;
}
@NonNull
@Override
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View herdView = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_achievement_details, parent, false);
return new AchievementDetailsViewHolder(herdView);
}
@Override
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
AchievementDetailsViewHolder achievementDetailsViewHolder = (AchievementDetailsViewHolder) holder;
achievementDetailsViewHolder.showData(dressInfo.get(position));
}
@Override
public int getItemCount() {
return dressInfo.size();
}
}

View File

@@ -0,0 +1,48 @@
package com.yunbao.common.adapter;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import com.yunbao.common.R;
import com.yunbao.common.bean.GiftWallModel;
import com.yunbao.common.views.GiftAlreadyWallViewHolder;
import java.util.ArrayList;
import java.util.List;
public class GiftAlreadyWallAdapter extends RecyclerView.Adapter {
private List<GiftWallModel> giftWall = new ArrayList<>();
private boolean sbWy;//是否正在直播
public GiftAlreadyWallAdapter(boolean sbWy) {
this.sbWy = sbWy;
}
@NonNull
@Override
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View herdView = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_gift_already_wall, parent, false);
return new GiftAlreadyWallViewHolder(herdView);
}
@Override
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
GiftAlreadyWallViewHolder withoutWallViewHolder = (GiftAlreadyWallViewHolder) holder;
withoutWallViewHolder.showData(giftWall.get(position), sbWy);
}
@Override
public int getItemCount() {
return giftWall.size();
}
public void addAllData(List<GiftWallModel> mGiftWall) {
giftWall.clear();
giftWall.addAll(mGiftWall);
notifyDataSetChanged();
}
}

View File

@@ -0,0 +1,40 @@
package com.yunbao.common.adapter;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import com.yunbao.common.R;
import com.yunbao.common.bean.GiftQuantityModel;
import com.yunbao.common.views.GiftNumber;
import java.util.List;
public class GiftNumberAdapter extends RecyclerView.Adapter {
private List<GiftQuantityModel> giftQuantityModels;
public GiftNumberAdapter(List<GiftQuantityModel> giftQuantityModels) {
this.giftQuantityModels = giftQuantityModels;
}
@NonNull
@Override
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View robotSayHelloView = LayoutInflater.from(parent.getContext()).inflate(R.layout.view_gift_number, parent, false);
return new GiftNumber(robotSayHelloView);
}
@Override
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
GiftNumber giftNumber = (GiftNumber) holder;
giftNumber.showData(giftQuantityModels.get(position));
}
@Override
public int getItemCount() {
return giftQuantityModels.size();
}
}

View File

@@ -0,0 +1,43 @@
package com.yunbao.common.adapter;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import com.yunbao.common.R;
import com.yunbao.common.bean.GiftWallModel;
import com.yunbao.common.views.GiftWithoutWallViewHolder;
import java.util.ArrayList;
import java.util.List;
public class GiftWithoutWallAdapter extends RecyclerView.Adapter {
private List<GiftWallModel> giftWall = new ArrayList<>();
@NonNull
@Override
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View herdView = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_gift_without_wall, parent, false);
return new GiftWithoutWallViewHolder(herdView);
}
@Override
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
GiftWithoutWallViewHolder withoutWallViewHolder = (GiftWithoutWallViewHolder) holder;
withoutWallViewHolder.showData(giftWall.get(position));
}
@Override
public int getItemCount() {
return giftWall.size();
}
public void addAllData(List<GiftWallModel> mGiftWall) {
giftWall.clear();
giftWall.addAll(mGiftWall);
notifyDataSetChanged();
}
}

View File

@@ -1,5 +1,6 @@
package com.yunbao.common.adapter;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@@ -11,6 +12,7 @@ import com.yunbao.common.R;
import com.yunbao.common.bean.WishModel;
import com.yunbao.common.event.LiveNewWishListCloseEvent;
import com.yunbao.common.utils.Bus;
import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.views.DayWishItemViewHolder;
import com.yunbao.common.views.LunarWishItemViewHolder;
import com.yunbao.common.views.SeasonalWishItemViewHolder;
@@ -46,8 +48,20 @@ public class LiveNewWishAdapter extends RecyclerView.Adapter {
Bus.get().post(new LiveNewWishListCloseEvent().setSeasonalWish(true));
break;
}
boolean isAdd = false;
for (int i = 0; i < wishList.size(); i++) {
if (wishList.get(i)!=null){
if (!TextUtils.isEmpty(wishList.get(i).getLid()) && !TextUtils.isEmpty(model.getLid())
&& TextUtils.equals(wishList.get(i).getLid(), model.getLid())) {
ToastUtil.show(R.string.too_many_gifts);
isAdd = true;
}
}
wishList.add(0, model);
}
if (!isAdd) {
wishList.add(0, model);
}
notifyDataSetChanged();
}

View File

@@ -0,0 +1,44 @@
package com.yunbao.common.adapter;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import com.yunbao.common.R;
import com.yunbao.common.bean.UserMedalListModel;
import com.yunbao.common.views.MedalAchievementViewHolder;
import java.util.ArrayList;
import java.util.List;
public class MedalAchievementAdapter extends RecyclerView.Adapter {
private List<UserMedalListModel> medalData = new ArrayList<>();
@NonNull
@Override
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View herdView = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_medal_achievement, parent, false);
return new MedalAchievementViewHolder(herdView);
}
@Override
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
MedalAchievementViewHolder achievementViewHolder = (MedalAchievementViewHolder) holder;
achievementViewHolder.showData(medalData.get(position));
}
@Override
public int getItemCount() {
return medalData.size();
}
public void addAllData(List<UserMedalListModel> mGiftWall) {
medalData.clear();
medalData.addAll(mGiftWall);
notifyDataSetChanged();
}
}

View File

@@ -0,0 +1,43 @@
package com.yunbao.common.adapter;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import com.yunbao.common.R;
import com.yunbao.common.bean.GiftWallModel;
import com.yunbao.common.views.MonthGiftNamingViewHolder;
import java.util.ArrayList;
import java.util.List;
public class MonthGiftNamingAdapter extends RecyclerView.Adapter {
private List<GiftWallModel> giftWall = new ArrayList<>();
@NonNull
@Override
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View herdView = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_month_gift_naming, parent, false);
return new MonthGiftNamingViewHolder(herdView);
}
@Override
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
MonthGiftNamingViewHolder monthGiftNamingViewHolder = (MonthGiftNamingViewHolder) holder;
monthGiftNamingViewHolder.showData(giftWall.get(position));
}
@Override
public int getItemCount() {
return giftWall.size();
}
public void addAllData(List<GiftWallModel> mGiftWall) {
giftWall.clear();
giftWall.addAll(mGiftWall);
notifyDataSetChanged();
}
}

View File

@@ -0,0 +1,31 @@
package com.yunbao.common.bean;
public class AnchorStartLiveBean extends BaseModel{
private String anchorName;
private String avatar;
private String roomId;
public String getAnchorName() {
return anchorName;
}
public void setAnchorName(String anchorName) {
this.anchorName = anchorName;
}
public String getAvatar() {
return avatar;
}
public void setAvatar(String avatar) {
this.avatar = avatar;
}
public String getRoomId() {
return roomId;
}
public void setRoomId(String roomId) {
this.roomId = roomId;
}
}

View File

@@ -109,6 +109,29 @@ public class EnterRoomInfoModel extends BaseModel {
@SerializedName("red_packet")
private RedPacketModel redPacketModel;
@SerializedName("gift_wall_lighten_number")
private String giftWallLightenNumber;
@SerializedName("gift_wall_lighten_total")
private String giftWallLightenTotal;
public String getGiftWallLightenNumber() {
return giftWallLightenNumber;
}
public EnterRoomInfoModel setGiftWallLightenNumber(String giftWallLightenNumber) {
this.giftWallLightenNumber = giftWallLightenNumber;
return this;
}
public String getGiftWallLightenTotal() {
return giftWallLightenTotal;
}
public EnterRoomInfoModel setGiftWallLightenTotal(String giftWallLightenTotal) {
this.giftWallLightenTotal = giftWallLightenTotal;
return this;
}
public RedPacketModel getRedPacketModel() {
return redPacketModel;
}

View File

@@ -0,0 +1,19 @@
package com.yunbao.common.bean;
import com.google.gson.annotations.SerializedName;
public class FansCheckRed extends BaseModel{
@SerializedName("fans_level_upgrade_status")
private int status;
public FansCheckRed() {
}
public int getStatus() {
return status;
}
public void setStatus(int status) {
this.status = status;
}
}

View File

@@ -0,0 +1,81 @@
package com.yunbao.common.bean;
import com.google.gson.annotations.SerializedName;
public class FansGroupGiftPack extends BaseModel{
@SerializedName("id")
private int id;
@SerializedName("quantity")
private int quantity;
@SerializedName("end_time")
private String endTime;
@SerializedName("giftname")
private String giftName;
@SerializedName("needcoin")
private String needCoin;
@SerializedName("gifticon")
private String icon;
public FansGroupGiftPack() {
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public int getQuantity() {
return quantity;
}
public void setQuantity(int quantity) {
this.quantity = quantity;
}
public String getEndTime() {
return endTime;
}
public void setEndTime(String endTime) {
this.endTime = endTime;
}
public String getGiftName() {
return giftName;
}
public void setGiftName(String giftName) {
this.giftName = giftName;
}
public String getNeedCoin() {
return needCoin;
}
public void setNeedCoin(String needCoin) {
this.needCoin = needCoin;
}
public String getIcon() {
return icon;
}
public void setIcon(String icon) {
this.icon = icon;
}
@Override
public String toString() {
return "FansGroupGiftPack{" +
"id=" + id +
", quantity=" + quantity +
", endTime='" + endTime + '\'' +
", giftName='" + giftName + '\'' +
", needCoin='" + needCoin + '\'' +
", icon='" + icon + '\'' +
'}';
}
}

View File

@@ -0,0 +1,161 @@
package com.yunbao.common.bean;
import com.google.gson.annotations.SerializedName;
import java.util.List;
public class FansGroupGiftPackInfo extends BaseModel {
@SerializedName("id")
private int id;
@SerializedName("pack_name")
private String packName;
@SerializedName("description")
private String description;
@SerializedName("coin")
private String coin;
@SerializedName("data")
private List<Gift> data;
public FansGroupGiftPackInfo() {
}
public String getPackName() {
return packName;
}
public void setPackName(String packName) {
this.packName = packName;
}
public int getId() {
return id;
}
public String getCoin() {
return coin;
}
public void setCoin(String coin) {
this.coin = coin;
}
public void setId(int id) {
this.id = id;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public List<Gift> getData() {
return data;
}
public void setData(List<Gift> data) {
this.data = data;
}
@Override
public String toString() {
return "FansGroupGiftPackInfo{" +
"id=" + id +
", packName='" + packName + '\'' +
", description='" + description + '\'' +
", coin='" + coin + '\'' +
", data=" + data +
'}';
}
public static class Gift {
@SerializedName("id")
private int id;
@SerializedName("name")
private String giftName;
@SerializedName("needcoin")
private String needCoin;
@SerializedName("src")
private String giftIcon;
@SerializedName("quantity")
private String quantity;
@SerializedName("restrict")
private int restrict;
@SerializedName("type")
private int type;
public Gift() {
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getGiftName() {
return giftName;
}
public void setGiftName(String giftName) {
this.giftName = giftName;
}
public String getNeedCoin() {
return needCoin;
}
public void setNeedCoin(String needCoin) {
this.needCoin = needCoin;
}
public String getGiftIcon() {
return giftIcon;
}
public void setGiftIcon(String giftIcon) {
this.giftIcon = giftIcon;
}
public String getQuantity() {
return quantity;
}
public void setQuantity(String quantity) {
this.quantity = quantity;
}
public int getRestrict() {
return restrict;
}
public void setRestrict(int restrict) {
this.restrict = restrict;
}
public int getType() {
return type;
}
public void setType(int type) {
this.type = type;
}
@Override
public String toString() {
return "Gift{" +
"id=" + id +
", giftName='" + giftName + '\'' +
", needCoin='" + needCoin + '\'' +
", giftIcon='" + giftIcon + '\'' +
", quantity='" + quantity + '\'' +
", restrict='" + restrict + '\'' +
", type=" + type +
'}';
}
}
}

View File

@@ -0,0 +1,57 @@
package com.yunbao.common.bean;
import com.google.gson.annotations.SerializedName;
public class FansModel extends BaseModel {
@SerializedName("levelid")
private int levelid;
@SerializedName("thumb")
private String thumb;
@SerializedName("colour")
private String colour;
@SerializedName("thumb_mark")
private String thumbMark;
@SerializedName("bg")
private String bg;
public int getLevelid() {
return levelid;
}
public void setLevelid(int levelid) {
this.levelid = levelid;
}
public String getThumb() {
return thumb;
}
public void setThumb(String thumb) {
this.thumb = thumb;
}
public String getColour() {
return colour;
}
public void setColour(String colour) {
this.colour = colour;
}
public String getThumbMark() {
return thumbMark;
}
public void setThumbMark(String thumbMark) {
this.thumbMark = thumbMark;
}
public String getBg() {
return bg;
}
public void setBg(String bg) {
this.bg = bg;
}
}

View File

@@ -0,0 +1,44 @@
package com.yunbao.common.bean;
import com.google.gson.annotations.SerializedName;
import java.util.List;
/**
* 礼物墙已点亮
*/
public class GiftAlreadyWallModel extends BaseModel {
@SerializedName("gift_wall")
private List<GiftWallModel> giftWall;
@SerializedName("gift_wall_lighten_number")
private String giftWallLightenNumber;
@SerializedName("gift_wall_lighten_total")
private String giftWallLightenTotal;
public List<GiftWallModel> getGiftWall() {
return giftWall;
}
public GiftAlreadyWallModel setGiftWall(List<GiftWallModel> giftWall) {
this.giftWall = giftWall;
return this;
}
public String getGiftWallLightenNumber() {
return giftWallLightenNumber;
}
public GiftAlreadyWallModel setGiftWallLightenNumber(String giftWallLightenNumber) {
this.giftWallLightenNumber = giftWallLightenNumber;
return this;
}
public String getGiftWallLightenTotal() {
return giftWallLightenTotal;
}
public GiftAlreadyWallModel setGiftWallLightenTotal(String giftWallLightenTotal) {
this.giftWallLightenTotal = giftWallLightenTotal;
return this;
}
}

View File

@@ -0,0 +1,119 @@
package com.yunbao.common.bean;
import com.google.gson.annotations.SerializedName;
import java.util.List;
public class GiftGuideModel extends BaseModel {
@SerializedName("guide_name")
private String guideName;
@SerializedName("illuminate_count")
private int illuminateCount;
@SerializedName("already_font")
private String alreadyFont;
@SerializedName("without_font")
private String withoutFont;
@SerializedName("number")
private String number;
@SerializedName("illuminate_total")
private int illuminateTotal;
@SerializedName("week_number")
private String weekNumber;
@SerializedName("guide_name_img_path")
private String guideNameImgPath;
@SerializedName("guide_background_picture_path")
private String guideBackgroundPicturePath;
@SerializedName("gift_data")
private List<GiftWallModel> giftData;
public String getAlreadyFont() {
return alreadyFont;
}
public GiftGuideModel setAlreadyFont(String alreadyFont) {
this.alreadyFont = alreadyFont;
return this;
}
public String getWithoutFont() {
return withoutFont;
}
public GiftGuideModel setWithoutFont(String withoutFont) {
this.withoutFont = withoutFont;
return this;
}
public String getNumber() {
return number;
}
public GiftGuideModel setNumber(String number) {
this.number = number;
return this;
}
public int getIlluminateTotal() {
return illuminateTotal;
}
public GiftGuideModel setIlluminateTotal(int illuminateTotal) {
this.illuminateTotal = illuminateTotal;
return this;
}
public String getWeekNumber() {
return weekNumber;
}
public GiftGuideModel setWeekNumber(String weekNumber) {
this.weekNumber = weekNumber;
return this;
}
public String getGuideNameImgPath() {
return guideNameImgPath;
}
public GiftGuideModel setGuideNameImgPath(String guideNameImgPath) {
this.guideNameImgPath = guideNameImgPath;
return this;
}
public String getGuideBackgroundPicturePath() {
return guideBackgroundPicturePath;
}
public GiftGuideModel setGuideBackgroundPicturePath(String guideBackgroundPicturePath) {
this.guideBackgroundPicturePath = guideBackgroundPicturePath;
return this;
}
public String getGuideName() {
return guideName;
}
public GiftGuideModel setGuideName(String guideName) {
this.guideName = guideName;
return this;
}
public int getIlluminateCount() {
return illuminateCount;
}
public GiftGuideModel setIlluminateCount(int illuminateCount) {
this.illuminateCount = illuminateCount;
return this;
}
public List<GiftWallModel> getGiftData() {
return giftData;
}
public GiftGuideModel setGiftData(List<GiftWallModel> giftData) {
this.giftData = giftData;
return this;
}
}

View File

@@ -0,0 +1,359 @@
package com.yunbao.common.bean;
import com.google.gson.annotations.SerializedName;
public class GiftNamingInfoModel extends BaseModel {
@SerializedName("id")
private String id;
@SerializedName("sendtype")
private String sendtype;
@SerializedName("type")
private String type;
@SerializedName("name")
private String name;
@SerializedName("release_status")
private String releaseStatus;
@SerializedName("type_sort")
private String typeSort;
@SerializedName("operate_image")
private String operateImage;
@SerializedName("operate_url")
private String operateUrl;
@SerializedName("mark")
private String mark;
@SerializedName("giftname")
private String giftname;
@SerializedName("needcoin")
private String needcoin;
@SerializedName("gifticon")
private String gifticon;
@SerializedName("gift_description")
private String giftDescription;
@SerializedName("corner_mark")
private String cornerMark;
@SerializedName("swf")
private String swf;
@SerializedName("gift_uid")
private String giftUid;
@SerializedName("type_start_time")
private String typeStartTime;
@SerializedName("type_end_time")
private String typeEndTime;
@SerializedName("gift_start_time")
private String giftStartTime;
@SerializedName("gift_end_time")
private String giftEndTime;
@SerializedName("naming_liveuid")
private String namingLiveuid;
@SerializedName("naming_uid")
private String namingUid;
@SerializedName("naming_live_name")
private String namingLiveName;
@SerializedName("naming_user_name")
private String namingUserName;
@SerializedName("naming_live_avatar")
private String namingLiveAvatar;
@SerializedName("naming_user_avatar")
private String namingUserAvatar;
@SerializedName("naming_status")
private String namingStatus;
@SerializedName("naming_coin")
private String namingCoin;
@SerializedName("fans_level")
private String fansLevel;
@SerializedName("naming_user_coin")
private String namingUserCoin;
@SerializedName("naming_live_coin")
private String namingLiveCoin;
@SerializedName("isweek")
private String isweek;
public String getId() {
return id;
}
public GiftNamingInfoModel setId(String id) {
this.id = id;
return this;
}
public String getSendtype() {
return sendtype;
}
public GiftNamingInfoModel setSendtype(String sendtype) {
this.sendtype = sendtype;
return this;
}
public String getType() {
return type;
}
public GiftNamingInfoModel setType(String type) {
this.type = type;
return this;
}
public String getName() {
return name;
}
public GiftNamingInfoModel setName(String name) {
this.name = name;
return this;
}
public String getReleaseStatus() {
return releaseStatus;
}
public GiftNamingInfoModel setReleaseStatus(String releaseStatus) {
this.releaseStatus = releaseStatus;
return this;
}
public String getTypeSort() {
return typeSort;
}
public GiftNamingInfoModel setTypeSort(String typeSort) {
this.typeSort = typeSort;
return this;
}
public String getOperateImage() {
return operateImage;
}
public GiftNamingInfoModel setOperateImage(String operateImage) {
this.operateImage = operateImage;
return this;
}
public String getOperateUrl() {
return operateUrl;
}
public GiftNamingInfoModel setOperateUrl(String operateUrl) {
this.operateUrl = operateUrl;
return this;
}
public String getMark() {
return mark;
}
public GiftNamingInfoModel setMark(String mark) {
this.mark = mark;
return this;
}
public String getGiftname() {
return giftname;
}
public GiftNamingInfoModel setGiftname(String giftname) {
this.giftname = giftname;
return this;
}
public String getNeedcoin() {
return needcoin;
}
public GiftNamingInfoModel setNeedcoin(String needcoin) {
this.needcoin = needcoin;
return this;
}
public String getGifticon() {
return gifticon;
}
public GiftNamingInfoModel setGifticon(String gifticon) {
this.gifticon = gifticon;
return this;
}
public String getGiftDescription() {
return giftDescription;
}
public GiftNamingInfoModel setGiftDescription(String giftDescription) {
this.giftDescription = giftDescription;
return this;
}
public String getCornerMark() {
return cornerMark;
}
public GiftNamingInfoModel setCornerMark(String cornerMark) {
this.cornerMark = cornerMark;
return this;
}
public String getSwf() {
return swf;
}
public GiftNamingInfoModel setSwf(String swf) {
this.swf = swf;
return this;
}
public String getGiftUid() {
return giftUid;
}
public GiftNamingInfoModel setGiftUid(String giftUid) {
this.giftUid = giftUid;
return this;
}
public String getTypeStartTime() {
return typeStartTime;
}
public GiftNamingInfoModel setTypeStartTime(String typeStartTime) {
this.typeStartTime = typeStartTime;
return this;
}
public String getTypeEndTime() {
return typeEndTime;
}
public GiftNamingInfoModel setTypeEndTime(String typeEndTime) {
this.typeEndTime = typeEndTime;
return this;
}
public String getGiftStartTime() {
return giftStartTime;
}
public GiftNamingInfoModel setGiftStartTime(String giftStartTime) {
this.giftStartTime = giftStartTime;
return this;
}
public String getGiftEndTime() {
return giftEndTime;
}
public GiftNamingInfoModel setGiftEndTime(String giftEndTime) {
this.giftEndTime = giftEndTime;
return this;
}
public String getNamingLiveuid() {
return namingLiveuid;
}
public GiftNamingInfoModel setNamingLiveuid(String namingLiveuid) {
this.namingLiveuid = namingLiveuid;
return this;
}
public String getNamingUid() {
return namingUid;
}
public GiftNamingInfoModel setNamingUid(String namingUid) {
this.namingUid = namingUid;
return this;
}
public String getNamingLiveName() {
return namingLiveName;
}
public GiftNamingInfoModel setNamingLiveName(String namingLiveName) {
this.namingLiveName = namingLiveName;
return this;
}
public String getNamingUserName() {
return namingUserName;
}
public GiftNamingInfoModel setNamingUserName(String namingUserName) {
this.namingUserName = namingUserName;
return this;
}
public String getNamingLiveAvatar() {
return namingLiveAvatar;
}
public GiftNamingInfoModel setNamingLiveAvatar(String namingLiveAvatar) {
this.namingLiveAvatar = namingLiveAvatar;
return this;
}
public String getNamingUserAvatar() {
return namingUserAvatar;
}
public GiftNamingInfoModel setNamingUserAvatar(String namingUserAvatar) {
this.namingUserAvatar = namingUserAvatar;
return this;
}
public String getNamingStatus() {
return namingStatus;
}
public GiftNamingInfoModel setNamingStatus(String namingStatus) {
this.namingStatus = namingStatus;
return this;
}
public String getNamingCoin() {
return namingCoin;
}
public GiftNamingInfoModel setNamingCoin(String namingCoin) {
this.namingCoin = namingCoin;
return this;
}
public String getFansLevel() {
return fansLevel;
}
public GiftNamingInfoModel setFansLevel(String fansLevel) {
this.fansLevel = fansLevel;
return this;
}
public String getNamingUserCoin() {
return namingUserCoin;
}
public GiftNamingInfoModel setNamingUserCoin(String namingUserCoin) {
this.namingUserCoin = namingUserCoin;
return this;
}
public String getNamingLiveCoin() {
return namingLiveCoin;
}
public GiftNamingInfoModel setNamingLiveCoin(String namingLiveCoin) {
this.namingLiveCoin = namingLiveCoin;
return this;
}
public String getIsweek() {
return isweek;
}
public GiftNamingInfoModel setIsweek(String isweek) {
this.isweek = isweek;
return this;
}
}

View File

@@ -0,0 +1,43 @@
package com.yunbao.common.bean;
import com.google.gson.annotations.SerializedName;
/**
* 礼物选择数量
*/
public class GiftQuantityModel extends BaseModel {
@SerializedName("id")
private String id;
@SerializedName("gift_quantity")
private String giftQuantity;
@SerializedName("font_colour")
private String fontColour;
public String getId() {
return id;
}
public GiftQuantityModel setId(String id) {
this.id = id;
return this;
}
public String getGiftQuantity() {
return giftQuantity;
}
public GiftQuantityModel setGiftQuantity(String giftQuantity) {
this.giftQuantity = giftQuantity;
return this;
}
public String getFontColour() {
return fontColour;
}
public GiftQuantityModel setFontColour(String fontColour) {
this.fontColour = fontColour;
return this;
}
}

View File

@@ -0,0 +1,54 @@
package com.yunbao.common.bean;
import com.google.gson.annotations.SerializedName;
public class GiftWallGiftDetail extends BaseModel {
@SerializedName("uid")
private int uid;
@SerializedName("user_nicename")
private String userNicename;
@SerializedName("avatar")
private String avatar;
@SerializedName("naming_coin")
private String namingCoin;
public int getUid() {
return uid;
}
public GiftWallGiftDetail setUid(int uid) {
this.uid = uid;
return this;
}
public String getUserNicename() {
if (userNicename.length() > 5) {
userNicename = userNicename.substring(0, 5) + "...";
}
return userNicename;
}
public GiftWallGiftDetail setUserNicename(String userNicename) {
this.userNicename = userNicename;
return this;
}
public String getAvatar() {
return avatar;
}
public GiftWallGiftDetail setAvatar(String avatar) {
this.avatar = avatar;
return this;
}
public String getNamingCoin() {
return namingCoin;
}
public GiftWallGiftDetail setNamingCoin(String namingCoin) {
this.namingCoin = namingCoin;
return this;
}
}

View File

@@ -0,0 +1,392 @@
package com.yunbao.common.bean;
import com.google.gson.annotations.SerializedName;
public class GiftWallModel extends BaseModel {
@SerializedName("id")
private String id;
@SerializedName("sendtype")
private String sendtype;
@SerializedName("type")
private String type;
@SerializedName("name")
private String name;
@SerializedName("release_status")
private String releaseStatus;
@SerializedName("type_sort")
private String typeSort;
@SerializedName("operate_image")
private String operateImage;
@SerializedName("operate_url")
private String operateUrl;
@SerializedName("mark")
private String mark;
@SerializedName("giftname")
private String giftname;
@SerializedName("needcoin")
private String needcoin;
@SerializedName("gifticon")
private String gifticon;
@SerializedName("gift_description")
private String giftDescription;
@SerializedName("corner_mark")
private String cornerMark;
@SerializedName("swf")
private String swf;
@SerializedName("gift_uid")
private String giftUid;
@SerializedName("type_start_time")
private String typeStartTime;
@SerializedName("type_end_time")
private String typeEndTime;
@SerializedName("gift_start_time")
private String giftStartTime;
@SerializedName("gift_end_time")
private String giftEndTime;
@SerializedName("naming_liveuid")
private String namingLiveuid;
@SerializedName("naming_uid")
private String namingUid;
@SerializedName("naming_live_name")
private String namingLiveName;
@SerializedName("naming_user_name")
private String namingUserName;
@SerializedName("naming_live_avatar")
private String namingLiveAvatar;
@SerializedName("naming_user_avatar")
private String namingUserAvatar;
@SerializedName("naming_status")
private String namingStatus;
@SerializedName("naming_coin")
private String namingCoin;
@SerializedName("gifticon_total")
private String gifticonTotal;
@SerializedName("gift_count_number")
private String giftCountNumber;
@SerializedName("user_nicename")
private String userNicename;
@SerializedName("avatar")
private String avatar;
@SerializedName("naming_coin_max")
private String namingCoinMax;
@SerializedName("illuminate_status")
private int illuminateStatus;
@SerializedName("font_color")
private String fontColor;
public String getFontColor() {
return fontColor;
}
public GiftWallModel setFontColor(String fontColor) {
this.fontColor = fontColor;
return this;
}
public int getIlluminateStatus() {
return illuminateStatus;
}
public GiftWallModel setIlluminateStatus(int illuminateStatus) {
this.illuminateStatus = illuminateStatus;
return this;
}
public String getNamingCoinMax() {
return namingCoinMax;
}
public GiftWallModel setNamingCoinMax(String namingCoinMax) {
this.namingCoinMax = namingCoinMax;
return this;
}
public String getAvatar() {
return avatar;
}
public GiftWallModel setAvatar(String avatar) {
this.avatar = avatar;
return this;
}
public String getUserNicename() {
return userNicename;
}
public GiftWallModel setUserNicename(String userNicename) {
this.userNicename = userNicename;
return this;
}
public String getId() {
return id;
}
public GiftWallModel setId(String id) {
this.id = id;
return this;
}
public String getSendtype() {
return sendtype;
}
public GiftWallModel setSendtype(String sendtype) {
this.sendtype = sendtype;
return this;
}
public String getType() {
return type;
}
public GiftWallModel setType(String type) {
this.type = type;
return this;
}
public String getName() {
return name;
}
public GiftWallModel setName(String name) {
this.name = name;
return this;
}
public String getReleaseStatus() {
return releaseStatus;
}
public GiftWallModel setReleaseStatus(String releaseStatus) {
this.releaseStatus = releaseStatus;
return this;
}
public String getTypeSort() {
return typeSort;
}
public GiftWallModel setTypeSort(String typeSort) {
this.typeSort = typeSort;
return this;
}
public String getOperateImage() {
return operateImage;
}
public GiftWallModel setOperateImage(String operateImage) {
this.operateImage = operateImage;
return this;
}
public String getOperateUrl() {
return operateUrl;
}
public GiftWallModel setOperateUrl(String operateUrl) {
this.operateUrl = operateUrl;
return this;
}
public String getMark() {
return mark;
}
public GiftWallModel setMark(String mark) {
this.mark = mark;
return this;
}
public String getGiftname() {
return giftname;
}
public GiftWallModel setGiftname(String giftname) {
this.giftname = giftname;
return this;
}
public String getNeedcoin() {
return needcoin;
}
public GiftWallModel setNeedcoin(String needcoin) {
this.needcoin = needcoin;
return this;
}
public String getGifticon() {
return gifticon;
}
public GiftWallModel setGifticon(String gifticon) {
this.gifticon = gifticon;
return this;
}
public String getGiftDescription() {
return giftDescription;
}
public GiftWallModel setGiftDescription(String giftDescription) {
this.giftDescription = giftDescription;
return this;
}
public String getCornerMark() {
return cornerMark;
}
public GiftWallModel setCornerMark(String cornerMark) {
this.cornerMark = cornerMark;
return this;
}
public String getSwf() {
return swf;
}
public GiftWallModel setSwf(String swf) {
this.swf = swf;
return this;
}
public String getGiftUid() {
return giftUid;
}
public GiftWallModel setGiftUid(String giftUid) {
this.giftUid = giftUid;
return this;
}
public String getTypeStartTime() {
return typeStartTime;
}
public GiftWallModel setTypeStartTime(String typeStartTime) {
this.typeStartTime = typeStartTime;
return this;
}
public String getTypeEndTime() {
return typeEndTime;
}
public GiftWallModel setTypeEndTime(String typeEndTime) {
this.typeEndTime = typeEndTime;
return this;
}
public String getGiftStartTime() {
return giftStartTime;
}
public GiftWallModel setGiftStartTime(String giftStartTime) {
this.giftStartTime = giftStartTime;
return this;
}
public String getGiftEndTime() {
return giftEndTime;
}
public GiftWallModel setGiftEndTime(String giftEndTime) {
this.giftEndTime = giftEndTime;
return this;
}
public String getNamingLiveuid() {
return namingLiveuid;
}
public GiftWallModel setNamingLiveuid(String namingLiveuid) {
this.namingLiveuid = namingLiveuid;
return this;
}
public String getNamingUid() {
return namingUid;
}
public GiftWallModel setNamingUid(String namingUid) {
this.namingUid = namingUid;
return this;
}
public String getNamingLiveName() {
return namingLiveName;
}
public GiftWallModel setNamingLiveName(String namingLiveName) {
this.namingLiveName = namingLiveName;
return this;
}
public String getNamingUserName() {
return namingUserName;
}
public GiftWallModel setNamingUserName(String namingUserName) {
this.namingUserName = namingUserName;
return this;
}
public String getNamingLiveAvatar() {
return namingLiveAvatar;
}
public GiftWallModel setNamingLiveAvatar(String namingLiveAvatar) {
this.namingLiveAvatar = namingLiveAvatar;
return this;
}
public String getNamingUserAvatar() {
return namingUserAvatar;
}
public GiftWallModel setNamingUserAvatar(String namingUserAvatar) {
this.namingUserAvatar = namingUserAvatar;
return this;
}
public String getNamingStatus() {
return namingStatus;
}
public GiftWallModel setNamingStatus(String namingStatus) {
this.namingStatus = namingStatus;
return this;
}
public String getNamingCoin() {
return namingCoin;
}
public GiftWallModel setNamingCoin(String namingCoin) {
this.namingCoin = namingCoin;
return this;
}
public String getGifticonTotal() {
return gifticonTotal;
}
public GiftWallModel setGifticonTotal(String gifticonTotal) {
this.gifticonTotal = gifticonTotal;
return this;
}
public String getGiftCountNumber() {
return giftCountNumber;
}
public GiftWallModel setGiftCountNumber(String giftCountNumber) {
this.giftCountNumber = giftCountNumber;
return this;
}
}

View File

@@ -23,7 +23,7 @@ public class LiveGiftBean {
private String name;
private String price;
private String icon;
private boolean checked;
private boolean checked = false;
private int page;
private View mView;
private String sendType;//支付是金币还是钻石
@@ -36,6 +36,181 @@ public class LiveGiftBean {
private String tag;
@JSONField(name = "blind_box_type")
private int blind_box_type = 0;
//礼物角标
@JSONField(name = "corner_mark")
private String cornerMark;
@JSONField(name = "gift_description")
private String giftDescription;
@JSONField(name = "operate_image")
private String operateImage;
@JSONField(name = "operate_url")
private String operateUrl;
@JSONField(name = "naming_liveuid")
private String namingLiveuid;
@JSONField(name = "naming_uid")
private String namingUid;
@JSONField(name = "naming_live_name")
private String namingLiveName;
@JSONField(name = "naming_user_name")
private String namingUserName;
@JSONField(name = "naming_live_avatar")
private String namingLiveAvatar;
@JSONField(name = "naming_user_avatar")
private String namingUserAvatar;
@JSONField(name = "naming_status")
private String namingStatus;
@JSONField(name = "naming_coin")
private String namingCoin;
@JSONField(name = "naming_user_coin")
private String namingUserCoin;
public String getNamingUserCoin() {
return namingUserCoin;
}
public LiveGiftBean setNamingUserCoin(String namingUserCoin) {
this.namingUserCoin = namingUserCoin;
return this;
}
public View getmView() {
return mView;
}
public LiveGiftBean setmView(View mView) {
this.mView = mView;
return this;
}
public String getmGiftNum() {
return mGiftNum;
}
public LiveGiftBean setmGiftNum(String mGiftNum) {
this.mGiftNum = mGiftNum;
return this;
}
public String getNamingLiveuid() {
return namingLiveuid;
}
public LiveGiftBean setNamingLiveuid(String namingLiveuid) {
this.namingLiveuid = namingLiveuid;
return this;
}
public String getNamingUid() {
return namingUid;
}
public LiveGiftBean setNamingUid(String namingUid) {
this.namingUid = namingUid;
return this;
}
public String getNamingLiveName() {
return namingLiveName;
}
public LiveGiftBean setNamingLiveName(String namingLiveName) {
this.namingLiveName = namingLiveName;
return this;
}
public String getNamingUserName() {
return namingUserName;
}
public LiveGiftBean setNamingUserName(String namingUserName) {
this.namingUserName = namingUserName;
return this;
}
public String getNamingLiveAvatar() {
return namingLiveAvatar;
}
public LiveGiftBean setNamingLiveAvatar(String namingLiveAvatar) {
this.namingLiveAvatar = namingLiveAvatar;
return this;
}
public String getNamingUserAvatar() {
return namingUserAvatar;
}
public LiveGiftBean setNamingUserAvatar(String namingUserAvatar) {
this.namingUserAvatar = namingUserAvatar;
return this;
}
public String getNamingStatus() {
return namingStatus;
}
public LiveGiftBean setNamingStatus(String namingStatus) {
this.namingStatus = namingStatus;
return this;
}
public String getNamingCoin() {
return namingCoin;
}
public LiveGiftBean setNamingCoin(String namingCoin) {
this.namingCoin = namingCoin;
return this;
}
public String getOperateImage() {
return operateImage;
}
public LiveGiftBean setOperateImage(String operateImage) {
this.operateImage = operateImage;
return this;
}
public String getOperateUrl() {
return operateUrl;
}
public LiveGiftBean setOperateUrl(String operateUrl) {
this.operateUrl = operateUrl;
return this;
}
public String getGiftDescription() {
return giftDescription;
}
public LiveGiftBean setGiftDescription(String giftDescription) {
this.giftDescription = giftDescription;
return this;
}
public String getCornerMark() {
return cornerMark;
}
public LiveGiftBean setCornerMark(String cornerMark) {
this.cornerMark = cornerMark;
return this;
}
private int fansGiftLevel=0;//粉丝团礼物等级要求
public int getFansGiftLevel() {
return fansGiftLevel;
}
public void setFansGiftLevel(int fansGiftLevel) {
this.fansGiftLevel = fansGiftLevel;
}
public int getBlind_box_type() {
return blind_box_type;

View File

@@ -0,0 +1,42 @@
package com.yunbao.common.bean;
import com.google.gson.annotations.SerializedName;
import java.util.List;
public class MedalAchievementModel extends BaseModel {
@SerializedName("medal_total_number")
private String medalTotalNumber;
@SerializedName("medal_light_number")
private String medalLightNumber;
@SerializedName("medal_data")
private List<UserMedalListModel> medalData;
public String getMedalTotalNumber() {
return medalTotalNumber;
}
public MedalAchievementModel setMedalTotalNumber(String medalTotalNumber) {
this.medalTotalNumber = medalTotalNumber;
return this;
}
public String getMedalLightNumber() {
return medalLightNumber;
}
public MedalAchievementModel setMedalLightNumber(String medalLightNumber) {
this.medalLightNumber = medalLightNumber;
return this;
}
public List<UserMedalListModel> getMedalData() {
return medalData;
}
public MedalAchievementModel setMedalData(List<UserMedalListModel> medalData) {
this.medalData = medalData;
return this;
}
}

View File

@@ -0,0 +1,46 @@
package com.yunbao.common.bean;
import com.google.gson.annotations.SerializedName;
public class UserAvatarSelectBean extends BaseModel {
@SerializedName("id")
private int id;
@SerializedName("name")
private String name;
@SerializedName("path")
private String path;
@SerializedName("checked")
private int checked;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getPath() {
return path;
}
public void setPath(String path) {
this.path = path;
}
public int getChecked() {
return checked;
}
public void setChecked(int checked) {
this.checked = checked;
}
}

View File

@@ -68,6 +68,10 @@ public class UserBean implements Parcelable {
private String mRankPkImgUrl;
//是否填写完整资料
private int user_info_complete;
//粉丝团等级
private int fansLevel;
//粉丝团进场皮肤
private String fansEnterRoomUrl;
public int getUserInfoComplete() {
return user_info_complete;
@@ -78,6 +82,22 @@ public class UserBean implements Parcelable {
return this;
}
public int getFansLevel() {
return fansLevel;
}
public void setFansLevel(int fansLevel) {
this.fansLevel = fansLevel;
}
public String getFansEnterRoomUrl() {
return fansEnterRoomUrl;
}
public void setFansEnterRoomUrl(String fansEnterRoomUrl) {
this.fansEnterRoomUrl = fansEnterRoomUrl;
}
public boolean isRandomPk() {
return randomPk;
}

View File

@@ -0,0 +1,76 @@
package com.yunbao.common.bean;
import com.google.gson.annotations.SerializedName;
import java.util.ArrayList;
import java.util.List;
public class UserMedalListModel extends BaseModel {
@SerializedName("dress_name")
private String dressName;
@SerializedName("dress_info")
private List<UserMedalModel> dressInfo = new ArrayList<>();
@SerializedName("display_src")
private String displaySrc;
@SerializedName("dress_description")
private String dressDescription;
@SerializedName("display_src_second")
private String displaySrcSecond;
@SerializedName("dress_status")//1Hd2whd
private String dressStatus;
public String getDressDescription() {
return dressDescription;
}
public UserMedalListModel setDressDescription(String dressDescription) {
this.dressDescription = dressDescription;
return this;
}
public String getDisplaySrcSecond() {
return displaySrcSecond;
}
public UserMedalListModel setDisplaySrcSecond(String displaySrcSecond) {
this.displaySrcSecond = displaySrcSecond;
return this;
}
public String getDressStatus() {
return dressStatus;
}
public UserMedalListModel setDressStatus(String dressStatus) {
this.dressStatus = dressStatus;
return this;
}
public String getDressName() {
return dressName;
}
public UserMedalListModel setDressName(String dressName) {
this.dressName = dressName;
return this;
}
public List<UserMedalModel> getDressInfo() {
return dressInfo;
}
public UserMedalListModel setDressInfo(List<UserMedalModel> dressInfo) {
this.dressInfo = dressInfo;
return this;
}
public String getDisplaySrc() {
return displaySrc;
}
public UserMedalListModel setDisplaySrc(String displaySrc) {
this.displaySrc = displaySrc;
return this;
}
}

View File

@@ -0,0 +1,72 @@
package com.yunbao.common.bean;
import com.google.gson.annotations.SerializedName;
public class UserMedalModel extends BaseModel {
@SerializedName("id")
private String id;
@SerializedName("display_src")
private String displaySrc;
@SerializedName("dress_name")
private String dressName;
@SerializedName("dress_description")
private String dressDescription;
@SerializedName("sort")
private String sort;
@SerializedName("dress_status")
private String dressStatus;
public String getId() {
return id;
}
public UserMedalModel setId(String id) {
this.id = id;
return this;
}
public String getDisplaySrc() {
return displaySrc;
}
public UserMedalModel setDisplaySrc(String displaySrc) {
this.displaySrc = displaySrc;
return this;
}
public String getDressName() {
return dressName;
}
public UserMedalModel setDressName(String dressName) {
this.dressName = dressName;
return this;
}
public String getDressDescription() {
return dressDescription;
}
public UserMedalModel setDressDescription(String dressDescription) {
this.dressDescription = dressDescription;
return this;
}
public String getSort() {
return sort;
}
public UserMedalModel setSort(String sort) {
this.sort = sort;
return this;
}
public String getDressStatus() {
return dressStatus;
}
public UserMedalModel setDressStatus(String dressStatus) {
this.dressStatus = dressStatus;
return this;
}
}

View File

@@ -0,0 +1,39 @@
package com.yunbao.common.dialog;
import android.content.Context;
import androidx.annotation.NonNull;
import com.lxj.xpopup.XPopup;
import com.lxj.xpopup.core.CenterPopupView;
/**
* 居中弹窗
*/
public abstract class AbsDialogCenterPopupWindow extends CenterPopupView {
public final Context mContext;
public AbsDialogCenterPopupWindow(@NonNull Context context) {
super(context);
this.mContext = context;
}
/**
* <a href="https://github.com/li-xiaojun/XPopup/wiki/5.-%E5%B8%B8%E7%94%A8%E8%AE%BE%E7%BD%AE">参考配置</a>
*/
public abstract void buildDialog(XPopup.Builder builder);
public abstract int bindLayoutId();
@Override
protected int getImplLayoutId() {
return bindLayoutId();
}
public void showDialog() {
XPopup.Builder builder = new XPopup.Builder(mContext);
builder.isDestroyOnDismiss(true);
builder.enableDrag(false);
buildDialog(builder);
builder.asCustom(this).show();
}
}

View File

@@ -7,9 +7,11 @@ import androidx.annotation.NonNull;
import com.lxj.xpopup.XPopup;
import com.lxj.xpopup.core.BottomPopupView;
/**
* 底部弹窗
*/
public abstract class AbsDialogPopupWindow extends BottomPopupView {
private final Context mContext;
public final Context mContext;
public AbsDialogPopupWindow(@NonNull Context context) {
super(context);

View File

@@ -0,0 +1,39 @@
package com.yunbao.common.dialog;
import android.content.Context;
import androidx.annotation.NonNull;
import com.lxj.xpopup.XPopup;
import com.lxj.xpopup.core.PositionPopupView;
/**
* 自定义位置弹窗
*/
public abstract class AbsDialogPositionPopupWindow extends PositionPopupView {
public final Context mContext;
public AbsDialogPositionPopupWindow(@NonNull Context context) {
super(context);
this.mContext = context;
}
/**
* <a href="https://github.com/li-xiaojun/XPopup/wiki/5.-%E5%B8%B8%E7%94%A8%E8%AE%BE%E7%BD%AE">参考配置</a>
*/
public abstract void buildDialog(XPopup.Builder builder);
public abstract int bindLayoutId();
@Override
protected int getImplLayoutId() {
return bindLayoutId();
}
public void showDialog() {
XPopup.Builder builder = new XPopup.Builder(mContext);
builder.isDestroyOnDismiss(true);
builder.enableDrag(false);
buildDialog(builder);
builder.asCustom(this).show();
}
}

View File

@@ -0,0 +1,93 @@
package com.yunbao.common.dialog;
import android.content.Context;
import android.text.TextUtils;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.lxj.xpopup.core.CenterPopupView;
import com.yunbao.common.R;
import com.yunbao.common.adapter.AchievementDetailsAdapter;
import com.yunbao.common.bean.UserMedalListModel;
import com.yunbao.common.glide.ImgLoader;
import com.yunbao.common.views.weight.ViewClicksAntiShake;
public class AchievementDetailsPopup extends CenterPopupView {
private UserMedalListModel userMedalListModel;
private ImageView achievementImg;
private TextView dressName, dressDescription;
private View havaDataList, havaData;
private AchievementDetailsAdapter achievementDetailsAdapter;
private RecyclerView achievementImgList;
public AchievementDetailsPopup(@NonNull Context context, UserMedalListModel userMedalListModel) {
super(context);
this.userMedalListModel = userMedalListModel;
}
@Override
protected int getImplLayoutId() {
return R.layout.popup_achievement_details;
}
@Override
protected void onCreate() {
super.onCreate();
havaDataList = findViewById(R.id.hava_data_list);
havaData = findViewById(R.id.hava_data);
if (userMedalListModel.getDressInfo().size() > 0) {
havaDataList.setVisibility(GONE);
havaData.setVisibility(VISIBLE);
achievementDetailsAdapter = new AchievementDetailsAdapter(userMedalListModel.getDressInfo());
achievementImg = findViewById(R.id.achievement_img2);
dressName = findViewById(R.id.dress_name2);
dressDescription = findViewById(R.id.dress_description2);
achievementImgList = findViewById(R.id.achievement_img_list);
if (TextUtils.equals(userMedalListModel.getDressStatus(), "1")) {
ImgLoader.display(getContext(), userMedalListModel.getDisplaySrc(), achievementImg);
} else {
ImgLoader.display(getContext(), userMedalListModel.getDisplaySrcSecond(), achievementImg);
}
dressName.setText(userMedalListModel.getDressName());
dressDescription.setText(userMedalListModel.getDressDescription());
achievementImgList.setLayoutManager(new LinearLayoutManager(getContext(), LinearLayoutManager.HORIZONTAL, false));
achievementImgList.setAdapter(achievementDetailsAdapter);
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.gift_details_btn2), new ViewClicksAntiShake.ViewClicksCallBack() {
@Override
public void onViewClicks() {
dialog.dismiss();
}
});
} else {
havaDataList.setVisibility(VISIBLE);
havaData.setVisibility(GONE);
achievementImg = findViewById(R.id.achievement_img);
dressName = findViewById(R.id.dress_name);
dressDescription = findViewById(R.id.dress_description);
if (TextUtils.equals(userMedalListModel.getDressStatus(), "1")) {
ImgLoader.display(getContext(), userMedalListModel.getDisplaySrc(), achievementImg);
} else {
ImgLoader.display(getContext(), userMedalListModel.getDisplaySrcSecond(), achievementImg);
}
dressName.setText(userMedalListModel.getDressName());
dressDescription.setText(userMedalListModel.getDressDescription());
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.gift_details_btn), new ViewClicksAntiShake.ViewClicksCallBack() {
@Override
public void onViewClicks() {
dialog.dismiss();
}
});
}
}
}

View File

@@ -0,0 +1,6 @@
package com.yunbao.common.event;
import com.yunbao.common.bean.BaseModel;
public class CodexEvent extends BaseModel {
}

View File

@@ -0,0 +1,16 @@
package com.yunbao.common.event;
import com.yunbao.common.bean.BaseModel;
public class GiftNumberEvent extends BaseModel {
private String mCount;
public String getmCount() {
return mCount;
}
public GiftNumberEvent setmCount(String mCount) {
this.mCount = mCount;
return this;
}
}

View File

@@ -0,0 +1,52 @@
package com.yunbao.common.event;
import com.google.gson.annotations.SerializedName;
import com.yunbao.common.bean.BaseModel;
public class GiftWallIlluminateEvent extends BaseModel {
@SerializedName("_method_")
private String method;
@SerializedName("action")
private String action;
@SerializedName("max_number")
private int maxNumber;
@SerializedName("new_number")
private int newNumber;
public String getMethod() {
return method;
}
public GiftWallIlluminateEvent setMethod(String method) {
this.method = method;
return this;
}
public String getAction() {
return action;
}
public GiftWallIlluminateEvent setAction(String action) {
this.action = action;
return this;
}
public int getMaxNumber() {
return maxNumber;
}
public GiftWallIlluminateEvent setMaxNumber(int maxNumber) {
this.maxNumber = maxNumber;
return this;
}
public int getNewNumber() {
return newNumber;
}
public GiftWallIlluminateEvent setNewNumber(int newNumber) {
this.newNumber = newNumber;
return this;
}
}

View File

@@ -0,0 +1,28 @@
package com.yunbao.common.event;
import com.yunbao.common.bean.BaseModel;
import com.yunbao.common.bean.GiftWallModel;
public class GiftWallItemEvent extends BaseModel {
private GiftWallModel giftWallModel;
private boolean unlit;
public GiftWallModel getGiftWallModel() {
return giftWallModel;
}
public GiftWallItemEvent setGiftWallModel(GiftWallModel giftWallModel) {
this.giftWallModel = giftWallModel;
return this;
}
public boolean isUnlit() {
return unlit;
}
public GiftWallItemEvent setUnlit(boolean unlit) {
this.unlit = unlit;
return this;
}
}

View File

@@ -0,0 +1,6 @@
package com.yunbao.common.event;
import com.yunbao.common.bean.BaseModel;
public class LiveErrorEvent extends BaseModel {
}

View File

@@ -1,4 +1,4 @@
package com.yunbao.live.event;
package com.yunbao.common.event;
public class LiveGiftDialogEvent {
}

View File

@@ -1,4 +1,4 @@
package com.yunbao.live.event;
package com.yunbao.common.event;
import com.yunbao.common.bean.LiveBean;

View File

@@ -0,0 +1,73 @@
package com.yunbao.common.fragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import androidx.fragment.app.FragmentTransaction;
import com.yunbao.common.R;
import com.yunbao.common.views.weight.ViewClicksAntiShake;
public class AllServiceChampionFragment extends BaseFragment {
private TextView winnerOfTheMonth, lastMonthWinner;
private String mStream, mLiveUid;
@Override
public View createView(LayoutInflater layoutInflater, ViewGroup viewGroup) {
return layoutInflater.inflate(R.layout.fragment_all_service_champion, viewGroup, false);
}
@Override
protected void initVariables(Bundle bundle) {
mStream = bundle.getString("mStream");
mLiveUid = bundle.getString("mLiveUid");
}
@Override
protected void initViews(Bundle savedInstanceState, View contentView) {
winnerOfTheMonth = contentView.findViewById(R.id.winner_of_the_month);
lastMonthWinner = contentView.findViewById(R.id.last_month_winner);
winnerOfTheMonth.setSelected(true);
lastMonthWinner.setSelected(false);
FragmentTransaction transaction = getChildFragmentManager().beginTransaction();
transaction.replace(R.id.context_layout_gift, CurrentMonthGiftNamingFragment.newInstance(mStream, mLiveUid));
transaction.commit();
ViewClicksAntiShake.clicksAntiShake(winnerOfTheMonth, new ViewClicksAntiShake.ViewClicksCallBack() {
@Override
public void onViewClicks() {
winnerOfTheMonth.setSelected(true);
lastMonthWinner.setSelected(false);
FragmentTransaction transaction = getChildFragmentManager().beginTransaction();
transaction.replace(R.id.context_layout_gift, CurrentMonthGiftNamingFragment.newInstance(mStream, mLiveUid));
transaction.commit();
}
});
ViewClicksAntiShake.clicksAntiShake(lastMonthWinner, new ViewClicksAntiShake.ViewClicksCallBack() {
@Override
public void onViewClicks() {
lastMonthWinner.setSelected(true);
winnerOfTheMonth.setSelected(false);
FragmentTransaction transaction = getChildFragmentManager().beginTransaction();
transaction.replace(R.id.context_layout_gift, LastMonthGiftNamingFragment.newInstance(mStream, mLiveUid));
transaction.commit();
}
});
}
@Override
protected void loadData() {
}
public static AllServiceChampionFragment newInstance(String mStream, String mLiveUid) {
AllServiceChampionFragment allServiceChampionFragment = new AllServiceChampionFragment();
Bundle bundle = new Bundle();
bundle.putString("mStream", mStream);
bundle.putString("mLiveUid", mLiveUid);
allServiceChampionFragment.setArguments(bundle);
return allServiceChampionFragment;
}
}

View File

@@ -0,0 +1,79 @@
package com.yunbao.common.fragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.yunbao.common.R;
import com.yunbao.common.adapter.MonthGiftNamingAdapter;
import com.yunbao.common.bean.GiftWallModel;
import com.yunbao.common.http.base.HttpCallback;
import com.yunbao.common.http.live.LiveNetManager;
import com.yunbao.common.utils.ToastUtil;
import java.util.List;
public class CurrentMonthGiftNamingFragment extends BaseFragment {
private String mStream, mLiveUid;
private RecyclerView giftList;
private MonthGiftNamingAdapter monthGiftNamingAdapter;
private View noData;
@Override
public View createView(LayoutInflater layoutInflater, ViewGroup viewGroup) {
return layoutInflater.inflate(R.layout.fragment_current_month_gift_naming, viewGroup, false);
}
@Override
protected void initVariables(Bundle bundle) {
mStream = bundle.getString("mStream");
mLiveUid = bundle.getString("mLiveUid");
}
@Override
protected void initViews(Bundle savedInstanceState, View contentView) {
giftList = contentView.findViewById(R.id.gift_list);
noData = contentView.findViewById(R.id.no_data);
monthGiftNamingAdapter = new MonthGiftNamingAdapter();
giftList.setLayoutManager(new GridLayoutManager(getContext(), 3, GridLayoutManager.VERTICAL, false));
giftList.setAdapter(monthGiftNamingAdapter);
}
@Override
protected void loadData() {
LiveNetManager.get(getContext()).
currentMonthGiftNaming(new HttpCallback<List<GiftWallModel>>() {
@Override
public void onSuccess(List<GiftWallModel> data) {
if (data.size() > 0) {
giftList.setVisibility(View.VISIBLE);
noData.setVisibility(View.GONE);
monthGiftNamingAdapter.addAllData(data);
} else {
giftList.setVisibility(View.GONE);
noData.setVisibility(View.VISIBLE);
}
}
@Override
public void onError(String error) {
ToastUtil.show(error);
}
});
}
public static CurrentMonthGiftNamingFragment newInstance(String mStream, String mLiveUid) {
CurrentMonthGiftNamingFragment currentMonthGiftNamingFragment = new CurrentMonthGiftNamingFragment();
Bundle bundle = new Bundle();
bundle.putString("mStream", mStream);
bundle.putString("mLiveUid", mLiveUid);
currentMonthGiftNamingFragment.setArguments(bundle);
return currentMonthGiftNamingFragment;
}
}

View File

@@ -0,0 +1,81 @@
package com.yunbao.common.fragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.yunbao.common.R;
import com.yunbao.common.adapter.GiftWithoutWallAdapter;
import com.yunbao.common.bean.GiftAlreadyWallModel;
import com.yunbao.common.http.base.HttpCallback;
import com.yunbao.common.http.live.LiveNetManager;
/**
* wei点亮礼物墙
*/
public class GiftWithoutWallFragment extends BaseFragment {
private String mStream, mLiveUid, toUid;
private RecyclerView withoutList;
private LinearLayout giftWallNoData;
private GiftWithoutWallAdapter withoutWallAdapter;
@Override
public View createView(LayoutInflater layoutInflater, ViewGroup viewGroup) {
return layoutInflater.inflate(R.layout.fragment_gift_without_wall, viewGroup, false);
}
@Override
protected void initVariables(Bundle bundle) {
mStream = bundle.getString("mStream");
mLiveUid = bundle.getString("mLiveUid");
toUid = bundle.getString("toUid");
}
@Override
protected void initViews(Bundle savedInstanceState, View contentView) {
withoutList = contentView.findViewById(R.id.without_list);
giftWallNoData = contentView.findViewById(R.id.gift_wall_no_data);
withoutWallAdapter = new GiftWithoutWallAdapter();
withoutList.setLayoutManager(new GridLayoutManager(getContext(), 3, GridLayoutManager.VERTICAL, false));
withoutList.setAdapter(withoutWallAdapter);
}
@Override
protected void loadData() {
LiveNetManager.get(getActivity()).
giftWithoutWall(mLiveUid, toUid, new HttpCallback<GiftAlreadyWallModel>() {
@Override
public void onSuccess(GiftAlreadyWallModel data) {
if (data.getGiftWall().size() > 0) {
giftWallNoData.setVisibility(View.GONE);
withoutList.setVisibility(View.VISIBLE);
withoutWallAdapter.addAllData(data.getGiftWall());
} else {
giftWallNoData.setVisibility(View.VISIBLE);
withoutList.setVisibility(View.GONE);
}
}
@Override
public void onError(String error) {
}
});
}
public static GiftWithoutWallFragment newInstance(String mStream, String mLiveUid, String toUid) {
GiftWithoutWallFragment liveGiftFragment = new GiftWithoutWallFragment();
Bundle bundle = new Bundle();
bundle.putString("mStream", mStream);
bundle.putString("mLiveUid", mLiveUid);
bundle.putString("toUid", toUid);
liveGiftFragment.setArguments(bundle);
return liveGiftFragment;
}
}

View File

@@ -0,0 +1,79 @@
package com.yunbao.common.fragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.yunbao.common.R;
import com.yunbao.common.adapter.MonthGiftNamingAdapter;
import com.yunbao.common.bean.GiftWallModel;
import com.yunbao.common.http.base.HttpCallback;
import com.yunbao.common.http.live.LiveNetManager;
import com.yunbao.common.utils.ToastUtil;
import java.util.List;
public class LastMonthGiftNamingFragment extends BaseFragment {
private String mStream, mLiveUid;
private RecyclerView giftList;
private MonthGiftNamingAdapter monthGiftNamingAdapter;
private View noData;
@Override
public View createView(LayoutInflater layoutInflater, ViewGroup viewGroup) {
return layoutInflater.inflate(R.layout.fragment_last_month_gift_naming, viewGroup, false);
}
@Override
protected void initVariables(Bundle bundle) {
mStream = bundle.getString("mStream");
mLiveUid = bundle.getString("mLiveUid");
}
@Override
protected void initViews(Bundle savedInstanceState, View contentView) {
giftList = contentView.findViewById(R.id.gift_list);
noData = contentView.findViewById(R.id.no_data);
monthGiftNamingAdapter = new MonthGiftNamingAdapter();
giftList.setLayoutManager(new GridLayoutManager(getContext(), 3, GridLayoutManager.VERTICAL, false));
giftList.setAdapter(monthGiftNamingAdapter);
}
@Override
protected void loadData() {
LiveNetManager.get(getContext()).
lastMonthGiftNaming(new HttpCallback<List<GiftWallModel>>() {
@Override
public void onSuccess(List<GiftWallModel> data) {
if (data.size() > 0) {
giftList.setVisibility(View.VISIBLE);
noData.setVisibility(View.GONE);
monthGiftNamingAdapter.addAllData(data);
} else {
giftList.setVisibility(View.GONE);
noData.setVisibility(View.VISIBLE);
}
}
@Override
public void onError(String error) {
ToastUtil.show(error);
}
});
}
public static LastMonthGiftNamingFragment newInstance(String mStream, String mLiveUid) {
LastMonthGiftNamingFragment lastMonthGiftNamingFragment = new LastMonthGiftNamingFragment();
Bundle bundle = new Bundle();
bundle.putString("mStream", mStream);
bundle.putString("mLiveUid", mLiveUid);
lastMonthGiftNamingFragment.setArguments(bundle);
return lastMonthGiftNamingFragment;
}
}

View File

@@ -17,11 +17,11 @@ import com.yunbao.common.bean.WishListModel;
import com.yunbao.common.bean.WishModel;
import com.yunbao.common.bean.WishModel2;
import com.yunbao.common.event.LiveNewWishListCloseEvent;
import com.yunbao.common.event.PopupViewDismissEvent;
import com.yunbao.common.http.base.HttpCallback;
import com.yunbao.common.http.live.LiveNetManager;
import com.yunbao.common.utils.Bus;
import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.views.HintCustomPopup;
import com.yunbao.common.views.LiveNewWishGiftPopup;
import com.yunbao.common.views.weight.ViewClicksAntiShake;
@@ -66,7 +66,7 @@ public class LiveNewWishListFragment extends BaseFragment {
@Override
public void onViewClicks() {
saveWish();
Bus.get().post(new PopupViewDismissEvent());
}
});
}
@@ -105,29 +105,51 @@ public class LiveNewWishListFragment extends BaseFragment {
liveNewWishAdapter.addData(wishList, type);
}
public void saveWish() {
public int liveNewWishAdapterWishList() {
List<WishModel> wishList = liveNewWishAdapter.getWishList();
List<WishModel2> wishList2 = new ArrayList<>();
Gson gson = new Gson();
for (WishModel model : wishList) {
if (model!=null){
if (model != null) {
WishModel2 model2 = gson.fromJson(gson.toJson(model), WishModel2.class);
wishList2.add(model2);
}
}
if (wishList2.size() == 0) {
Bus.get().post(new PopupViewDismissEvent());
} else {
if (wishList2.size()>10){
ToastUtil.show(R.string.must_hint);
return;
return wishList2.size();
}
public void saveWish() {
List<WishModel> wishList = liveNewWishAdapter.getWishList();
List<WishModel2> wishList2 = new ArrayList<>();
Gson gson = new Gson();
for (WishModel model : wishList) {
if (model != null) {
WishModel2 model2 = gson.fromJson(gson.toJson(model), WishModel2.class);
wishList2.add(model2);
}
}
switch (type) {
case 1:
Bus.get().post(new LiveNewWishListCloseEvent().setDayWish(false));
break;
case 2:
Bus.get().post(new LiveNewWishListCloseEvent().setZhouXin(false));
break;
case 3:
Bus.get().post(new LiveNewWishListCloseEvent().setLunarWish(false));
break;
case 4:
Bus.get().post(new LiveNewWishListCloseEvent().setSeasonalWish(false));
break;
}
if (wishList2.size() == 0) {
LiveNetManager.get(getContext()).
setWishlistV2(type, gson.toJson(wishList2), new HttpCallback<String>() {
@Override
public void onSuccess(String data) {
ToastUtil.show("修改成功");
}
@Override
@@ -135,22 +157,58 @@ public class LiveNewWishListFragment extends BaseFragment {
ToastUtil.show(R.string.net_error);
}
});
switch (type) {
case 1:
Bus.get().post(new LiveNewWishListCloseEvent().setDayWish(false));
break;
case 2:
Bus.get().post(new LiveNewWishListCloseEvent().setZhouXin(false));
break;
case 3:
Bus.get().post(new LiveNewWishListCloseEvent().setLunarWish(false));
break;
case 4:
Bus.get().post(new LiveNewWishListCloseEvent().setSeasonalWish(false));
break;
} else if (wishList2.size() == 1) {
new XPopup.Builder(getContext())
.asCustom(new HintCustomPopup(getContext(),
getContext().getString(R.string.dialog_tip),
getContext().getString(R.string.sett_rigger))
.setLiveOpenOk(getContext().getString(R.string.settings_ser))
.setLiveOpenCancel(getContext().getString(R.string.cancel_ca))
.setCallBack(new HintCustomPopup.HintCustomCallBack() {
@Override
public void onSure() {
}
@Override
public void onCancel() {
if (wishList2.size() > 10) {
ToastUtil.show(R.string.must_hint);
return;
}
LiveNetManager.get(getContext()).
setWishlistV2(type, gson.toJson(wishList2), new HttpCallback<String>() {
@Override
public void onSuccess(String data) {
ToastUtil.show("修改成功");
}
@Override
public void onError(String error) {
ToastUtil.show(R.string.net_error);
}
});
}
})).show();
} else {
if (wishList2.size() > 10) {
ToastUtil.show(R.string.must_hint);
return;
}
LiveNetManager.get(getContext()).
setWishlistV2(type, gson.toJson(wishList2), new HttpCallback<String>() {
@Override
public void onSuccess(String data) {
ToastUtil.show("修改成功");
}
@Override
public void onError(String error) {
ToastUtil.show(R.string.net_error);
}
});
}
}
}

View File

@@ -336,6 +336,18 @@ public class ImgLoader {
builder.into(imageView);
}
public static void displayBlurLive(Context context, int url, ImageView imageView) {
if (!contextIsExist(context)) {
return;
}
RequestBuilder<Drawable> builder = Glide.with(context)
.load(url)
.thumbnail(thumbnail)
.apply(RequestOptions.bitmapTransform(new BlurTransformation(20)))
.placeholder(R.mipmap.live_bg);
builder.into(imageView);
}
private static boolean contextIsExist(Context context) {
if (context == null) {
return false;

View File

@@ -19,13 +19,13 @@ import com.yunbao.common.bean.ConfigBean;
import com.yunbao.common.event.FollowEvent;
import com.yunbao.common.interfaces.CommonCallback;
import com.yunbao.common.manager.APKManager;
import com.yunbao.common.manager.GiftQuantityManager;
import com.yunbao.common.manager.IMLoginManager;
import com.yunbao.common.manager.LiveClassManager;
import com.yunbao.common.manager.NewLevelManager;
import com.yunbao.common.utils.AppManager;
import com.yunbao.common.utils.DialogUitl;
import com.yunbao.common.utils.L;
import com.yunbao.common.utils.MD5Util;
import com.yunbao.common.utils.SpUtil;
import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.utils.VersionUtil;
@@ -65,7 +65,7 @@ public class CommonHttpUtil {
* @param poi 是否要查询POI
*/
public static void getAddressInfoByTxLocaitonSdk(final double lng, final double lat, final int poi, int pageIndex, String tag, final HttpCallback commonCallback) {
String txMapAppKey = CommonAppConfig.getInstance().getTxMapAppKey();
/*String txMapAppKey = CommonAppConfig.getInstance().getTxMapAppKey();
String s = "/ws/geocoder/v1/?get_poi=" + poi + "&key=" + txMapAppKey + "&location=" + lat + "," + lng
+ "&poi_options=address_format=short;radius=1000;page_size=20;page_index=" + pageIndex + ";policy=5" + CommonAppConfig.getInstance().getTxMapAppSecret();
String sign = MD5Util.getMD5(s);
@@ -101,7 +101,7 @@ public class CommonHttpUtil {
commonCallback.onFinish();
}
}
});
});*/
}
/**
@@ -112,7 +112,7 @@ public class CommonHttpUtil {
*/
public static void searchAddressInfoByTxLocaitonSdk(final double lng, final double lat, String keyword, int pageIndex, final HttpCallback commonCallback) {
String txMapAppKey = CommonAppConfig.getInstance().getTxMapAppKey();
/* String txMapAppKey = CommonAppConfig.getInstance().getTxMapAppKey();
String s = "/ws/place/v1/search?boundary=nearby(" + lat + "," + lng + ",1000)&key=" + txMapAppKey + "&keyword=" + keyword + "&orderby=_distance&page_index=" + pageIndex +
"&page_size=20" + CommonAppConfig.getInstance().getTxMapAppSecret();
String sign = MD5Util.getMD5(s);
@@ -146,7 +146,7 @@ public class CommonHttpUtil {
commonCallback.onFinish();
}
}
});
});*/
}
@@ -198,6 +198,10 @@ public class CommonHttpUtil {
if (obj.containsKey("is_chat")) {
IMLoginManager.get(context).initChat(String.valueOf(obj.getInteger("is_chat")));
}
if (obj.containsKey("levelfans")) {
JSONArray levelArray = obj.getJSONArray("levelfans");
new NewLevelManager(context).upDataFansLevel(levelArray.toJSONString());
}
if (obj.containsKey("level_new")) {//缓存等级数据
JSONArray levelArray = obj.getJSONArray("level_new");
new NewLevelManager(context).UpDataLevel(levelArray.toJSONString());
@@ -231,6 +235,10 @@ public class CommonHttpUtil {
if (obj.containsKey("defaultBubbleUrl")) {
IMLoginManager.get(context).setDefaultBubbleUrl(obj.getString("defaultBubbleUrl"));
}
if (obj.containsKey("gift_quantity")) {
JSONArray giftQuantity = obj.getJSONArray("gift_quantity");
new GiftQuantityManager(context).UpGiftQuantity(giftQuantity.toJSONString());
}
} catch (Exception e) {
e.printStackTrace();
String error = "info[0]:" + info[0] + "\n\n\n" + "Exception:" + e.getClass() + "---message--->" + e.getMessage();
@@ -306,8 +314,15 @@ public class CommonHttpUtil {
.execute(new HttpCallback() {
@Override
public void onSuccess(int code, String msg, String[] info) {
if (code == 0 && info.length > 0) {
if (code == 0 && info.length > 0 || code == 1001) {
int isAttention = JSON.parseObject(info[0]).getIntValue("isattent");//1是 关注 0是未关注
/* if (code == 1001) {
if (WordUtil.isNewZh()) {
ToastUtil.show("粉絲團等級已清零,待領取獎勵已自動領取至【個性裝扮】");
} else {
ToastUtil.show("The level of the fan club has been cleared, and the rewards to be claimed have been automatically received to [Personalized Dressing]");
}
}*/
EventBus.getDefault().post(new FollowEvent(touid, isAttention));
if (callback != null) {
callback.callback(isAttention);

View File

@@ -1,4 +1,4 @@
package com.yunbao.live.http;
package com.yunbao.common.http;
/**
* Created by cxf on 2019/3/21.

View File

@@ -1,4 +1,4 @@
package com.yunbao.live.http;
package com.yunbao.common.http;
import android.text.TextUtils;
@@ -619,15 +619,17 @@ public class LiveHttpUtil {
* 观众给主播送礼物
*/
public static void sendGift(String by, String liveUid, String stream, int giftId, String giftCount, HttpCallback callback) {
sendGift(by, liveUid, stream, giftId, giftCount, 0, callback);
sendGift(by, liveUid, stream, giftId, giftCount, 0, false,callback);
}
public static void sendGift(String by, String liveUid, String stream, int giftId, String giftCount, int isContactGift, HttpCallback callback) {
sendGift(by, liveUid, stream, giftId, giftCount, isContactGift, false,callback);
}
/**
* 观众给主播送礼物
*
* @param isContactGift 是否为联系方式礼物
*/
public static void sendGift(String by, String liveUid, String stream, int giftId, String giftCount, int isContactGift, HttpCallback callback) {
public static void sendGift(String by, String liveUid, String stream, int giftId, String giftCount, int isContactGift, boolean isFansGroupGift,HttpCallback callback) {
HttpClient.getInstance().get("Live.sendGift", LiveHttpConsts.SEND_GIFT)
.params("liveuid", liveUid)
.params("stream", stream)
@@ -635,6 +637,7 @@ public class LiveHttpUtil {
.params("isContactGift", isContactGift)
.params("giftcount", giftCount)
.params("isprank", by)
.params("fans_exclusive_pack",isFansGroupGift?"1":"0")
.params("appVersion", CommonAppConfig.getInstance().getVersion())
.execute(callback);
}

View File

@@ -12,6 +12,14 @@ import com.yunbao.common.bean.CustomSidebarInfoModel;
import com.yunbao.common.bean.DiscountsModel;
import com.yunbao.common.bean.EnterRoomNewModel;
import com.yunbao.common.bean.FaceBookUpModel;
import com.yunbao.common.bean.FansCheckRed;
import com.yunbao.common.bean.FansGroupGiftPack;
import com.yunbao.common.bean.FansGroupGiftPackInfo;
import com.yunbao.common.bean.GiftAlreadyWallModel;
import com.yunbao.common.bean.GiftGuideModel;
import com.yunbao.common.bean.GiftNamingInfoModel;
import com.yunbao.common.bean.GiftWallGiftDetail;
import com.yunbao.common.bean.GiftWallModel;
import com.yunbao.common.bean.HourRank;
import com.yunbao.common.bean.HttpCallbackModel;
import com.yunbao.common.bean.IMLoginModel;
@@ -27,6 +35,7 @@ import com.yunbao.common.bean.LiveRoomVoteModel;
import com.yunbao.common.bean.LiveStetUpStatusModel;
import com.yunbao.common.bean.LiveTaskModel;
import com.yunbao.common.bean.LiveUserMailBoxModel;
import com.yunbao.common.bean.MedalAchievementModel;
import com.yunbao.common.bean.MsgSwitchDetailModel;
import com.yunbao.common.bean.NewPeopleInfo;
import com.yunbao.common.bean.NobleRankHideUserListModel;
@@ -45,6 +54,7 @@ import com.yunbao.common.bean.SetAttentsModel;
import com.yunbao.common.bean.SlideInBannerModel;
import com.yunbao.common.bean.StarChallengeStatusModel;
import com.yunbao.common.bean.UserAreaBean;
import com.yunbao.common.bean.UserAvatarSelectBean;
import com.yunbao.common.bean.VipModel;
import com.yunbao.common.bean.WishListGiftConfModel;
import com.yunbao.common.bean.WishListModel;
@@ -829,4 +839,133 @@ public interface PDLiveApi {
@Query("stream") String stream,
@Query("red_packet_id") String redPacketId
);
/**
* 获取系统默认头像列表
*/
@GET("/api/public/?service=Userhome.getDefaultAvatarList")
Observable<ResponseModel<List<UserAvatarSelectBean>>> getSystemUserAvatar();
/**
* 设置系统默认头像
*
* @param id 头像id
*/
@GET("/api/public/?service=Userhome.setAvatar")
Observable<ResponseModel<Object>> setSystemUserAvatar(
@Query("avatar_id") int id
);
/**
* 礼物墙已点亮
*/
@GET("/api/public/?service=Gift.giftAlreadyWall")
Observable<ResponseModel<GiftAlreadyWallModel>> giftAlreadyWall(
@Query("liveuid") String liveUid,
@Query("to_uid") String toUid
);
/**
* 礼物墙已点亮
*/
@GET("/api/public/?service=Gift.giftUserSendWall")
Observable<ResponseModel<GiftAlreadyWallModel>> giftUserSendWall(
@Query("liveuid") String liveUid,
@Query("to_uid") String toUid
);
/**
* 礼物墙未点亮
*/
@GET("/api/public/?service=Gift.giftWithoutWall")
Observable<ResponseModel<GiftAlreadyWallModel>> giftWithoutWall(
@Query("liveuid") String liveUid,
@Query("to_uid") String toUid
);
/**
* 礼物墙选中礼物详情
*/
@GET("/api/public/?service=Gift.giftDetail")
Observable<ResponseModel<GiftWallGiftDetail>> giftDetail(
@Query("liveuid") String liveUid,
@Query("gift_id") String giftId
);
/**
* 礼物墙本月冠名礼物
*
* @return
*/
@GET("/api/public/?service=Gift.currentMonthGiftNaming")
Observable<ResponseModel<List<GiftWallModel>>> currentMonthGiftNaming();
/**
* 礼物墙上月冠名
*
* @return
*/
@GET("/api/public/?service=Gift.lastMonthGiftNaming")
Observable<ResponseModel<List<GiftWallModel>>> lastMonthGiftNaming();
/**
* 礼物墙上月冠名
*
* @return
*/
@GET("/api/public/?service=Gift.getGiftGuide")
Observable<ResponseModel<List<GiftGuideModel>>> getGiftGuide(
@Query("liveuid") String liveUid,
@Query("to_uid") String toUid
);
@GET("/api/public/?service=Gift.getGiftGuideHistory")
Observable<ResponseModel<List<GiftGuideModel>>> getGiftGuideHistory(
@Query("liveuid") String liveUid,
@Query("to_uid") String toUid
);
@GET("/api/public/?service=Gift.getUserMedalList")
Observable<ResponseModel<MedalAchievementModel>> getUserMedalList(@Query("to_uid") String toUid);
@GET("/api/public/?service=Gift.getLiveMedalList")
Observable<ResponseModel<MedalAchievementModel>> getLiveMedalList(@Query("liveuid") String liveUid);
/**
* 获取粉丝团礼物信息
*
* @param packId 礼包id
*/
@GET("/api/public/?service=Fans.getFansExclusivePack")
Observable<ResponseModel<FansGroupGiftPackInfo>> getFansExclusivePack(@Query("liveuid") String liveUid,
@Query("pack_id") String packId
);
/**
* 购买粉丝团礼包
*
* @param packId 礼包id
*/
@GET("/api/public/?service=Fans.buyFansExclusivePack")
Observable<ResponseModel<HttpCallbackModel>> buyFansExclusivePack(@Query("liveuid") String liveUid,
@Query("pack_id") String packId,
@Query("stream") String stream
);
/**
* 获取粉丝团礼物包裹
*/
@GET("/api/public/?service=Fans.userFansExclusivePackList")
Observable<ResponseModel<List<FansGroupGiftPack>>> userFansExclusivePackList(@Query("liveuid") String liveUid);
/**
* 获取粉丝团礼物包裹
*/
@GET("/api/public/?service=Fans.getCheckFansLevelUpgrade")
Observable<ResponseModel<FansCheckRed>> getCheckFansLevelUpgrade(@Query("liveuid") String liveUid);
@GET("/api/public/?service=gift.getGiftNamingInfo")
Observable<ResponseModel<GiftNamingInfoModel>> getGiftNamingInfo(@Query("gift_id") String giftId);
}

View File

@@ -13,6 +13,14 @@ import com.yunbao.common.bean.CheckLiveModel;
import com.yunbao.common.bean.CustomSidebarInfoModel;
import com.yunbao.common.bean.DiscountsModel;
import com.yunbao.common.bean.EnterRoomNewModel;
import com.yunbao.common.bean.FansCheckRed;
import com.yunbao.common.bean.FansGroupGiftPack;
import com.yunbao.common.bean.FansGroupGiftPackInfo;
import com.yunbao.common.bean.GiftAlreadyWallModel;
import com.yunbao.common.bean.GiftGuideModel;
import com.yunbao.common.bean.GiftNamingInfoModel;
import com.yunbao.common.bean.GiftWallGiftDetail;
import com.yunbao.common.bean.GiftWallModel;
import com.yunbao.common.bean.HttpCallbackModel;
import com.yunbao.common.bean.LinkMicUserBean;
import com.yunbao.common.bean.LinkMicUserBeanV2;
@@ -21,12 +29,14 @@ import com.yunbao.common.bean.LiveAiRobotBean;
import com.yunbao.common.bean.LiveAnchorCallMeModel;
import com.yunbao.common.bean.LiveAnchorSayModel;
import com.yunbao.common.bean.LiveDataInfoModel;
import com.yunbao.common.bean.LiveGiftBean;
import com.yunbao.common.bean.LiveInfoModel;
import com.yunbao.common.bean.LiveRoomActivityBanner;
import com.yunbao.common.bean.LiveRoomVoteModel;
import com.yunbao.common.bean.LiveStetUpStatusModel;
import com.yunbao.common.bean.LiveTaskModel;
import com.yunbao.common.bean.LiveUserMailBoxModel;
import com.yunbao.common.bean.MedalAchievementModel;
import com.yunbao.common.bean.NobleRankHideUserListModel;
import com.yunbao.common.bean.NobleTrumpetModel;
import com.yunbao.common.bean.PkRankBean;
@@ -41,6 +51,7 @@ import com.yunbao.common.bean.RedPacketListBean;
import com.yunbao.common.bean.SetAttentsModel;
import com.yunbao.common.bean.StarChallengeStatusModel;
import com.yunbao.common.bean.UserAreaBean;
import com.yunbao.common.bean.UserAvatarSelectBean;
import com.yunbao.common.bean.VipModel;
import com.yunbao.common.bean.WishListGiftConfModel;
import com.yunbao.common.bean.WishListModel;
@@ -167,8 +178,16 @@ public class LiveNetManager {
.subscribe(listResponseModel -> {
List<SetAttentsModel> setAttentsModels = listResponseModel.getData().getInfo();
if (setAttentsModels.size() > 0) {
if (callback != null)
if (callback != null) {
/* if (listResponseModel.getData().getCode() == 1001) {
if (WordUtil.isNewZh()) {
ToastUtil.show("粉絲團等級已清零,待領取獎勵已自動領取至【個性裝扮】");
} else {
ToastUtil.show("The level of the fan club has been cleared, and the rewards to be claimed have been automatically received to [Personalized Dressing]");
}
}*/
callback.onSuccess(setAttentsModels.get(0));
}
} else {
if (callback != null)
callback.onError("操作失效");
@@ -1796,6 +1815,384 @@ public class LiveNetManager {
}).isDisposed();
}
public void getSystemUserAvatar(HttpCallback<List<UserAvatarSelectBean>> callback) {
API.get().pdLiveApi(mContext)
.getSystemUserAvatar()
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<ResponseModel<List<UserAvatarSelectBean>>>() {
@Override
public void accept(ResponseModel<List<UserAvatarSelectBean>> objectResponseModel) throws Exception {
if (objectResponseModel.getData().getCode() == 0) {
callback.onSuccess(objectResponseModel.getData().getInfo());
} else {
callback.onError(objectResponseModel.getData().getMsg());
}
}
}, new Consumer<Throwable>() {
@Override
public void accept(Throwable throwable) throws Exception {
if (callback != null) {
callback.onError(mContext.getString(R.string.net_error));
}
}
}).isDisposed();
}
public void setSystemUserAvatar(int id, HttpCallback<String> callback) {
API.get().pdLiveApi(mContext)
.setSystemUserAvatar(id)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<ResponseModel<Object>>() {
@Override
public void accept(ResponseModel<Object> objectResponseModel) throws Exception {
if (objectResponseModel.getData().getCode() == 0) {
callback.onSuccess(objectResponseModel.getData().getMsg());
} else {
callback.onError(objectResponseModel.getData().getMsg());
}
}
}, new Consumer<Throwable>() {
@Override
public void accept(Throwable throwable) throws Exception {
if (callback != null) {
callback.onError(mContext.getString(R.string.net_error));
}
}
}).isDisposed();
}
public void giftAlreadyWall(String liveUid, String toUid, HttpCallback<GiftAlreadyWallModel> callback) {
API.get().pdLiveApi(mContext)
.giftAlreadyWall(liveUid, toUid)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<ResponseModel<GiftAlreadyWallModel>>() {
@Override
public void accept(ResponseModel<GiftAlreadyWallModel> giftAlreadyWallModelResponseModel) throws Exception {
if (callback != null) {
callback.onSuccess(giftAlreadyWallModelResponseModel.getData().getInfo());
}
}
}, new Consumer<Throwable>() {
@Override
public void accept(Throwable throwable) throws Exception {
if (callback != null) {
callback.onError(mContext.getString(R.string.net_error));
}
}
}).isDisposed();
}
public void giftUserSendWall(String liveUid, String toUid, HttpCallback<GiftAlreadyWallModel> callback) {
API.get().pdLiveApi(mContext)
.giftUserSendWall(liveUid, toUid)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<ResponseModel<GiftAlreadyWallModel>>() {
@Override
public void accept(ResponseModel<GiftAlreadyWallModel> giftAlreadyWallModelResponseModel) throws Exception {
if (callback != null) {
callback.onSuccess(giftAlreadyWallModelResponseModel.getData().getInfo());
}
}
}, new Consumer<Throwable>() {
@Override
public void accept(Throwable throwable) throws Exception {
if (callback != null) {
callback.onError(mContext.getString(R.string.net_error));
}
}
}).isDisposed();
}
public void giftWithoutWall(String liveUid, String toUid, HttpCallback<GiftAlreadyWallModel> callback) {
API.get().pdLiveApi(mContext)
.giftWithoutWall(liveUid, toUid)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<ResponseModel<GiftAlreadyWallModel>>() {
@Override
public void accept(ResponseModel<GiftAlreadyWallModel> giftAlreadyWallModelResponseModel) throws Exception {
if (callback != null) {
callback.onSuccess(giftAlreadyWallModelResponseModel.getData().getInfo());
}
}
}, new Consumer<Throwable>() {
@Override
public void accept(Throwable throwable) throws Exception {
if (callback != null) {
callback.onError(mContext.getString(R.string.net_error));
}
}
}).isDisposed();
}
public void giftDetail(String liveUid, String giftId, HttpCallback<GiftWallGiftDetail> callback) {
API.get().pdLiveApi(mContext)
.giftDetail(liveUid, giftId)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<ResponseModel<GiftWallGiftDetail>>() {
@Override
public void accept(ResponseModel<GiftWallGiftDetail> giftWallGiftDetailResponseModel) throws Exception {
if (callback != null) {
callback.onSuccess(giftWallGiftDetailResponseModel.getData().getInfo());
}
}
}, new Consumer<Throwable>() {
@Override
public void accept(Throwable throwable) throws Exception {
if (callback != null) {
callback.onError(mContext.getString(R.string.net_error));
}
}
}).isDisposed();
}
public void currentMonthGiftNaming(HttpCallback<List<GiftWallModel>> callback) {
API.get().pdLiveApi(mContext)
.currentMonthGiftNaming()
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<ResponseModel<List<GiftWallModel>>>() {
@Override
public void accept(ResponseModel<List<GiftWallModel>> listResponseModel) throws Exception {
if (callback != null) {
callback.onSuccess(listResponseModel.getData().getInfo());
}
}
}, new Consumer<Throwable>() {
@Override
public void accept(Throwable throwable) throws Exception {
if (callback != null) {
callback.onError(mContext.getString(R.string.net_error));
}
}
}).isDisposed();
}
public void lastMonthGiftNaming(HttpCallback<List<GiftWallModel>> callback) {
API.get().pdLiveApi(mContext)
.lastMonthGiftNaming()
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<ResponseModel<List<GiftWallModel>>>() {
@Override
public void accept(ResponseModel<List<GiftWallModel>> listResponseModel) throws Exception {
if (callback != null) {
callback.onSuccess(listResponseModel.getData().getInfo());
}
}
}, new Consumer<Throwable>() {
@Override
public void accept(Throwable throwable) throws Exception {
if (callback != null) {
callback.onError(mContext.getString(R.string.net_error));
}
}
}).isDisposed();
}
public void getGiftGuide(String liveUid, String toUid, HttpCallback<List<GiftGuideModel>> callback) {
API.get().pdLiveApi(mContext)
.getGiftGuide(liveUid, toUid)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<ResponseModel<List<GiftGuideModel>>>() {
@Override
public void accept(ResponseModel<List<GiftGuideModel>> listResponseModel) throws Exception {
if (callback != null) {
callback.onSuccess(listResponseModel.getData().getInfo());
}
}
}, new Consumer<Throwable>() {
@Override
public void accept(Throwable throwable) throws Exception {
if (callback != null) {
callback.onError(mContext.getString(R.string.net_error));
}
}
}).isDisposed();
}
public void getGiftGuideHistory(String toUid, String liveUid, HttpCallback<List<GiftGuideModel>> callback) {
API.get().pdLiveApi(mContext)
.getGiftGuideHistory(liveUid, toUid)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<ResponseModel<List<GiftGuideModel>>>() {
@Override
public void accept(ResponseModel<List<GiftGuideModel>> listResponseModel) throws Exception {
if (callback != null) {
callback.onSuccess(listResponseModel.getData().getInfo());
}
}
}, new Consumer<Throwable>() {
@Override
public void accept(Throwable throwable) throws Exception {
if (callback != null) {
callback.onError(mContext.getString(R.string.net_error));
}
}
}).isDisposed();
}
public void getUserMedalList(String toUid, HttpCallback<MedalAchievementModel> callback) {
API.get().pdLiveApi(mContext)
.getUserMedalList(toUid)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<ResponseModel<MedalAchievementModel>>() {
@Override
public void accept(ResponseModel<MedalAchievementModel> listResponseModel) throws Exception {
if (callback != null) {
callback.onSuccess(listResponseModel.getData().getInfo());
}
}
}, new Consumer<Throwable>() {
@Override
public void accept(Throwable throwable) throws Exception {
if (callback != null) {
callback.onError(mContext.getString(R.string.net_error));
}
}
}).isDisposed();
}
public void getLiveMedalList(String liveUid, HttpCallback<MedalAchievementModel> callback) {
API.get().pdLiveApi(mContext)
.getLiveMedalList(liveUid)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<ResponseModel<MedalAchievementModel>>() {
@Override
public void accept(ResponseModel<MedalAchievementModel> listResponseModel) throws Exception {
if (callback != null) {
callback.onSuccess(listResponseModel.getData().getInfo());
}
}
}, new Consumer<Throwable>() {
@Override
public void accept(Throwable throwable) throws Exception {
if (callback != null) {
callback.onError(mContext.getString(R.string.net_error));
}
}
}).isDisposed();
}
public void getFansExclusivePack(String liveUid, String packId, HttpCallback<FansGroupGiftPackInfo> callback) {
API.get().pdLiveApi(mContext)
.getFansExclusivePack(liveUid, packId)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<ResponseModel<FansGroupGiftPackInfo>>() {
@Override
public void accept(ResponseModel<FansGroupGiftPackInfo> listResponseModel) throws Exception {
if (callback != null) {
callback.onSuccess(listResponseModel.getData().getInfo());
}
}
}, new Consumer<Throwable>() {
@Override
public void accept(Throwable throwable) throws Exception {
if (callback != null) {
callback.onError(mContext.getString(R.string.net_error));
}
}
}).isDisposed();
}
public void buyFansExclusivePack(String liveUid, String packId, String stream, HttpCallback<HttpCallbackModel> callback) {
API.get().pdLiveApi(mContext)
.buyFansExclusivePack(liveUid, packId, stream)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<ResponseModel<HttpCallbackModel>>() {
@Override
public void accept(ResponseModel<HttpCallbackModel> listResponseModel) throws Exception {
if (callback != null) {
callback.onSuccess(listResponseModel.getData().getInfo());
}
}
}, new Consumer<Throwable>() {
@Override
public void accept(Throwable throwable) throws Exception {
if (callback != null) {
callback.onError(mContext.getString(R.string.net_error));
}
}
}).isDisposed();
}
public void userFansExclusivePackList(String liveUid, HttpCallback<List<FansGroupGiftPack>> callback) {
API.get().pdLiveApi(mContext)
.userFansExclusivePackList(liveUid)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<ResponseModel<List<FansGroupGiftPack>>>() {
@Override
public void accept(ResponseModel<List<FansGroupGiftPack>> listResponseModel) throws Exception {
if (callback != null) {
callback.onSuccess(listResponseModel.getData().getInfo());
}
}
}, new Consumer<Throwable>() {
@Override
public void accept(Throwable throwable) throws Exception {
if (callback != null) {
callback.onError(mContext.getString(R.string.net_error));
}
}
}).isDisposed();
}
public void getCheckFansLevelUpgrade(String liveUid, HttpCallback<FansCheckRed> callback) {
API.get().pdLiveApi(mContext)
.getCheckFansLevelUpgrade(liveUid)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<ResponseModel<FansCheckRed>>() {
@Override
public void accept(ResponseModel<FansCheckRed> listResponseModel) throws Exception {
if (callback != null) {
callback.onSuccess(listResponseModel.getData().getInfo());
}
}
}, new Consumer<Throwable>() {
@Override
public void accept(Throwable throwable) throws Exception {
if (callback != null) {
callback.onError(mContext.getString(R.string.net_error));
}
}
}).isDisposed();
}
public void getGiftNamingInfo(String giftId,HttpCallback<GiftNamingInfoModel> callback) {
API.get().pdLiveApi(mContext)
.getGiftNamingInfo(giftId)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<ResponseModel<GiftNamingInfoModel>>() {
@Override
public void accept(ResponseModel<GiftNamingInfoModel> liveGiftBeanResponseModel) throws Exception {
if (callback!=null){
callback.onSuccess(liveGiftBeanResponseModel.getData().getInfo());
}
}
}, new Consumer<Throwable>() {
@Override
public void accept(Throwable throwable) throws Exception {
if (callback != null) {
callback.onError(mContext.getString(R.string.net_error));
}
}
}).isDisposed();
}
/**
* 直播间取消网络请求
*/

View File

@@ -0,0 +1,53 @@
package com.yunbao.common.manager;
import android.content.Context;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import com.yunbao.common.bean.GiftQuantityModel;
import com.yunbao.common.bean.LiveClassBean;
import com.yunbao.common.manager.base.BaseCacheManager;
import java.util.List;
public class GiftQuantityManager extends BaseCacheManager {
private final static String KEY_GIFT_QUANTITY = "GiftQuantity";
private static GiftQuantityManager manager;
private Context context;
private List<GiftQuantityModel> giftQuantityModels;
public GiftQuantityManager(Context context) {
super(context);
}
/**
* 获取指导员备注信息
*
* @return
*/
public List<GiftQuantityModel> getGiftQuantity() {
List<GiftQuantityModel> giftQuantityModels = getList(KEY_GIFT_QUANTITY, new TypeToken<List<GiftQuantityModel>>() {
}.getType());
if (giftQuantityModels == null || giftQuantityModels.size() == 0) {
giftQuantityModels.add(new GiftQuantityModel().setGiftQuantity("1314").setFontColour("#05F3EC"));
giftQuantityModels.add(new GiftQuantityModel().setGiftQuantity("520").setFontColour("#65BFFB"));
giftQuantityModels.add(new GiftQuantityModel().setGiftQuantity("100").setFontColour("#9B62FF"));
giftQuantityModels.add(new GiftQuantityModel().setGiftQuantity("88").setFontColour("#FA62A1"));
giftQuantityModels.add(new GiftQuantityModel().setGiftQuantity("66").setFontColour("#ffffff"));
giftQuantityModels.add(new GiftQuantityModel().setGiftQuantity("10").setFontColour("#ffffff"));
giftQuantityModels.add(new GiftQuantityModel().setGiftQuantity("1").setFontColour("#ffffff"));
}
return giftQuantityModels;
}
/**
* 缓存等级图标
*
* @param json
*/
public void UpGiftQuantity(String json) {
giftQuantityModels = new Gson().fromJson(json, new TypeToken<List<GiftQuantityModel>>() {
}.getType());
put(KEY_GIFT_QUANTITY, giftQuantityModels);
}
}

View File

@@ -47,6 +47,7 @@ public class IMLoginManager extends BaseCacheManager {
private final String keyDefaultBubbleUrl = "defaultBubbleUrl";
private final String STATUS_ANCHOR_SAY = "anchorSay";
private final String STATUS_ANCHOR_CALL = "anchorCallMe";
private final String LIVE_NOTIFY_SETTINGS = "liveNotifySettings";//开播通知
private final String KEY_LANGUAGE = "language";
@@ -280,6 +281,10 @@ public class IMLoginManager extends BaseCacheManager {
return userInfo;
}
public void setMedalName(String medalName) {
userInfo.setMedalName(medalName);
}
/**
* 判断是否已登录
*
@@ -354,6 +359,14 @@ public class IMLoginManager extends BaseCacheManager {
return getBoolean(GiftEffect, !(Build.VERSION.SDK_INT < Build.VERSION_CODES.O));
}
public void setLiveNotifySettings(boolean isTrue) {
put(LIVE_NOTIFY_SETTINGS, isTrue);
}
public boolean isLiveNotifySettings() {
return getBoolean(LIVE_NOTIFY_SETTINGS, true);
}
/**
* 重新请求管理员身份信息
*/

View File

@@ -4,6 +4,7 @@ import android.content.Context;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import com.yunbao.common.bean.FansModel;
import com.yunbao.common.bean.NewLevelModel;
import com.yunbao.common.manager.base.BaseCacheManager;
@@ -17,9 +18,11 @@ public class NewLevelManager extends BaseCacheManager {
private final String KEY_USER_LEVEL = "keyUserLevel";
private final String KEY_ANCHOR_LEVEL = "keyAnchorLevel";
private final String KEY_LIVE_LEVEL = "keyLiveLevel";
private final String KEY_FANS_LEVEL = "keyFansLevel";
private List<NewLevelModel> newLevelModels = new ArrayList<>();
private List<NewLevelModel> keyAnchorLevel = new ArrayList<>();
private List<FansModel> fansModels = new ArrayList<>();
public NewLevelManager(Context context) {
super(context);
@@ -36,6 +39,29 @@ public class NewLevelManager extends BaseCacheManager {
put(KEY_USER_LEVEL, newLevelModels);
}
public void upDataFansLevel(String json) {
fansModels = new Gson().fromJson(json, new TypeToken<List<FansModel>>() {
}.getType());
put(KEY_FANS_LEVEL, fansModels);
}
public List<FansModel> getFansLevel() {
fansModels = getList(KEY_FANS_LEVEL, new TypeToken<List<FansModel>>() {
}.getType());
return fansModels;
}
public FansModel getFansModel(int level) {
getFansLevel();
FansModel fansModel = null;
for (FansModel model : fansModels) {
if (model.getLevelid() == level) {
fansModel = model;
}
}
return fansModel;
}
/**
* 获取等级数据
*
@@ -45,6 +71,7 @@ public class NewLevelManager extends BaseCacheManager {
return getList(KEY_USER_LEVEL, new TypeToken<List<NewLevelModel>>() {
}.getType());
}
/**
* 缓存等级图标
*

View File

@@ -401,7 +401,7 @@ public class RandomPkManager {
* 清空状态,下播时调用
*/
public void release() {
status = PK_STATUS_REQUEST;
status = PK_STATUS_DEFAULT;
if (task != null) {
task.cancel();
}

View File

@@ -0,0 +1,56 @@
package com.yunbao.common.utils;
import android.content.Context;
import android.graphics.Bitmap;
import android.renderscript.Allocation;
import android.renderscript.Element;
import android.renderscript.RenderScript;
import android.renderscript.ScriptIntrinsicBlur;
/**
* Created by L on 2017/10/12.
*/
public class BlurBitmapUtil {
/**
* 图片缩放比例
*/
private static final float BITMAP_SCALE = 0.4f;
/**
* 最大模糊度(在0.0到25.0之间)
*/
private static final float BLUR_RADIUS = 25f;
/**
* 模糊图片的具体方法
*
* @param context 上下文对象
* @param image 需要模糊的图片
* @return 模糊处理后的图片
*/
public static Bitmap blur(Context context, Bitmap image) {
// 计算图片缩小后的长宽
int width = Math.round(image.getWidth() * BITMAP_SCALE);
int height = Math.round(image.getHeight() * BITMAP_SCALE);
// 将缩小后的图片做为预渲染的图片。
Bitmap inputBitmap = Bitmap.createScaledBitmap(image, width, height, false);
// 创建一张渲染后的输出图片。
Bitmap outputBitmap = Bitmap.createBitmap(inputBitmap);
// 创建RenderScript内核对象
RenderScript rs = RenderScript.create(context);
// 创建一个模糊效果的RenderScript的工具对象
ScriptIntrinsicBlur blurScript = ScriptIntrinsicBlur.create(rs, Element.U8_4(rs));
// 由于RenderScript并没有使用VM来分配内存,所以需要使用Allocation类来创建和分配内存空间。
// 创建Allocation对象的时候其实内存是空的,需要使用copyTo()将数据填充进去。
Allocation tmpIn = Allocation.createFromBitmap(rs, inputBitmap);
Allocation tmpOut = Allocation.createFromBitmap(rs, outputBitmap);
// 设置渲染的模糊程度, 25f是最大模糊度
blurScript.setRadius(BLUR_RADIUS);
// 设置blurScript对象的输入内存
blurScript.setInput(tmpIn);
// 将输出数据保存到输出内存中
blurScript.forEach(tmpOut);
// 将数据填充到Allocation中
tmpOut.copyTo(outputBitmap);
return outputBitmap;
}
}

View File

@@ -22,6 +22,8 @@ import com.yunbao.common.bean.UserBean;
import com.yunbao.common.bean.VideoBean;
import com.yunbao.common.bean.VideoListBean;
import com.yunbao.common.event.JavascriptInterfaceEvent;
import com.yunbao.common.http.HttpCallback;
import com.yunbao.common.http.HttpClient;
import com.yunbao.common.interfaces.CommonCallback;
import com.yunbao.common.manager.IMLoginManager;
@@ -542,9 +544,52 @@ public class JavascriptInterfaceUtils {
Bus.get().post(new JavascriptInterfaceEvent()
.setMethod("closeLiveRoom"));
}
@JavascriptInterface
public void clickLogOffAccount() {
Bus.get().post(new JavascriptInterfaceEvent()
.setMethod("clickLogOffAccount"));
}
@JavascriptInterface
public void androidFansGroupBuy(String id){
Bus.get().post(new JavascriptInterfaceEvent()
.setMethod("androidFansGroupBuy").setUserId(id));
}
@JavascriptInterface
public void androidFansGroupPack(){
Bus.get().post(new JavascriptInterfaceEvent()
.setMethod("androidFansGroupPack"));
}
@JavascriptInterface
public void androidFansGroupInfo(){
Bus.get().post(new JavascriptInterfaceEvent()
.setMethod("androidFansGroupInfo"));
}
@JavascriptInterface
public void toGiftNamingAlertAllPageView(String mAnchorName, String mLiveUid, String mAvatarUrl,int isAnchor ) {
RouteUtil.forwardGiftWallActivity("", mAnchorName, mLiveUid, mAvatarUrl, 0,isAnchor==1);
}
@JavascriptInterface
public void wearOrCancelFanMedal(){
HttpClient.getInstance().get("User.getBaseInfos", "getBaseInfo")
.params("uid", IMLoginManager.get(mContext).getUserInfo().getId())
.params("token", IMLoginManager.get(mContext).getUserInfo().getToken())
.execute(new HttpCallback() {
@Override
public void onSuccess(int code, String msg, String[] info) {
if (code == 0 && info.length > 0) {
IMLoginManager.get(mContext).upDataUserInfo(info[0]);
JSONObject obj = JSON.parseObject(info[0]);
UserBean bean = JSON.toJavaObject(obj, UserBean.class);
CommonAppConfig.getInstance().setUserBean(bean);
}
}
});
}
@JavascriptInterface
public void androidCancelAnchorAttention(){
Bus.get().post(new JavascriptInterfaceEvent()
.setMethod("androidCancelAnchorAttention"));
}
}

View File

@@ -1,4 +1,4 @@
package com.yunbao.live.presenter;
package com.yunbao.common.utils;
import android.app.Activity;
import android.app.Dialog;
@@ -10,19 +10,15 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.yunbao.common.CommonAppConfig;
import com.yunbao.common.Constants;
import com.yunbao.common.R;
import com.yunbao.common.bean.CheckLiveModel;
import com.yunbao.common.bean.LiveBean;
import com.yunbao.common.event.LiveErrorEvent;
import com.yunbao.common.http.HttpCallback;
import com.yunbao.common.http.LiveHttpConsts;
import com.yunbao.common.http.LiveHttpUtil;
import com.yunbao.common.http.base.CheckLiveCallBack;
import com.yunbao.common.http.live.LiveNetManager;
import com.yunbao.common.utils.Bus;
import com.yunbao.common.utils.DialogUitl;
import com.yunbao.common.utils.MD5Util;
import com.yunbao.common.utils.ToastUtil;
import com.yunbao.live.R;
import com.yunbao.live.event.LiveAudienceEvent;
import com.yunbao.live.http.LiveHttpConsts;
import com.yunbao.live.http.LiveHttpUtil;
/**
* Created by cxf on 2017/9/29.
@@ -111,8 +107,7 @@ public class LiveRoomCheckLivePresenter {
@Override
public void onError(String error) {
Log.e("直播间异常", "onError: " + error);
Bus.get().post(new LiveAudienceEvent()
.setType(LiveAudienceEvent.LiveAudienceType.LIVE_ROOM_EXCEPTION));
Bus.get().post(new LiveErrorEvent());
ToastUtil.show(error);
}
});
@@ -162,8 +157,7 @@ public class LiveRoomCheckLivePresenter {
}
} else {
Log.e("直播间异常", "Error: " + msg);
Bus.get().post(new LiveAudienceEvent()
.setType(LiveAudienceEvent.LiveAudienceType.LIVE_ROOM_EXCEPTION));
Bus.get().post(new LiveErrorEvent());
ToastUtil.show(msg);
}
}

View File

@@ -2,10 +2,10 @@ package com.yunbao.common.utils;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.tencent.map.geolocation.TencentLocation;
import com.tencent.map.geolocation.TencentLocationListener;
import com.tencent.map.geolocation.TencentLocationManager;
import com.tencent.map.geolocation.TencentLocationRequest;
//import com.tencent.map.geolocation.TencentLocation;
//import com.tencent.map.geolocation.TencentLocationListener;
//import com.tencent.map.geolocation.TencentLocationManager;
//import com.tencent.map.geolocation.TencentLocationRequest;
import com.yunbao.common.CommonAppConfig;
import com.yunbao.common.CommonAppContext;
import com.yunbao.common.bean.TxLocationBean;
@@ -23,12 +23,12 @@ import java.util.List;
public class LocationUtil {
private static final String TAG = "定位";
private static LocationUtil sInstance;
private TencentLocationManager mLocationManager;
// private TencentLocationManager mLocationManager;
private boolean mLocationStarted;
private boolean mNeedPostLocationEvent;//是否需要发送定位成功事件
private LocationUtil() {
mLocationManager = TencentLocationManager.getInstance(CommonAppContext.sInstance);
// mLocationManager = TencentLocationManager.getInstance(CommonAppContext.sInstance);
}
public static LocationUtil getInstance() {
@@ -42,26 +42,26 @@ public class LocationUtil {
return sInstance;
}
private TencentLocationListener mLocationListener = new TencentLocationListener() {
@Override
public void onLocationChanged(TencentLocation location, int code, String reason) {
if (code == TencentLocation.ERROR_OK) {
double lng = location.getLongitude();//经度
double lat = location.getLatitude();//纬度
L.e(TAG, "获取经纬度成功------>经度:" + lng + ",纬度:" + lat);
CommonHttpUtil.getAddressInfoByTxLocaitonSdk(lng, lat, 0, 1, CommonHttpConsts.GET_LOCAITON, mCallback);
if (mNeedPostLocationEvent) {
EventBus.getDefault().post(new LocationEvent(lng, lat));
}
}
}
@Override
public void onStatusUpdate(String s, int i, String s1) {
}
};
//
// private TencentLocationListener mLocationListener = new TencentLocationListener() {
// @Override
// public void onLocationChanged(TencentLocation location, int code, String reason) {
// if (code == TencentLocation.ERROR_OK) {
// double lng = location.getLongitude();//经度
// double lat = location.getLatitude();//纬度
// L.e(TAG, "获取经纬度成功------>经度:" + lng + ",纬度:" + lat);
// CommonHttpUtil.getAddressInfoByTxLocaitonSdk(lng, lat, 0, 1, CommonHttpConsts.GET_LOCAITON, mCallback);
// if (mNeedPostLocationEvent) {
// EventBus.getDefault().post(new LocationEvent(lng, lat));
// }
// }
// }
//
// @Override
// public void onStatusUpdate(String s, int i, String s1) {
//
// }
// };
private HttpCallback mCallback = new HttpCallback() {
@Override
@@ -86,29 +86,29 @@ public class LocationUtil {
//启动定位
public void startLocation() {
if (!mLocationStarted && mLocationManager != null) {
mLocationStarted = true;
L.e(TAG, "开启定位");
TencentLocationRequest request = TencentLocationRequest
.create()
.setRequestLevel(TencentLocationRequest.REQUEST_LEVEL_GEO)
.setInterval(60 * 60 * 1000);//1小时定一次位
//当定位周期大于0时, 不论是否有得到新的定位结果, 位置监听器都会按定位周期定时被回调;
// 当定位周期等于0时, 仅当有新的定位结果时, 位置监听器才会被回调(即, 回调时机存在不确定性).
// 如果需要周期性回调, 建议将 定位周期 设置为 5000-10000ms
mLocationManager.requestLocationUpdates(request, mLocationListener);
}
// if (!mLocationStarted && mLocationManager != null) {
// mLocationStarted = true;
// L.e(TAG, "开启定位");
// TencentLocationRequest request = TencentLocationRequest
// .create()
// .setRequestLevel(TencentLocationRequest.REQUEST_LEVEL_GEO)
// .setInterval(60 * 60 * 1000);//1小时定一次位
//
// //当定位周期大于0时, 不论是否有得到新的定位结果, 位置监听器都会按定位周期定时被回调;
// // 当定位周期等于0时, 仅当有新的定位结果时, 位置监听器才会被回调(即, 回调时机存在不确定性).
// // 如果需要周期性回调, 建议将 定位周期 设置为 5000-10000ms
// mLocationManager.requestLocationUpdates(request, mLocationListener);
// }
}
//停止定位
public void stopLocation() {
CommonHttpUtil.cancel(CommonHttpConsts.GET_LOCAITON);
if (mLocationStarted && mLocationManager != null) {
L.e(TAG, "关闭定位");
mLocationManager.removeUpdates(mLocationListener);
mLocationStarted = false;
}
// CommonHttpUtil.cancel(CommonHttpConsts.GET_LOCAITON);
// if (mLocationStarted && mLocationManager != null) {
// L.e(TAG, "关闭定位");
// mLocationManager.removeUpdates(mLocationListener);
// mLocationStarted = false;
// }
}
public void setNeedPostLocationEvent(boolean needPostLocationEvent) {

View File

@@ -266,8 +266,7 @@ public class LogUtil {
.connectTimeout(3, TimeUnit.SECONDS)
.build();
Request request = new Request.Builder()
//.url("https://newht.yaoulive.com/index.php/api/error_log/report") //无法接受文件
.url("https://tools.yutou233.cn/public/file/request.do")//临时上报地址,可接受文件
.url("https://newht.yaoulive.com/index.php/api/error_log/report") //无法接受文件
.post(requestBody)
.build();
client.newCall(request)

View File

@@ -23,6 +23,9 @@ public class NobleUtil {
return -1;
}
public static String nobleIdToStringName(int id){
if(!WordUtil.isNewZh()){
return nobleIdToStringNameForEn(id);
}
switch (id){
case 1:return "男爵";
case 2:return "子爵";
@@ -34,6 +37,18 @@ public class NobleUtil {
}
return "未开通";
}
public static String nobleIdToStringNameForEn(int id){
switch (id){
case 1:return "baron";
case 2:return "viscount";
case 3:return "marquis";
case 4:return "duke";
case 5:return "king";
case 6:return "emperor";
case 7:return "SuperEmperor";
}
return "Not Opened";
}
public static int getNobleBackgroundId(int id){
switch (id){
case 1:return R.mipmap.img_aristocrat_nanjue;

View File

@@ -35,6 +35,7 @@ public class RouteUtil {
public static final String PATH_MAIN = "/main/MainActivity";
public static final String PATH_ENTRY = "/main/EntryActivity";
public static final String PATH_LIVE_AUDIENCE = "/live/LiveAudienceActivity";
public static final String PATH_GIFT_WALL = "/live/GiftWallActivity";
public static final String PATH_SETTING = "/main/SettingActivity";
public static final String PATH_FANSACTIVITY = "/main/FansActivity";
public static final String PATH_MYWEBVIEWACTIVTITY2 = "/main/MyWebViewActivity2";
@@ -43,6 +44,7 @@ public class RouteUtil {
public static final String PATH_RED_PACKET_LIST = "/main/RedPacketListActivity";
public static final String PATH_RED_PACKET_INFO = "/main/RedPacketInfoActivity";
public static final String PATH_RED_PACKET_USER = "/main/RedPacketUsersActivity";
public static final String PATH_SELECT_AVATAR="/main/UserAvatarSelectActivity";
public static void forwardFansActivity(String uid) {
ARouter.getInstance().build(PATH_FANSACTIVITY)
@@ -232,6 +234,16 @@ public class RouteUtil {
postcard.navigation();
}
public static void forwardGiftWallActivity(String mStream, String mAnchorName, String mLiveUid, String mAvatarUrl, int isAttention,boolean isLive) {
ARouter.getInstance().build(PATH_GIFT_WALL)
.withString(Constants.LIVE_UID, mLiveUid)
.withString(Constants.STREAM, mStream)
.withString("mAnchorName", mAnchorName)
.withString("mAvatarUrl", mAvatarUrl)
.withInt("isAttention", isAttention)
.withBoolean("isLive",isLive)
.navigation();
}
/**
* 举报个人
@@ -287,6 +299,7 @@ public class RouteUtil {
/**
* 红包发放情况
*
* @param id 发放者uid
*/
public static void forwardRedPacketUser(int id) {
@@ -294,4 +307,12 @@ public class RouteUtil {
.withInt("id", id)
.navigation();
}
/**
* 系统头像选择
*/
public static void forwardUserAvatarSelect(){
ARouter.getInstance().build(PATH_SELECT_AVATAR)
.navigation();
}
}

View File

@@ -0,0 +1,22 @@
package com.yunbao.common.views;
import android.view.View;
import android.widget.ImageView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import com.yunbao.common.R;
import com.yunbao.common.bean.UserMedalModel;
import com.yunbao.common.glide.ImgLoader;
public class AchievementDetailsViewHolder extends RecyclerView.ViewHolder {
private ImageView achievementImg;
public AchievementDetailsViewHolder(@NonNull View itemView) {
super(itemView);
achievementImg = itemView.findViewById(R.id.achievement_img);
}
public void showData(UserMedalModel userMedalModel){
ImgLoader.display(itemView.getContext(), userMedalModel.getDisplaySrc(), achievementImg);
}
}

View File

@@ -80,10 +80,13 @@ public class DayWishItemViewHolder extends RecyclerView.ViewHolder {
@Override
public void onViewClicks() {
int number = model.wishProgress();
model.setWishlistNum(String.valueOf(number - 1));
if (listener != null) {
listener.onUpdate(model, index);
if (number>1){
model.setWishlistNum(String.valueOf(number - 1));
if (listener != null) {
listener.onUpdate(model, index);
}
}
}
});
} else {

View File

@@ -0,0 +1,39 @@
package com.yunbao.common.views;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import com.yunbao.common.R;
import com.yunbao.common.bean.GiftWallModel;
import com.yunbao.common.event.GiftWallItemEvent;
import com.yunbao.common.glide.ImgLoader;
import com.yunbao.common.utils.Bus;
import com.yunbao.common.views.weight.ViewClicksAntiShake;
public class GiftAlreadyWallViewHolder extends RecyclerView.ViewHolder {
private ImageView giftImg;
private TextView giftTitle, giftNumber;
public GiftAlreadyWallViewHolder(@NonNull View itemView) {
super(itemView);
giftImg = itemView.findViewById(R.id.gift_img);
giftTitle = itemView.findViewById(R.id.gift_title);
giftNumber = itemView.findViewById(R.id.gift_number);
}
public void showData(GiftWallModel giftWallModel,boolean sbWy) {
giftTitle.setText(giftWallModel.getGiftname());
giftNumber.setText("*" + giftWallModel.getGiftCountNumber());
ImgLoader.display(itemView.getContext(), giftWallModel.getGifticon(), giftImg);
ViewClicksAntiShake.clicksAntiShake(itemView, new ViewClicksAntiShake.ViewClicksCallBack() {
@Override
public void onViewClicks() {
Bus.get().post(new GiftWallItemEvent().setGiftWallModel(giftWallModel).setUnlit(true));
}
});
}
}

View File

@@ -0,0 +1,34 @@
package com.yunbao.common.views;
import android.graphics.Color;
import android.view.View;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import com.yunbao.common.R;
import com.yunbao.common.bean.GiftQuantityModel;
import com.yunbao.common.event.GiftNumberEvent;
import com.yunbao.common.utils.Bus;
import com.yunbao.common.views.weight.ViewClicksAntiShake;
public class GiftNumber extends RecyclerView.ViewHolder {
private TextView customQuantity;
public GiftNumber(@NonNull View itemView) {
super(itemView);
customQuantity = itemView.findViewById(R.id.custom_quantity);
}
public void showData(GiftQuantityModel quantityModel) {
customQuantity.setText(quantityModel.getGiftQuantity());
customQuantity.setTextColor(Color.parseColor(quantityModel.getFontColour()));
ViewClicksAntiShake.clicksAntiShake(customQuantity, new ViewClicksAntiShake.ViewClicksCallBack() {
@Override
public void onViewClicks() {
Bus.get().post(new GiftNumberEvent().setmCount(quantityModel.getGiftQuantity()));
}
});
}
}

View File

@@ -0,0 +1,94 @@
package com.yunbao.common.views;
import android.content.Context;
import android.text.TextUtils;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.lxj.xpopup.XPopup;
import com.lxj.xpopup.core.BottomPopupView;
import com.yunbao.common.R;
import com.yunbao.common.adapter.GiftNumberAdapter;
import com.yunbao.common.event.GiftNumberEvent;
import com.yunbao.common.manager.GiftQuantityManager;
import com.yunbao.common.utils.Bus;
import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.views.weight.ViewClicksAntiShake;
import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;
public class GiftNumberPopup extends BottomPopupView {
public GiftNumberPopup(@NonNull Context context) {
super(context);
}
// 返回自定义弹窗的布局
@Override
protected int getImplLayoutId() {
return R.layout.view_live_gift_number;
}
// 执行初始化操作比如findView设置点击或者任何你弹窗内的业务逻辑
@Override
protected void onCreate() {
Bus.getOn(this);
super.onCreate();
RecyclerView giftList = findViewById(R.id.gift_list);
giftList.setLayoutManager(new LinearLayoutManager(getContext(), LinearLayoutManager.VERTICAL, false));
GiftNumberAdapter giftNumberAdapter = new GiftNumberAdapter(new GiftQuantityManager(getContext()).getGiftQuantity());
giftList.setAdapter(giftNumberAdapter);
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.to_can), new ViewClicksAntiShake.ViewClicksCallBack() {
@Override
public void onViewClicks() {
dismiss();
Bus.get().post(new GiftNumberEvent().setmCount("-1"));
}
});
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.custom_quantity), new ViewClicksAntiShake.ViewClicksCallBack() {
@Override
public void onViewClicks() {
dismiss();
new XPopup.Builder(getContext())
.asCustom(new InputCustomPopup(getContext(),
getContext().getString(R.string.the_title_financier3),
R.string.custom_quantity, true)
.setMaxValue(4)
.setListener(new InputCustomPopup.InputCustomListener() {
@Override
public void onConfirm(String text) {
if (!TextUtils.isEmpty(text)) {
int number = Integer.parseInt(text);
if (1 <= number && number <= 9999) {
Bus.get().post(new GiftNumberEvent().setmCount(text));
} else {
ToastUtil.show(String.format(getContext().getString(R.string.range_range_is), "1~9999"));
Bus.get().post(new GiftNumberEvent().setmCount("-1"));
}
} else {
ToastUtil.show(String.format(getContext().getString(R.string.range_range_is), "1~9999"));
Bus.get().post(new GiftNumberEvent().setmCount("-1"));
}
}
})).show();
}
});
}
@Override
protected void onDismiss() {
super.onDismiss();
Bus.getOff(this);
}
@Subscribe(threadMode = ThreadMode.MAIN)
public void onGiftNumberEvent(GiftNumberEvent event) {
dismiss();
}
}

View File

@@ -0,0 +1,37 @@
package com.yunbao.common.views;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import com.yunbao.common.R;
import com.yunbao.common.bean.GiftWallModel;
import com.yunbao.common.event.GiftWallItemEvent;
import com.yunbao.common.glide.ImgLoader;
import com.yunbao.common.utils.Bus;
import com.yunbao.common.views.weight.ViewClicksAntiShake;
public class GiftWithoutWallViewHolder extends RecyclerView.ViewHolder {
private ImageView giftImg;
private TextView giftTitle;
public GiftWithoutWallViewHolder(@NonNull View itemView) {
super(itemView);
giftImg = itemView.findViewById(R.id.gift_img);
giftTitle = itemView.findViewById(R.id.gift_title);
}
public void showData(GiftWallModel giftWallModel) {
giftTitle.setText(giftWallModel.getGiftname());
ImgLoader.display(itemView.getContext(), giftWallModel.getGifticon(), giftImg);
ViewClicksAntiShake.clicksAntiShake(itemView, new ViewClicksAntiShake.ViewClicksCallBack() {
@Override
public void onViewClicks() {
Bus.get().post(new GiftWallItemEvent().setGiftWallModel(giftWallModel).setUnlit(false));
}
});
}
}

View File

@@ -1,6 +1,8 @@
package com.yunbao.common.views;
import android.content.Context;
import android.text.InputFilter;
import android.text.InputType;
import android.text.TextUtils;
import android.view.View;
import android.widget.EditText;
@@ -20,6 +22,8 @@ import com.yunbao.common.views.weight.ViewClicksAntiShake;
public class InputCustomPopup extends CenterPopupView {
private String message = "";
private int title = R.string.dialog_tip;
private boolean isType;
private int maxValue=0;
public InputCustomPopup(@NonNull Context context, String message, int title) {
super(context);
@@ -27,7 +31,19 @@ public class InputCustomPopup extends CenterPopupView {
this.title = title;
}
public InputCustomPopup(@NonNull Context context,int title) {
public InputCustomPopup(@NonNull Context context, String message, int title, boolean isType) {
super(context);
this.message = message;
this.title = title;
this.isType = isType;
}
public InputCustomPopup setMaxValue(int maxValue) {
this.maxValue = maxValue;
return this;
}
public InputCustomPopup(@NonNull Context context, int title) {
super(context);
this.title = title;
}
@@ -44,7 +60,16 @@ public class InputCustomPopup extends CenterPopupView {
super.onCreate();
EditText content = findViewById(R.id.content);
TextView titleText = findViewById(R.id.title);
content.setText(message);
if(maxValue>0){
content.setFilters(new InputFilter[]{new InputFilter.LengthFilter(maxValue)});
}
if (isType) {
content.setHint(message);
content.setInputType(InputType.TYPE_CLASS_NUMBER);
} else {
content.setText(message);
}
titleText.setText(title);
findViewById(R.id.btn_cancel).setOnClickListener(new OnClickListener() {
@Override

View File

@@ -98,7 +98,6 @@ public class LiveNewWishListPopup extends BottomPopupView {
private void saveWishDialog(boolean isDismiss) {
if (hintCustomPopup != null) return;
hintCustomPopup = new HintCustomPopup(
getContext(),
getContext().getString(R.string.replacement_reset_confirmed_cancel3),
@@ -110,17 +109,15 @@ public class LiveNewWishListPopup extends BottomPopupView {
public void onSure() {
hintCustomPopup = null;
if (dayWish) {
dayWishFragment.saveWish();
dayWishFragment.saveWish( );
} else if (zhouXin) {
zhouXinFragment.saveWish();
zhouXinFragment.saveWish( );
} else if (lunarWish) {
lunarWishFragment.saveWish();
lunarWishFragment.saveWish( );
} else if (seasonalWish) {
seasonalWishFragment.saveWish();
}
if (isDismiss) {
dismiss();
seasonalWishFragment.saveWish( );
}
}
@Override
@@ -167,6 +164,7 @@ public class LiveNewWishListPopup extends BottomPopupView {
.setWishlistName(event.getModel().getName())
.setWishlistIcon(event.getModel().getImg())
.setWishlistNum("1")
.setLid(event.getModel().getId())
.setLuid("" + IMLoginManager.get(mContext).getUserInfo().getId())
.setWishlistProgress("0")
.setPrice(Integer.parseInt(event.getModel().getPrice()))
@@ -334,7 +332,7 @@ public class LiveNewWishListPopup extends BottomPopupView {
setWishlistV2(type, gson.toJson(wishList2), new HttpCallback<String>() {
@Override
public void onSuccess(String data) {
ToastUtil.show(data);
ToastUtil.show("修改成功");
}
@Override

View File

@@ -77,10 +77,13 @@ public class LunarWishItemViewHolder extends RecyclerView.ViewHolder {
@Override
public void onViewClicks() {
int number = model.wishProgress();
model.setWishlistNum(String.valueOf(number - 1));
if (listener != null) {
listener.onUpdate(model, index);
if (number>1){
model.setWishlistNum(String.valueOf(number - 1));
if (listener != null) {
listener.onUpdate(model, index);
}
}
}
});
} else {

View File

@@ -0,0 +1,48 @@
package com.yunbao.common.views;
import android.graphics.Color;
import android.text.TextUtils;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import com.lxj.xpopup.XPopup;
import com.yunbao.common.R;
import com.yunbao.common.bean.UserMedalListModel;
import com.yunbao.common.dialog.AchievementDetailsPopup;
import com.yunbao.common.glide.ImgLoader;
import com.yunbao.common.views.weight.ViewClicksAntiShake;
public class MedalAchievementViewHolder extends RecyclerView.ViewHolder {
private ImageView achievementImg;
private TextView giftWall;
public MedalAchievementViewHolder(@NonNull View itemView) {
super(itemView);
achievementImg = itemView.findViewById(R.id.achievement_img);
giftWall = itemView.findViewById(R.id.gift_wall);
}
public void showData(UserMedalListModel userMedalListModel) {
if (TextUtils.equals(userMedalListModel.getDressStatus(), "1")) {
ImgLoader.display(itemView.getContext(), userMedalListModel.getDisplaySrc(), achievementImg);
giftWall.setTextColor(Color.parseColor("#6F43FF"));
} else {
ImgLoader.display(itemView.getContext(), userMedalListModel.getDisplaySrcSecond(), achievementImg);
giftWall.setTextColor(Color.parseColor("#53408F"));
}
giftWall.setText(userMedalListModel.getDressName());
ViewClicksAntiShake.clicksAntiShake(itemView, new ViewClicksAntiShake.ViewClicksCallBack() {
@Override
public void onViewClicks() {
new XPopup.Builder(itemView.getContext())
.enableDrag(false)
.asCustom(new AchievementDetailsPopup(itemView.getContext(), userMedalListModel))
.show();
}
});
}
}

View File

@@ -0,0 +1,35 @@
package com.yunbao.common.views;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import com.yunbao.common.R;
import com.yunbao.common.bean.GiftWallModel;
import com.yunbao.common.glide.ImgLoader;
public class MonthGiftNamingViewHolder extends RecyclerView.ViewHolder {
private ImageView giftImg, avatar;
private TextView giftTitle, namingCoin, userName;
public MonthGiftNamingViewHolder(@NonNull View itemView) {
super(itemView);
giftImg = itemView.findViewById(R.id.gift_img);
avatar = itemView.findViewById(R.id.avatar);
giftTitle = itemView.findViewById(R.id.gift_title);
namingCoin = itemView.findViewById(R.id.naming_coin);
userName = itemView.findViewById(R.id.user_name);
}
public void showData(GiftWallModel giftWallModel) {
giftTitle.setText(giftWallModel.getGiftname());
namingCoin.setText("*"+giftWallModel.getNamingCoinMax());
userName.setText(giftWallModel.getUserNicename());
ImgLoader.display(itemView.getContext(), giftWallModel.getGifticon(), giftImg);
ImgLoader.display(itemView.getContext(), giftWallModel.getAvatar(), avatar);
}
}

View File

@@ -77,10 +77,13 @@ public class SeasonalWishItemViewHolder extends RecyclerView.ViewHolder {
@Override
public void onViewClicks() {
int number = model.wishProgress();
model.setWishlistNum(String.valueOf(number - 1));
if (listener != null) {
listener.onUpdate(model, index);
if (number>1){
model.setWishlistNum(String.valueOf(number - 1));
if (listener != null) {
listener.onUpdate(model, index);
}
}
}
});
} else {

View File

@@ -77,10 +77,13 @@ public class WeekWishItemViewHolder extends RecyclerView.ViewHolder {
@Override
public void onViewClicks() {
int number = model.wishProgress();
model.setWishlistNum(String.valueOf(number - 1));
if (listener != null) {
listener.onUpdate(model, index);
if (number>1){
model.setWishlistNum(String.valueOf(number - 1));
if (listener != null) {
listener.onUpdate(model, index);
}
}
}
});
} else {

View File

@@ -8,7 +8,7 @@ import java.util.concurrent.TimeUnit;
import io.reactivex.Observer;
import io.reactivex.disposables.Disposable;
import kotlin.*;
import kotlin.Unit;
/**
* View防抖

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners
android:topLeftRadius="8dp"
android:topRightRadius="8dp" />
<gradient
android:angle="90"
android:endColor="#000000"
android:startColor="#9000" />
</shape>

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<gradient
android:angle="90"
android:endColor="#F2D1FF"
android:startColor="#87ACFF" />
<corners android:radius="6dp" />
</shape>

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_selected="false">
<shape>
<gradient android:angle="90" android:startColor="#BBD3FF" android:endColor="#E6EEFF" />
<corners android:radius="10dp" />
</shape>
</item>
<item android:state_selected="true">
<shape>
<gradient android:angle="90" android:startColor="#FF7917" android:endColor="#FCD16E" />
<corners android:radius="10dp" />
</shape>
</item>
</selector>

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/white" />
<corners
android:bottomRightRadius="10dp"
android:topLeftRadius="10dp" />
</shape>

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/white" />
<corners
android:topLeftRadius="15dp"
android:topRightRadius="15dp" />
</shape>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="4dp" />
<solid android:color="#5C607D" />
<stroke
android:width="0.2dp"
android:color="#EAEAEA" />
</shape>

View 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="17dp" />
<solid android:color="#2A2C3B" />
</shape>

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners
android:bottomLeftRadius="16dp"
android:topLeftRadius="16dp" />
<solid android:color="#2A2C3B" />
</shape>

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle">
<corners android:radius="8dp" />
<solid android:color="#130F25" />
<stroke android:width="0.6dp" android:color="#AEAEB2" />
</shape>
</item>
</selector>

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_selected="false">
<shape android:shape="rectangle">
<corners android:radius="6dp" />
<solid android:color="#FFFFFF" />
</shape>
</item>
<item android:state_selected="true">
<shape android:shape="rectangle">
<corners android:radius="6dp" />
<solid android:color="#F0DBFF" />
</shape>
</item>
</selector>

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<gradient
android:angle="90"
android:endColor="#FFF6FF"
android:startColor="#E6F3FC" />
<corners
android:topLeftRadius="15dp"
android:topRightRadius="15dp" />
</shape>

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="true">
<shape>
<corners android:radius="18dp" />
<gradient android:angle="180" android:endColor="#FF7C25" android:startColor="#FFB323" />
</shape>
</item>
<item android:state_enabled="false">
<shape>
<corners android:radius="18dp" />
<solid android:color="#282518" />
</shape>
</item>
</selector>

View 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="5dp"/>
<solid android:color="#3B3D52"/>
</shape>

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Some files were not shown because too many files have changed in this diff Show More