Compare commits

..

130 Commits

Author SHA1 Message Date
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
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
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
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
d4c2ef71cb 新增主播可导出日志功能 2023-07-13 10:39:33 +08:00
18401019693
7184b147d9 修复 2023-07-12 15:32:44 +08:00
39e9670cff 6.5.3 432 2023-07-12 15:05:39 +08:00
18401019693
7d7535935a 修复 2023-07-12 14:58:34 +08:00
18401019693
dd657e9918 修复 2023-07-12 13:50:00 +08:00
09cef4ade6 6.5.3 更新发送红包说明图片 2023-07-12 13:11:19 +08:00
7038681f8c 6.5.3 2023-07-11 17:57:55 +08:00
6cf68838f8 修改红包样式和文案 2023-07-11 17:25:51 +08:00
c3a08974d1 修改发红包样式 2023-07-11 14:14:33 +08:00
18401019693
20c25a51ef 修复 2023-07-11 11:44:02 +08:00
18401019693
9dfb772224 修复 2023-07-11 11:43:12 +08:00
18401019693
f5f68f16b7 Merge remote-tracking branch 'origin/master' 2023-07-11 11:34:47 +08:00
18401019693
7672cea263 修复 2023-07-11 11:34:40 +08:00
0a02b39c12 根据产品需求修改英文翻译
根据产品需求修改UI样式
2023-07-11 10:51:03 +08:00
18401019693
e786ae16c2 修复 2023-07-11 10:13:29 +08:00
18401019693
1d447b0a90 修复 2023-07-10 16:36:48 +08:00
18401019693
4918f9ba20 修复 2023-07-08 15:52:18 +08:00
18401019693
124b18dcb0 修复 2023-07-08 15:15:40 +08:00
18401019693
f55e9c0cfe 修复 2023-07-08 13:40:50 +08:00
18401019693
84c43f74bc 修复 2023-07-07 16:14:28 +08:00
18401019693
674346b6de 修复 2023-07-07 16:01:29 +08:00
18401019693
64f40d52da 修复 2023-07-07 10:34:25 +08:00
18401019693
75e342975c 修复 2023-07-07 10:15:11 +08:00
18401019693
dd4172fc3d 修复 2023-07-07 09:51:29 +08:00
6b7a98dbc3 修复#220问题 2023-07-06 17:59:00 +08:00
640dea5c53 修复#218问题 2023-07-06 17:47:03 +08:00
a907897239 修复#217问题 2023-07-06 17:45:23 +08:00
3807ff8916 修复红包出现在联系方式选项里 2023-07-06 17:00:02 +08:00
36b85c15f5 修复飘屏弹幕被禁言没提示问题 2023-07-06 16:44:07 +08:00
3e91068866 按测试反馈修改红包详情UI逻辑和新增礼物显示 2023-07-06 15:13:33 +08:00
18401019693
4d61c7e176 添加翻译 2023-07-06 10:17:14 +08:00
18401019693
c6d9dbc118 添加翻译 2023-07-06 10:02:18 +08:00
6743ec3cf6 调整红包查看手气的UI 2023-07-06 10:02:04 +08:00
18401019693
addab80997 添加翻译 2023-07-05 18:15:18 +08:00
18401019693
9081ba4cd6 添加翻译 2023-07-05 17:47:50 +08:00
18401019693
12bedd630e 修复问题 2023-07-05 17:07:11 +08:00
18401019693
003c7f9e12 修复问题 2023-07-05 16:19:30 +08:00
18401019693
9089e96856 修复问题 2023-07-05 13:29:46 +08:00
60c14f720d 修复【钻石不够的情况下,也成功发起红包】 2023-07-04 17:15:25 +08:00
18401019693
c139b03417 修复问题 2023-07-04 17:02:05 +08:00
b3fb6e62ae Merge remote-tracking branch 'origin/master' 2023-07-04 16:37:34 +08:00
613185db40 修复红包记录样式问题 2023-07-04 16:36:46 +08:00
18401019693
291492f2d0 修复问题 2023-07-04 16:29:34 +08:00
18401019693
cbe91c84e9 红包全服通知 2023-07-04 16:02:45 +08:00
f417e4ead8 修复部分机型开播异常问题 2023-07-04 13:03:19 +08:00
18401019693
08bc6d554a Merge remote-tracking branch 'origin/dev_red_packet'
# 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/res/values/strings.xml
2023-07-03 17:57:35 +08:00
18401019693
895a1c6951 红包中奖列表 2023-07-03 17:48:02 +08:00
b9f1474362 【绑定账号】和【忘记密码】页面手机号码栏新增国家名字提示 2023-07-03 16:43:55 +08:00
18401019693
58508ca0ae 红包中奖列表 2023-07-03 13:05:29 +08:00
18401019693
5736265388 展示红包,领取红包接口逻辑对接 2023-06-30 16:03:37 +08:00
18401019693
e68d20252a 创建接口,红包展示接口 2023-06-30 10:17:33 +08:00
44b4b06592 退出直播间时移除加载错误的提示 2023-06-29 15:09:46 +08:00
fb7551f7d0 Merge branch 'master' into 6.5.3 2023-06-29 14:09:33 +08:00
18401019693
40455fffc9 红包打开创建领取的样式逻辑构建 2023-06-29 10:15:24 +08:00
195035c456 update 更换插件包下载地址 2023-06-28 18:22:30 +08:00
492003ff01 update 调整禁言对话框的文案 2023-06-28 17:37:30 +08:00
17c2e7f795 update 插件化判断代码 2023-06-28 17:37:10 +08:00
1a3d66553c 修复【直播间-多次点击用户名称,弹出多个主页资料框窗口】问题 2023-06-28 17:36:22 +08:00
710cddd3a7 Merge branch 'dev_6.5.3_红包' into 6.5.3 2023-06-28 16:49:23 +08:00
da7ebb2663 add 新增红包专区
add 新增红包专区进去是只有发放红包的直播间
add 新增首页红包浮窗
add 新增红包记录
2023-06-28 16:44:42 +08:00
6a6696f355 fix 修复测试服ios发消息安卓端收不到问题 2023-06-28 16:43:26 +08:00
368b002db6 update 直播间超时进入的提示 2023-06-27 14:19:34 +08:00
501a7b482b update 红包专区 2023-06-27 13:54:18 +08:00
18401019693
279575d80b 红包直播间展示样式构建 2023-06-26 18:04:58 +08:00
3bf594d0b5 update 红包记录列表 2023-06-26 14:57:11 +08:00
5f33fa38f6 update 禁言弹框ui标题 2023-06-26 10:24:19 +08:00
e0312eedd1 update 禁言弹框ui标题 2023-06-26 10:17:45 +08:00
69d8feb9a9 update 红包 2023-06-26 10:12:38 +08:00
500588c842 update 红包 2023-06-26 10:09:37 +08:00
0a70da82f0 Merge branch '6.5.3' into dev_6.5.3_红包 2023-06-25 17:02:33 +08:00
abbb8c524c 新增被禁言的提示 2023-06-25 16:19:55 +08:00
1334d173cf update 红包详情入口 2023-06-25 16:09:47 +08:00
f3ff37aea7 Merge branch 'fix_webview' into 6.5.3 2023-06-25 15:50:04 +08:00
9741be743c 新增直播播放器报错时提示
新增观众端看异常下播直播间提示
2023-06-25 14:18:40 +08:00
f54054283c 调整混淆清单 2023-06-25 13:50:48 +08:00
fd06243c22 优化下载直播插件流程 2023-06-25 11:31:19 +08:00
cef94a248e Merge branch 'dev_proguard' into 6.5.3 2023-06-25 09:53:43 +08:00
beb566b294 新增期间禁言功能 2023-06-25 09:51:29 +08:00
18401019693
6889828c00 消息中心新增【系统消息】类型 2023-06-20 17:46:31 +08:00
9c57f0bd96 修复webView显示问题 2023-06-17 17:22:11 +08:00
a1c96cfd0f 调整直播间分享链接 2023-06-16 15:30:21 +08:00
18401019693
1198a8f1d8 送礼交互优化 2023-06-15 15:27:46 +08:00
a255d1f2b5 update 2023-06-15 13:41:57 +08:00
53ce1c703e update 2023-06-14 17:59:08 +08:00
3f9e95ce7d 新增插件模块管理 2023-06-14 13:41:12 +08:00
18401019693
8e07d4523f 修改完善资料和礼物点击 2023-06-12 13:25:59 +08:00
29ddc54303 Merge branch 'master' into dev_proguard 2023-06-12 10:50:27 +08:00
ae9c050ae6 Merge remote-tracking branch 'origin/master' 2023-06-08 17:02:32 +08:00
7b61e8c562 修复Ranking.getAnchorRankData多次调用问题 2023-06-08 17:02:20 +08:00
18142669586
23a396864f 修改全服 2023-06-08 17:02:11 +08:00
af8052f65b 修复Ranking.getAnchorRankData多次调用问题 2023-06-08 15:21:24 +08:00
6603a2dbb5 修复Ranking.getAnchorRankData多次调用问题 2023-06-08 14:33:44 +08:00
f3a0b4d145 修复Ranking.getAnchorRankData多次调用问题 2023-06-08 14:20:15 +08:00
0c99324904 Merge remote-tracking branch 'origin/master' 2023-06-08 11:13:55 +08:00
8d077e8062 修复PK结束时会隐藏投票问题 2023-06-08 11:13:38 +08:00
18401019693
3aaafdbbbe 修改完善资料和礼物点击 2023-06-08 10:12:37 +08:00
18401019693
f4016089a1 修改完善资料和礼物点击 2023-06-06 15:28:00 +08:00
c53757c64b 调整WebView 2023-06-06 14:41:53 +08:00
c8c4352284 Merge branch 'master' into dev_proguard 2023-06-05 16:42:18 +08:00
18401019693
cd2e176f0a Merge branch 'dev_6.5.3' 2023-06-05 14:09:42 +08:00
e6d92ffc86 调整投票ui 2023-06-05 13:24:13 +08:00
ea0a3375e4 修复非粉丝通过送礼打开的粉丝团url不正确问题 2023-06-05 11:42:56 +08:00
34c569ecb5 update config 2023-05-09 14:40:38 +08:00
a041450766 update config 2023-05-09 10:09:03 +08:00
e9488df780 update 2023-05-08 13:29:24 +08:00
465 changed files with 17202 additions and 907 deletions

View File

@@ -55,8 +55,8 @@ public class FURenderer extends IFURenderer {
private FURenderKit mFURenderKit;
/* AI道具*/
private String BUNDLE_AI_FACE = "model" + File.separator + "ai_face_processor_lite.bundle";
private String BUNDLE_AI_HUMAN = "model" + File.separator + "ai_human_processor.bundle";
public static String BUNDLE_AI_FACE = "model" + File.separator + "ai_face_processor_lite.bundle";
public static String BUNDLE_AI_HUMAN = "model" + File.separator + "ai_human_processor.bundle";
/* GL 线程 ID */
private Long mGlThreadId = 0L;

View File

@@ -314,6 +314,35 @@ public class FileUtils {
return null;
}
public static String copyAssetsFile(Context context, String assetsPath, String fileName, String saveFileDir) {
File fileDir = new File(saveFileDir);
if (!fileDir.exists()) {
fileDir.mkdirs();
}
File file = new File(fileDir, fileName);
if (file.exists()) {
return file.getAbsolutePath();
}
try {
InputStream inputStream = context.getAssets().open(assetsPath);
FileOutputStream fos = new FileOutputStream(file);
BufferedInputStream bis = new BufferedInputStream(inputStream);
BufferedOutputStream bos = new BufferedOutputStream(fos);
byte[] byteArray = new byte[1024];
int bytes = bis.read(byteArray);
while (bytes > 0) {
bos.write(byteArray, 0, bytes);
bos.flush();
bytes = bis.read(byteArray);
}
bos.close();
fos.close();
return file.getAbsolutePath();
} catch (IOException e) {
e.printStackTrace();
}
return null;
}
/**
* 获取Uri文件绝对路径
@@ -522,6 +551,7 @@ public class FileUtils {
/**
* 遍历一个文件夹获取改文件夹下所有文件名
*
* @param path
* @return
*/
@@ -563,7 +593,7 @@ public class FileUtils {
* @param path String
* @return Boolean
*/
public static Boolean checkIsVideo(Context context,String path) {
public static Boolean checkIsVideo(Context context, String path) {
MediaMetadataRetriever retriever = new MediaMetadataRetriever();
try {
retriever.setDataSource(context, Uri.fromFile(new File(path)));

View File

@@ -1,8 +1,5 @@
package com.yunbao.faceunity;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
@@ -10,8 +7,5 @@ import static org.junit.Assert.*;
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
}

View File

@@ -30,18 +30,12 @@ public class ShareBuilder {
private String anchorAvatar;
public static String createLiveShareLink(String shareUid, String anchorId, String anchorName, String anchorAvatar) {
try {
return String.format(CommonAppConfig.HOST +
"/h5/activity/FriendInvitation/liveShare.html?user_id=%s&anchor_id=%s&anchor_name=%s&anchor_avatar=%s&isGoogle=%s",
shareUid,
anchorId,
URLEncoder.encode(anchorName, "UTF-8"),
URLEncoder.encode(anchorAvatar, "UTF-8"),
CommonAppConfig.IS_GOOGLE_PLAY ? "1" : "0"
) ;
} catch (UnsupportedEncodingException e) {
throw new RuntimeException(e);
}
return String.format(CommonAppConfig.HOST +
"/index.php?g=Appapi&m=home&a=share&uid=%s&user_id=%s&isGoogle=%s",
anchorId,
shareUid,
CommonAppConfig.IS_GOOGLE_PLAY ? "1" : "0"
) ;
}
public static String createInviteLink(String shareUid) {

View File

@@ -6,6 +6,9 @@ apply plugin: 'com.alibaba.arouter'
android {
dexOptions {
jumboMode = true
}
project.tasks.getByName("tasks").doFirst {
}
/* applicationVariants.all { variant ->
variant.mergeAssetsProvider.configure {
@@ -92,6 +95,13 @@ android {
exclude 'lib/armeabi-v7a/libmmlic.so'
exclude 'lib/armeabi-v7a/libMNN_CL.so'
exclude 'lib/armeabi-v7a/libMNN_Express.so'
//美颜
if (rootProject.ext.manifestPlaceholders.isPluginModel) {
exclude 'lib/armeabi-v7a/libCNamaSDK.so'
exclude 'lib/arm64-v8a/libCNamaSDK.so'
exclude 'lib/armeabi-v7a/libfuai.so'
exclude 'lib/arm64-v8a/libfuai.so'
}
}
compileOptions {
@@ -99,6 +109,11 @@ android {
targetCompatibility JavaVersion.VERSION_1_8
}
applicationVariants.all { variant ->
println "清空build文件夹";
for (final def project in rootProject.getAllprojects()) {
delete project.buildDir
println project.buildDir
}
String variantName = variant.name.capitalize()
def processManifestTask = project.tasks.getByName("process${variantName}Manifest")
processManifestTask.doLast { pm ->
@@ -139,9 +154,36 @@ android {
'Asset/*',
'image_effect_shaders/*',
'internal/*'
//美颜基础组件
]))
println "isPluginModel = " + rootProject.ext.manifestPlaceholders.isPluginModel
if (rootProject.ext.manifestPlaceholders.isPluginModel) {
delete(fileTree(dir: outputDir, includes: [
'model/ai_face_processor_lite.bundle',
'graphics/face_beautification.bundle'
]))
} else {
println "不删除bundle"
}
}
}
variant.outputs.all {
def isGoogle = "link"
if (rootProject.ext.manifestPlaceholders.isGooglePlay) {
isGoogle = "Google"
}
def isPlugin = "all"
if (rootProject.ext.manifestPlaceholders.isPluginModel) {
isPlugin = "plugin"
}
def isTest = "测试服"
if (rootProject.ext.manifestPlaceholders.serverHost == "https://napi.yaoulive.com") {
isTest = "正式服"
}
outputFileName = "[${new Date().format("yyyy-MM-dd HHmmss", TimeZone.getTimeZone("GMT+8"))}]PDLive-${defaultConfig.versionName}-${isGoogle}-${isPlugin}-${variant.buildType.name}-${isTest}.apk"
}
}
signingConfigs {
release {
@@ -193,12 +235,17 @@ android {
}
buildTypes {
release {
minifyEnabled false
minifyEnabled true
shrinkResources true
zipAlignEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
}
debug {
minifyEnabled false
shrinkResources false
zipAlignEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
}
}

170
app/proguard-rules.pro vendored
View File

@@ -12,17 +12,40 @@
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
-keepclassmembers class fqcn.of.javascript.interface.for.webview {
public *;
}
# Uncomment this to preserve the groupLast number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
-keepattributes SourceFile,LineNumberTable
# If you keep the groupLast number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
-renamesourcefileattribute SourceFile
-keep class com.yunbao.**{
public <methods>;
protected <methods>;
}
-keep class * implements com.yunbao.common.bean.BaseModel {
*;
}
-keep class com.yunbao.common.bean.** {
*;
}
-keep class com.yunbao.common.views.weight.VerticalViewPager$LayoutParams{
*;
}
-keep class android.**{
*;
}
-keep class **.R$* {
public static <fields>;
}
-keep class com.tencent.** { *; }
-keep class com.adjust.sdk.**{ *; }
-keep class com.google.android.gms.common.ConnectionResult {
int SUCCESS;
@@ -48,6 +71,13 @@
-keep class okhttp3.internal.**{*;}
-dontwarn okio.**
#okhttp
-dontwarn okhttp3.**
-keep class okhttp3.**{*;}
#okio
-dontwarn okio.**
-keep class okio.**{*;}
# Retrofit
@@ -55,9 +85,10 @@
-keep class retrofit2.** { *; }
-keepattributes Signature-keepattributes Exceptions
-keepattributes Signature-keepattributes,Exceptions
# RxJava RxAndroid
-dontwarn java.util.concurrent.Flow*
-dontwarn sun.misc.**
@@ -69,20 +100,139 @@ long consumerIndex;
}
-keepclassmembers class rx.internal.util.unsafe.BaseLinkedQueueProducerNodeRef {
-keepclassmembers class rx.internal.util.unsafe.BaseLinkedQueueProducerNodeRef* {
rx.internal.util.atomic.LinkedQueueNode producerNode;
rx.internal.util.atomic.LinkedQueueNode* producerNode;
}
-keepclassmembers class rx.internal.util.unsafe.BaseLinkedQueueConsumerNodeRef {
-keepclassmembers class rx.internal.util.unsafe.BaseLinkedQueueConsumerNodeRef* {
rx.internal.util.atomic.LinkedQueueNode consumerNode;
rx.internal.util.atomic.LinkedQueueNode* consumerNode;
}
# Gson
-keep class com.google.gson.stream.** { *; }
##---------------Begin: proguard configuration for Gson ----------
# Gson uses generic type information stored in a class file when working with fields. Proguard
# removes such information by default, so configure it to keep all of it.
-keepattributes Signature
# For using GSON @Expose annotation
-keepattributes *Annotation*
# Gson specific classes
-dontwarn sun.misc.**
#-keep class com.google.gson.stream.** { *; }
# Application classes that will be serialized/deserialized over Gson
-keep class com.google.gson.examples.android.model.** { <fields>; }
# Prevent proguard from stripping interface information from TypeAdapter, TypeAdapterFactory,
# JsonSerializer, JsonDeserializer instances (so they can be used in @JsonAdapter)
-keep class * extends com.google.gson.TypeAdapter
-keep class * implements com.google.gson.TypeAdapterFactory
-keep class * implements com.google.gson.JsonSerializer
-keep class * implements com.google.gson.JsonDeserializer
# Prevent R8 from leaving Data object members always null
-keepclassmembers,allowobfuscation class * {
@com.google.gson.annotations.SerializedName <fields>;
}
# Retain generic signatures of TypeToken and its subclasses with R8 version 3.0 and higher.
-keep,allowobfuscation,allowshrinking class com.google.gson.reflect.TypeToken
-keep,allowobfuscation,allowshrinking class * extends com.google.gson.reflect.TypeToken
##---------------End: proguard configuration for Gson ----------
-keepattributes EnclosingMethod
#--------融云
-keepattributes Exceptions,InnerClasses
-keepattributes Signature
-keep class io.rong.** {*;}
-keep class cn.rongcloud.** {*;}
-keep class * implements io.rong.imlib.model.MessageContent {*;}
-dontwarn io.rong.push.**
-dontnote com.xiaomi.**
-dontnote com.google.android.gms.gcm.**
-dontnote io.rong.**
# 下方混淆使用了融云 IMKit 提供的 locationKit 位置插件时才需要配置,可参考高德官网的混淆方式:https://lbs.amap.com/api/android-sdk/guide/create-project/dev-attention
-keep class com.amap.api.maps.**{*;}
-keep class com.autonavi.**{*;}
-keep class com.amap.api.trace.**{*;}
-keep class com.amap.api.location.**{*;}
-keep class com.amap.api.fence.**{*;}
-keep class com.loc.**{*;}
-keep class com.autonavi.aps.amapapi.model.**{*;}
-keep class com.amap.api.services.**{*;}
-ignorewarnings
#--------科大讯飞
-keep class com.iflytek.**{*;}
-keepattributes Signature
#EvenBus
-keepattributes *Annotation*
-keepclassmembers class * {
@org.greenrobot.eventbus.Subscribe <methods>;
}
-keep enum org.greenrobot.eventbus.ThreadMode { *; }
# If using AsyncExecutord, keep required constructor of default event used.
# Adjust the class name if a custom failure event type is used.
-keepclassmembers class org.greenrobot.eventbus.util.ThrowableFailureEvent {
<init>(java.lang.Throwable);
}
# Accessed via reflection, avoid renaming or removal
-keep class org.greenrobot.eventbus.android.AndroidComponentsImpl*
#--------ARouter
-keep public class com.alibaba.android.arouter.routes.**{*;}
-keep public class com.alibaba.android.arouter.facade.**{*;}
-keep class * implements com.alibaba.android.arouter.facade.template.ISyringe{*;}
# If you use the byType method to obtain Service, add the following rules to protect the interface:
-keep interface * implements com.alibaba.android.arouter.facade.template.IProvider
# If single-type injection is used, that is, no interface is defined to implement IProvider, the following rules need to be added to protect the implementation
# -keep class * implements com.alibaba.android.arouter.facade.template.IProvider
#----retrofit2
-keepattributes Signature, InnerClasses, EnclosingMethod
-keepattributes RuntimeVisibleAnnotations, RuntimeVisibleParameterAnnotations
-keepattributes AnnotationDefault
-keepclassmembers,allowshrinking,allowobfuscation interface * {
@retrofit2.http.* <methods>;
}
-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement*
-dontwarn javax.annotation.**
-dontwarn kotlin.Unit
-dontwarn retrofit2.KotlinExtensions*
-dontwarn retrofit2.KotlinExtensions$*
-if interface * { @retrofit2.http.* <methods>; }
-keep,allowobfuscation interface <1>
-if interface * { @retrofit2.http.* <methods>; }
-keep,allowobfuscation interface * extends <1>
-keep,allowobfuscation,allowshrinking class kotlin.coroutines.Continuation
-if interface * { @retrofit2.http.* public *** *(...); }
-keep,allowoptimization,allowshrinking,allowobfuscation class <3>
#-----glide
-keep public class com.bumptech.glide.** {*;}
-keep public class jp.co.cyberagent.** {*;}
-dontwarn jp.co.cyberagent.android.gpuimage.**
-printconfiguration tmp/full-r8-config.txt
#---美颜模块需要暴露出来的参数名
-keep class com.yunbao.faceunity.utils.FURenderer{
public static java.lang.String BUNDLE_AI_FACE;
}
-keep class com.yunbao.faceunity.utils.FaceUnityConfig{
public static java.lang.String BUNDLE_FACE_BEAUTIFICATION;
}
-keep class com.faceunity.wrapper.faceunity$LoadConfig*{
private static boolean sLoadedLibrary;
}

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
@@ -159,6 +145,9 @@
<meta-data
android:name="IS_UPLOAD_ERROR_LOG"
android:value="${isUploadLog}" />
<meta-data
android:name="IS_PLUGIN_MODEL"
android:value="${isPluginModel}" />
<meta-data
android:name="firebase_crashlytics_collection_enabled"
android:value="${isUploadLog}" />
@@ -197,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

@@ -11,9 +11,9 @@ import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
import android.os.Process;
import android.text.TextUtils;
import android.util.Log;
import android.os.Process;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
@@ -248,6 +248,7 @@ public class AppContext extends CommonAppContext {
configSPApp();
//初始化美颜SDK
// FaceManager.initFaceUnity(this);
}
/**
@@ -289,7 +290,7 @@ public class AppContext extends CommonAppContext {
.setMainCrashHandler((t, e) -> {
Log.e("ApplicationError", "主线程异常");//此处log只是展示当debug为true时主类内部log会打印异常信息
e.printStackTrace();
AppManager.runDebugCode(()->{
AppManager.runDebugCode(() -> {
//闪退后finish所有Activity并且杀死进程
for (WeakReference<Activity> activity : activities) {
if (activity != null && activity.get() != null) {

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"]
@@ -174,8 +174,8 @@ dependencies {
api 'com.squareup.retrofit2:retrofit:2.3.0'
api 'com.squareup.retrofit2:adapter-rxjava2:2.3.0'
//gson解析
api 'com.squareup.retrofit2:converter-gson:2.3.0'
implementation "io.reactivex.rxjava2:rxjava:2.2.3"
api 'com.squareup.retrofit2:converter-gson:2.3.0'//混淆
implementation "io.reactivex.rxjava2:rxjava:2.2.3"//混淆
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
api 'com.jakewharton.rxbinding3:rxbinding:3.1.0'
//loading样式库
@@ -191,4 +191,9 @@ dependencies {
api 'com.github.li-xiaojun:XPopup:2.9.1'
api 'com.github.shenbengit:PagerGridLayoutManager:1.1.7'
//选择器
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

@@ -35,6 +35,8 @@ public class CommonAppConfig {
public static final boolean IS_GOOGLE_PLAY = getMetaDataBoolean("IS_GOOGLE_PLAY");
//是否开启上报错误日志功能
public static final boolean IS_UPLOAD_ERROR_LOG = getMetaDataBoolean("IS_UPLOAD_ERROR_LOG");
//是否为插件包模式
public static final boolean IS_PLUGIN_MODEL = getMetaDataBoolean("IS_PLUGIN_MODEL");
//外部sd卡
public static final String DCMI_PATH = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM).getAbsolutePath();

View File

@@ -179,10 +179,12 @@ public class Constants {
public static final String CUSTOM_FULL_SERVICE_NOTIFY = "customFullServiceNotify";//全服通知
public static final String XYD_COMPLETE = "XydComplete";//心愿单完成通知
public static final String WISH_LIST_PROGRESS = "wishListProgress";//心愿单进度通知
public static final String LIVE_VOTE_CREATE="createVote";
public static final String LIVE_VOTE_UPDATE="updateVote";
public static final String LIVE_VOTE_END="endVote";
public static final String LIVE_PK_END="endPK";//结束PK以这个PK获取到的参数为准
public static final String LIVE_VOTE_CREATE = "createVote";
public static final String LIVE_VOTE_UPDATE = "updateVote";
public static final String LIVE_VOTE_END = "endVote";
public static final String LIVE_PK_END = "endPK";//结束PK以这个PK获取到的参数为准
public static final String RED_PACKET = "RedPacket";//红包通知
public static final String RED_PACKET_SUPER_JACKPOT = "RedPacketSuperJackpot";//超级红包通知
//游戏socket
public static final String SOCKET_GAME_ZJH = "startGame";//炸金花

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

@@ -110,10 +110,10 @@ public class WebViewActivity extends AbsActivity {
}
//真实屏幕高度-(ft_title的高度+导航栏高度)
//屏蔽掉是因为在线客服页面 AndroidBug5497Workaround会失效
/* int height = DeviceUtils.getScreenRealHeight(mContext) - DpUtil.dp2px(72) - getCurrentNavigationBarHeight(mContext);
int height = DeviceUtils.getScreenRealHeight(mContext) - DpUtil.dp2px(72) - getCurrentNavigationBarHeight(mContext);
if (!navigationGestureEnabled(mContext)) {
view.loadUrl("javascript:window.androidObject.setHeight(" + height + ",0,false)");
}*/
}
}
});

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,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.GiftAlreadyWallViewHolder;
import java.util.ArrayList;
import java.util.List;
public class GiftAlreadyWallAdapter 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_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));
}
@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

@@ -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

@@ -17,6 +17,8 @@ public class AnchorRecommendModel extends BaseModel {
//是否展示0=不展示1=展示
@SerializedName("list_show")
private int listShow = 0;
@SerializedName("red_packet_show")
private int showRedPacket = 0;//是否显示首页红包浮窗
//是否支持换一批0=不支持 1=支持
@SerializedName("up_show")
private int upShow = 0;
@@ -24,6 +26,10 @@ public class AnchorRecommendModel extends BaseModel {
private List<AnchorRecommendItemModel> list = new ArrayList<>();
@SerializedName("slide")
private List<SlideInfoModel> slide = new ArrayList<>();
@SerializedName("red_packet_total")
private int redPacketTotal = 100;
@SerializedName("red_packet_day_create_num")
private int redPacketNum = 0;
public List<SlideInfoModel> getSlide() {
return slide;
@@ -52,6 +58,30 @@ public class AnchorRecommendModel extends BaseModel {
return this;
}
public int getShowRedPacket() {
return showRedPacket;
}
public void setShowRedPacket(int showRedPacket) {
this.showRedPacket = showRedPacket;
}
public int getRedPacketTotal() {
return redPacketTotal;
}
public void setRedPacketTotal(int redPacketTotal) {
this.redPacketTotal = redPacketTotal;
}
public int getRedPacketNum() {
return redPacketNum;
}
public void setRedPacketNum(int redPacketNum) {
this.redPacketNum = redPacketNum;
}
public List<AnchorRecommendItemModel> getList() {
return list;
}

View File

@@ -103,9 +103,43 @@ public class EnterRoomInfoModel extends BaseModel {
@SerializedName("anchor_goodnum")
private String anchorGoodnum;
@SerializedName("jackpot_level")
private String jackpotLevel="-1";
private String jackpotLevel = "-1";
@SerializedName("live_vote")
private LiveRoomVoteModel voteModel;
@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;
}
public EnterRoomInfoModel setRedPacketModel(RedPacketModel redPacketModel) {
this.redPacketModel = redPacketModel;
return this;
}
public String getJackpotLevel() {
@@ -486,8 +520,8 @@ public class EnterRoomInfoModel extends BaseModel {
}
public String getIsconnection() {
if(StringUtil.isEmpty(isconnection)){
isconnection="0";
if (StringUtil.isEmpty(isconnection)) {
isconnection = "0";
}
return isconnection;
}
@@ -498,8 +532,8 @@ public class EnterRoomInfoModel extends BaseModel {
}
public String getIsleave() {
if(StringUtil.isEmpty(isleave)){
isleave="0";
if (StringUtil.isEmpty(isleave)) {
isleave = "0";
}
return isleave;
}

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,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,51 @@
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 int namingCoin;
public int getUid() {
return uid;
}
public GiftWallGiftDetail setUid(int uid) {
this.uid = uid;
return this;
}
public String getUserNicename() {
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 int getNamingCoin() {
return namingCoin;
}
public GiftWallGiftDetail setNamingCoin(int 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

@@ -5,6 +5,7 @@ import android.os.Parcelable;
import android.text.TextUtils;
import com.alibaba.fastjson.annotation.JSONField;
import com.google.gson.annotations.SerializedName;
import java.util.ArrayList;
import java.util.List;
@@ -51,6 +52,8 @@ public class LiveBean implements Parcelable {
private String recommendCardtype = "";
private String recommendCardIconSizeTwo = "";
private String recommendCardIconSizeThree = "";
@SerializedName("red_packet_status")
private int redPacketStatus;
private Map<String,String> params;//用于跳转Activity时扩展参数从首页Banner跳转到直播间时需要根据携带参数判断是否弹出新人特惠对话框
@@ -382,6 +385,14 @@ public class LiveBean implements Parcelable {
this.islive = islive;
}
public int getRedPacketStatus() {
return redPacketStatus;
}
public void setRedPacketStatus(int redPacketStatus) {
this.redPacketStatus = redPacketStatus;
}
/**
* 显示靓号
*/
@@ -529,6 +540,7 @@ public class LiveBean implements Parcelable {
", recommendCardtype='" + recommendCardtype + '\'' +
", recommendCardIconSizeTwo='" + recommendCardIconSizeTwo + '\'' +
", recommendCardIconSizeThree='" + recommendCardIconSizeThree + '\'' +
", redPacketStatus=" + redPacketStatus +
", params=" + params +
", mWeekList=" + mWeekList +
'}';

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,160 @@ 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;
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;
}
public int getBlind_box_type() {
return blind_box_type;

View File

@@ -68,7 +68,7 @@ public class LiveTaskModel extends BaseModel {
'}';
}
public static class NewUser {
public static class NewUser implements Serializable{
@SerializedName("isNew")
private int isNew;
@SerializedName("endTime")

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

@@ -357,4 +357,8 @@ public class MsgModel extends BaseModel {
public void setSystem_bubble(String system_bubble) {
this.system_bubble = system_bubble;
}
/**
* 红包
*/
}

View File

@@ -0,0 +1,187 @@
package com.yunbao.common.bean;
import com.google.gson.annotations.SerializedName;
import com.yunbao.common.CommonAppConfig;
import java.util.List;
public class RedPacketDetailsBean extends BaseModel {
@SerializedName("u_nicename")
private String niceName;
@SerializedName("avatar_thumb")
private String avatarThumb;
@SerializedName("avatar")
private String avatar;
@SerializedName("red_packet_money")
private long money;// 红包金豆总数量
@SerializedName("amount_diamond")
private long diamond;// 红包价值钻石
@SerializedName("red_packet_quantity")
private int quantity; // 领取的红包总数量
@SerializedName("red_packet_quantity_already")
private int already; // 领取的红包总数量
@SerializedName("red_packet_record_details")
private List<Detail> details;
public String getNiceName() {
return niceName;
}
public void setNiceName(String niceName) {
this.niceName=niceName;
}
public String getAvatarThumb() {
avatarThumb=avatarThumb.replace("\\","");
if(!avatarThumb.startsWith("http")){
avatarThumb= CommonAppConfig.HOST+"/"+avatarThumb;
}
return avatarThumb;
}
public void setAvatarThumb(String avatarThumb) {
this.avatarThumb = avatarThumb;
}
public String getAvatar() {
return avatar;
}
public void setAvatar(String avatar) {
this.avatar = avatar;
}
public long getMoney() {
return money;
}
public void setMoney(long money) {
this.money = money;
}
public int getQuantity() {
return quantity;
}
public void setQuantity(int quantity) {
this.quantity = quantity;
}
public int getAlready() {
return already;
}
public void setAlready(int already) {
this.already = already;
}
public List<Detail> getDetails() {
return details;
}
public void setDetails(List<Detail> details) {
this.details = details;
}
public long getDiamond() {
return diamond;
}
public void setDiamond(long diamond) {
this.diamond = diamond;
}
@Override
public String toString() {
return "RedPacketDetailsBean{" +
"niceName='" + niceName + '\'' +
", avatarThumb='" + avatarThumb + '\'' +
", avatar='" + avatar + '\'' +
", money=" + money +
", diamond=" + diamond +
", quantity=" + quantity +
", already=" + already +
", details=" + details +
'}';
}
public static class Detail extends BaseModel {
@SerializedName("receive_money")
private long money;
@SerializedName("user_nicename")
private String niceName;
@SerializedName("receive_time")
private String time;
@SerializedName("avatar_thumb")
private String avatarThumb;
@SerializedName("avatar")
private String avatar;
@SerializedName("gifticon")
private String gifticon;
public long getMoney() {
return money;
}
public void setMoney(long money) {
this.money = money;
}
public String getNiceName() {
return niceName;
}
public void setNiceName(String niceName) {
this.niceName=niceName;
}
public String getTime() {
return time;
}
public void setTime(String time) {
this.time = time;
}
public String getAvatarThumb() {
avatarThumb=avatarThumb.replace("\\","");
if(!avatarThumb.startsWith("http")){
avatarThumb= CommonAppConfig.HOST+"/"+avatarThumb;
}
return avatarThumb;
}
public void setAvatarThumb(String avatarThumb) {
this.avatarThumb = avatarThumb;
}
public String getAvatar() {
return avatar;
}
public void setAvatar(String avatar) {
this.avatar = avatar;
}
public String getGifticon() {
return gifticon;
}
public void setGifticon(String gifticon) {
this.gifticon = gifticon;
}
@Override
public String toString() {
return "Detail{" +
"money=" + money +
", niceName='" + niceName + '\'' +
", time='" + time + '\'' +
", avatarThumb='" + avatarThumb + '\'' +
", avatar='" + avatar + '\'' +
", gifticon='" + gifticon + '\'' +
'}';
}
}
}

View File

@@ -0,0 +1,94 @@
package com.yunbao.common.bean;
import com.google.gson.annotations.SerializedName;
/**
* 红包随机礼物
*/
public class RedPacketGiftModel extends BaseModel {
/**
* {
* "id": 210,
* "giftname": "玫瑰",
* "needcoin": 20,
* "gifticon": "https://downs.yaoulive.com/603f25d9aa969.png"
* }
*/
@SerializedName("id")
private String id;
@SerializedName("giftname")
private String giftname;
@SerializedName("needcoin")
private String needcoin;
@SerializedName("gifticon")
private String gifticon;
@SerializedName("gift_num")
private String giftNum;
@SerializedName("user_nicename")
private String userNicename;
@SerializedName("avatar")
private String avatar;
public String getId() {
return id;
}
public RedPacketGiftModel setId(String id) {
this.id = id;
return this;
}
public String getGiftname() {
return giftname;
}
public RedPacketGiftModel setGiftname(String giftname) {
this.giftname = giftname;
return this;
}
public String getNeedcoin() {
return needcoin;
}
public RedPacketGiftModel setNeedcoin(String needcoin) {
this.needcoin = needcoin;
return this;
}
public String getGifticon() {
return gifticon;
}
public RedPacketGiftModel setGifticon(String gifticon) {
this.gifticon = gifticon;
return this;
}
public String getGiftNum() {
return giftNum;
}
public RedPacketGiftModel setGiftNum(String giftNum) {
this.giftNum = giftNum;
return this;
}
public String getUserNicename() {
return userNicename;
}
public RedPacketGiftModel setUserNicename(String userNicename) {
this.userNicename = userNicename;
return this;
}
public String getAvatar() {
return avatar;
}
public RedPacketGiftModel setAvatar(String avatar) {
this.avatar = avatar;
return this;
}
}

View File

@@ -0,0 +1,273 @@
package com.yunbao.common.bean;
import com.google.gson.annotations.SerializedName;
import java.util.List;
/**
* 红包信息
*/
public class RedPacketInfoModel extends BaseModel {
@SerializedName("liveuid")
private String liveuid;
@SerializedName("uid")
private String uid;
@SerializedName("amount_diamond")
private String amountDiamond;
@SerializedName("red_packet_money")
private String redPacketMoney;
@SerializedName("red_packet_quantity")
private String redPacketQuantity;
@SerializedName("conditions")
private String conditions;
@SerializedName("create_time")
private String createTime;
@SerializedName("start_time")
private String startTime;
@SerializedName("end_time")
private String endTime;
@SerializedName("user_id")
private String userId;
@SerializedName("user_nicename")
private String userNicename;
@SerializedName("avatar")
private String avatar;
@SerializedName("avatar_thumb")
private String avatarThumb;
@SerializedName("id")
private String id;
@SerializedName("user_exists")
private String userExists;
@SerializedName("is_attention")
private String isAttention;
//0.未领取到 1.领取但是没抢过东西 2.已经领抢到东西
@SerializedName("receive_status")
private String receiveStatus;
//超级红包ID
@SerializedName("super_jackpot_id")
private String superJackpotId;
public String getSuperJackpotId() {
return superJackpotId;
}
public RedPacketInfoModel setSuperJackpotId(String superJackpotId) {
this.superJackpotId = superJackpotId;
return this;
}
//是否超级红包
private boolean isSuperJackpot = false;
public boolean isSuperJackpot() {
return isSuperJackpot;
}
//红包id
@SerializedName("red_packet_id")
private String redPacketId;
public String getRedPacketId() {
return redPacketId;
}
public RedPacketInfoModel setRedPacketId(String redPacketId) {
this.redPacketId = redPacketId;
return this;
}
public RedPacketInfoModel setSuperJackpot(boolean superJackpot) {
isSuperJackpot = superJackpot;
return this;
}
public String getIsAttention() {
return isAttention;
}
public RedPacketInfoModel setIsAttention(String isAttention) {
this.isAttention = isAttention;
return this;
}
@SerializedName("user_golden_bean")
private String userGoldenBean;
@SerializedName("red_packet_gift")
private List<RedPacketGiftModel> packetGiftModels;
@SerializedName("gift")
private List<RedPacketGiftModel> giftModels;
public String getReceiveStatus() {
return receiveStatus;
}
public RedPacketInfoModel setReceiveStatus(String receiveStatus) {
this.receiveStatus = receiveStatus;
return this;
}
public List<RedPacketGiftModel> getGiftModels() {
return giftModels;
}
public RedPacketInfoModel setGiftModels(List<RedPacketGiftModel> giftModels) {
this.giftModels = giftModels;
return this;
}
public List<RedPacketGiftModel> getPacketGiftModels() {
return packetGiftModels;
}
public RedPacketInfoModel setPacketGiftModels(List<RedPacketGiftModel> packetGiftModels) {
this.packetGiftModels = packetGiftModels;
return this;
}
public String getLiveuid() {
return liveuid;
}
public RedPacketInfoModel setLiveuid(String liveuid) {
this.liveuid = liveuid;
return this;
}
public String getUid() {
return uid;
}
public RedPacketInfoModel setUid(String uid) {
this.uid = uid;
return this;
}
public String getAmountDiamond() {
return amountDiamond;
}
public RedPacketInfoModel setAmountDiamond(String amountDiamond) {
this.amountDiamond = amountDiamond;
return this;
}
public String getRedPacketMoney() {
return redPacketMoney;
}
public RedPacketInfoModel setRedPacketMoney(String redPacketMoney) {
this.redPacketMoney = redPacketMoney;
return this;
}
public String getRedPacketQuantity() {
return redPacketQuantity;
}
public RedPacketInfoModel setRedPacketQuantity(String redPacketQuantity) {
this.redPacketQuantity = redPacketQuantity;
return this;
}
public String getConditions() {
return conditions;
}
public RedPacketInfoModel setConditions(String conditions) {
this.conditions = conditions;
return this;
}
public String getCreateTime() {
return createTime;
}
public RedPacketInfoModel setCreateTime(String createTime) {
this.createTime = createTime;
return this;
}
public String getStartTime() {
return startTime;
}
public RedPacketInfoModel setStartTime(String startTime) {
this.startTime = startTime;
return this;
}
public String getEndTime() {
return endTime;
}
public RedPacketInfoModel setEndTime(String endTime) {
this.endTime = endTime;
return this;
}
public String getUserId() {
return userId;
}
public RedPacketInfoModel setUserId(String userId) {
this.userId = userId;
return this;
}
public String getUserNicename() {
return userNicename;
}
public RedPacketInfoModel setUserNicename(String userNicename) {
this.userNicename = userNicename;
return this;
}
public String getAvatar() {
return avatar;
}
public RedPacketInfoModel setAvatar(String avatar) {
this.avatar = avatar;
return this;
}
public String getAvatarThumb() {
return avatarThumb;
}
public RedPacketInfoModel setAvatarThumb(String avatarThumb) {
this.avatarThumb = avatarThumb;
return this;
}
public String getId() {
return id;
}
public RedPacketInfoModel setId(String id) {
this.id = id;
return this;
}
public String getUserExists() {
return userExists;
}
public RedPacketInfoModel setUserExists(String userExists) {
this.userExists = userExists;
return this;
}
public String getUserGoldenBean() {
return userGoldenBean;
}
public RedPacketInfoModel setUserGoldenBean(String userGoldenBean) {
this.userGoldenBean = userGoldenBean;
return this;
}
}

View File

@@ -0,0 +1,117 @@
package com.yunbao.common.bean;
import com.google.gson.annotations.SerializedName;
public class RedPacketListBean extends BaseModel {
public static final int RED_PACKET_STATUS_SUCCESS=1;//红包消费
public static final int RED_PACKET_STATUS_BACK=2;//红包退回
public static final int RED_PACKET_CURRENT_STATUS_SUCCESS=1;//红包已生效
public static final int RED_PACKET_CURRENT_STATUS_TIMEOUT=2;//红包已过期
@SerializedName("id")
private int id;
@SerializedName("live_nicename")
private String liveNicename;
@SerializedName("create_time")
private String createTime;
@SerializedName("red_packet_money")
private long redPacketMoney;
@SerializedName("red_packet_status")
private int redPacketStatus;
@SerializedName("current_status")
private int currentStatus;
@SerializedName("uid")
private long uid;
@SerializedName("amount_diamond")
private long amountDiamond;
@SerializedName("amount_refund")
private long amountRefund;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getLiveNicename() {
return liveNicename;
}
public void setLiveNicename(String liveNicename) {
this.liveNicename = liveNicename;
}
public String getCreateTime() {
return createTime;
}
public void setCreateTime(String createTime) {
this.createTime = createTime;
}
public long getRedPacketMoney() {
return redPacketMoney;
}
public void setRedPacketMoney(long redPacketMoney) {
this.redPacketMoney = redPacketMoney;
}
public int getRedPacketStatus() {
return redPacketStatus;
}
public void setRedPacketStatus(int redPacketStatus) {
this.redPacketStatus = redPacketStatus;
}
public long getUid() {
return uid;
}
public void setUid(long uid) {
this.uid = uid;
}
public int getCurrentStatus() {
return currentStatus;
}
public void setCurrentStatus(int currentStatus) {
this.currentStatus = currentStatus;
}
public long getAmountDiamond() {
return amountDiamond;
}
public void setAmountDiamond(long amountDiamond) {
this.amountDiamond = amountDiamond;
}
public long getAmountRefund() {
return amountRefund;
}
public void setAmountRefund(long amountRefund) {
this.amountRefund = amountRefund;
}
@Override
public String toString() {
return "RedPacketListBean{" +
"id=" + id +
", liveNicename='" + liveNicename + '\'' +
", createTime='" + createTime + '\'' +
", redPacketMoney=" + redPacketMoney +
", redPacketStatus=" + redPacketStatus +
", currentStatus=" + currentStatus +
", uid=" + uid +
", amountDiamond=" + amountDiamond +
", amountRefund=" + amountRefund +
'}';
}
}

View File

@@ -0,0 +1,92 @@
package com.yunbao.common.bean;
import com.google.gson.annotations.SerializedName;
public class RedPacketModel extends BaseModel {
//是否展示
@SerializedName("is_show")
private int isShow;
//正在进行的红包数量
@SerializedName("red_packet_count")
private int redPacketCount;
//正在进行的红包总数量
@SerializedName("red_packet_quantity")
private int redPacketQuantity;
//当前红包剩余数量
@SerializedName("red_packet_remain")
private int redPacketRemain;
//红包倒计时
@SerializedName("countdown")
private int countdown;
//红包id
@SerializedName("red_packet_id")
private String redPacketId;
//红包领取条件
@SerializedName("conditions")
private int conditions;
public int getIsShow() {
return isShow;
}
public RedPacketModel setIsShow(int isShow) {
this.isShow = isShow;
return this;
}
public int getRedPacketCount() {
return redPacketCount;
}
public RedPacketModel setRedPacketCount(int redPacketCount) {
this.redPacketCount = redPacketCount;
return this;
}
public int getRedPacketQuantity() {
return redPacketQuantity;
}
public RedPacketModel setRedPacketQuantity(int redPacketQuantity) {
this.redPacketQuantity = redPacketQuantity;
return this;
}
public int getRedPacketRemain() {
return redPacketRemain;
}
public RedPacketModel setRedPacketRemain(int redPacketRemain) {
this.redPacketRemain = redPacketRemain;
return this;
}
public int getCountdown() {
return countdown;
}
public RedPacketModel setCountdown(int countdown) {
this.countdown = countdown;
return this;
}
public String getRedPacketId() {
return redPacketId;
}
public RedPacketModel setRedPacketId(String redPacketId) {
this.redPacketId = redPacketId;
return this;
}
public int getConditions() {
return conditions;
}
public RedPacketModel setConditions(int conditions) {
this.conditions = conditions;
return this;
}
}

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

@@ -80,7 +80,9 @@ public abstract class AbsDialogFragment extends DialogFragment {
@Override
public void show(@NonNull FragmentManager manager, @Nullable String tag) {
try {
super.show(manager, tag);
if (manager.findFragmentByTag(tag) == null) {
super.show(manager, tag);
}
} catch (Exception e) {
e.printStackTrace();
}

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

@@ -34,6 +34,17 @@ public class AllServerNotifyEvent extends BaseModel {
//主播名字
@SerializedName("ancherName")
private String anchorName;
// 是否是红包
private boolean isRedPacket = false;
public boolean isRedPacket() {
return isRedPacket;
}
public AllServerNotifyEvent setRedPacket(boolean redPacket) {
isRedPacket = redPacket;
return this;
}
public String getAnchorName() {
return anchorName;
@@ -137,6 +148,6 @@ public class AllServerNotifyEvent extends BaseModel {
", blindBoxId='" + blindBoxId + '\'' + "\n" +
", boxType='" + boxType + '\'' + "\n" +
", displaySrc='" + displaySrc + '\'' + "\n" +
'}' + "\n" ;
'}' + "\n";
}
}

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,27 @@
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,4 @@
package com.yunbao.common.event;
public class LiveGiftDialogEvent {
}

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

@@ -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();
}
}
});
});*/
}
@@ -231,6 +231,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();

View File

@@ -2,6 +2,7 @@ package com.yunbao.common.http;
import com.alibaba.fastjson.JSONObject;
import com.yunbao.common.bean.ActiveModel;
import com.yunbao.common.bean.AnchorRecommendItemModel;
import com.yunbao.common.bean.AnchorRecommendModel;
import com.yunbao.common.bean.BaseModel;
import com.yunbao.common.bean.BlindBoxInfoModel;
@@ -11,6 +12,10 @@ 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.GiftAlreadyWallModel;
import com.yunbao.common.bean.GiftGuideModel;
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;
@@ -26,6 +31,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;
@@ -35,6 +41,10 @@ import com.yunbao.common.bean.PrankGiftBean;
import com.yunbao.common.bean.PrankHttpTurntableBean;
import com.yunbao.common.bean.RandomPkUserBean;
import com.yunbao.common.bean.RankPkInfoBean;
import com.yunbao.common.bean.RedPacketDetailsBean;
import com.yunbao.common.bean.RedPacketGiftModel;
import com.yunbao.common.bean.RedPacketInfoModel;
import com.yunbao.common.bean.RedPacketListBean;
import com.yunbao.common.bean.SearchModel;
import com.yunbao.common.bean.SetAttentsModel;
import com.yunbao.common.bean.SlideInBannerModel;
@@ -730,4 +740,163 @@ public interface PDLiveApi {
*/
@GET("/api/public/?service=Live.getBlindBoxInfo")
Observable<ResponseModel<List<BlindBoxInfoModel>>> getBlindBoxInfo();
/**
* 获取红包记录列表
*/
@GET("/api/public/?service=Live.redPacketRecord")
Observable<ResponseModel<List<RedPacketListBean>>> getRedPacketList();
/**
* 获取红包詳情
*/
@GET("/api/public/?service=Live.redPacketRecordDetails")
Observable<ResponseModel<RedPacketDetailsBean>> getRedPacketDetails(@Query("red_packet_id") int id);
/**
* 获取直播间上下滑动红包集合
*/
@GET("/api/public/?service=Home.getRedPacket")
Observable<ResponseModel<List<AnchorRecommendItemModel>>> getRedPacket();
/**
* 获取盲盒礼物当前数据
*/
@GET("/api/public/?service=Live.createRedPacket")
Observable<ResponseModel<Object>> createRedPacket(
@Query("liveuid") String liveUid,
@Query("red_packet_money") String redPacketMoney,
@Query("red_packet_quantity") String redPacketQuantity,
@Query("conditions") String conditions
);
/**
* 获取盲盒礼物当前数据
*/
@GET("/api/public/?service=Live.redPacketInfo")
Observable<ResponseModel<RedPacketInfoModel>> redPacketInfo(
@Query("liveuid") String liveUid,
@Query("red_packet_id") String redPacketId
);
/**
* 获取盲盒礼物当前数据
*/
@GET("/api/public/?service=Live.getRedPacket")
Observable<ResponseModel<RedPacketInfoModel>> getRedPacket(
@Query("liveuid") String liveUid,
@Query("stream") String stream,
@Query("red_packet_id") String redPacketId
);
/**
* 超级红包打开接口
*/
@GET("/api/public/?service=Live.getRedPacketSuperPrize")
Observable<ResponseModel<RedPacketInfoModel>> getRedPacketSuperPrize(
@Query("liveuid") String liveUid,
@Query("super_jackpot_id") String superJackpotId
);
/**
* 获取普通红包的领取记录
*/
@GET("/api/public/?service=Live.getRedPacketReceive")
Observable<ResponseModel<List<RedPacketGiftModel>>> getRedPacketReceive(
@Query("red_packet_id") String redPacketId
);
/**
* 获取普通红包的领取记录
*/
@GET("/api/public/?service=Live.getRedPacketSuperPrizeReceive")
Observable<ResponseModel<List<RedPacketGiftModel>>> getRedPacketSuperPrizeReceive(
@Query("super_jackpot_id") String superJackpotId
);
/**
* 获取普通红包的领取记录
*/
@GET("/api/public/?service=Live.endRedPacket")
Observable<ResponseModel<Object>> endRedPacket(
@Query("liveuid") String liveUid,
@Query("red_packet_id") String redPacketId
);
/**
* 获取普通红包的领取记录
*/
@GET("/api/public/?service=Live.startRedPacketRobot")
Observable<ResponseModel<Object>> startRedPacketRobot(
@Query("liveuid") String liveUid,
@Query("stream") String stream,
@Query("red_packet_id") String redPacketId
);
/**
* 礼物墙已点亮
*/
@GET("/api/public/?service=Gift.giftAlreadyWall")
Observable<ResponseModel<GiftAlreadyWallModel>> giftAlreadyWall(
@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
);
@GET("/api/public/?service=Gift.getGiftGuideHistory")
Observable<ResponseModel<List<GiftGuideModel>>> getGiftGuideHistory(
@Query("liveuid") String liveUid
);
@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();
}

View File

@@ -13,6 +13,10 @@ 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.GiftAlreadyWallModel;
import com.yunbao.common.bean.GiftGuideModel;
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;
@@ -27,6 +31,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.NobleRankHideUserListModel;
import com.yunbao.common.bean.NobleTrumpetModel;
import com.yunbao.common.bean.PkRankBean;
@@ -34,6 +39,10 @@ import com.yunbao.common.bean.PrankGiftBean;
import com.yunbao.common.bean.PrankHttpTurntableBean;
import com.yunbao.common.bean.RandomPkUserBean;
import com.yunbao.common.bean.RankPkInfoBean;
import com.yunbao.common.bean.RedPacketDetailsBean;
import com.yunbao.common.bean.RedPacketGiftModel;
import com.yunbao.common.bean.RedPacketInfoModel;
import com.yunbao.common.bean.RedPacketListBean;
import com.yunbao.common.bean.SetAttentsModel;
import com.yunbao.common.bean.StarChallengeStatusModel;
import com.yunbao.common.bean.UserAreaBean;
@@ -1264,6 +1273,7 @@ public class LiveNetManager {
callback.onSuccess(listResponseModel.getData().getInfo());
}
}, throwable -> {
throwable.printStackTrace();
if (callback != null) {
callback.onError(throwable.getMessage());
}
@@ -1550,6 +1560,445 @@ public class LiveNetManager {
}).isDisposed();
}
/**
* 获取红包记录列表
*/
public void getRedPacketList(HttpCallback<List<RedPacketListBean>> callback) {
API.get().pdLiveApi(mContext)
.getRedPacketList()
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<ResponseModel<List<RedPacketListBean>>>() {
@Override
public void accept(ResponseModel<List<RedPacketListBean>> 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 getRedPacketUserList(int id, HttpCallback<RedPacketDetailsBean> callback) {
API.get().pdLiveApi(mContext)
.getRedPacketDetails(id)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<ResponseModel<RedPacketDetailsBean>>() {
@Override
public void accept(ResponseModel<RedPacketDetailsBean> 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();
}
/**
* 创建红包
*
* @param liveUid 直播间id
* @param redPacketMoney 红包金额
* @param redPacketQuantity 红包数量
* @param conditions 红包领取条件 0.无 1.关注主播
*/
public void createRedPacket(String liveUid, String redPacketMoney, String redPacketQuantity, String conditions, HttpCallback<String> callback) {
API.get().pdLiveApi(mContext)
.createRedPacket(liveUid, redPacketMoney, redPacketQuantity, conditions)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<ResponseModel<Object>>() {
@Override
public void accept(ResponseModel<Object> objectResponseModel) throws Exception {
if (callback != null) {
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();
}
/**
* 红包信息
*
* @param liveUid 直播间id
* @param redPacketId 红包id
*/
public void redPacketInfo(String liveUid, String redPacketId, HttpCallback<RedPacketInfoModel> callback) {
API.get().pdLiveApi(mContext)
.redPacketInfo(liveUid, redPacketId)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(redPacketInfoModelResponseModel -> {
if (callback != null) {
callback.onSuccess(redPacketInfoModelResponseModel.getData().getInfo());
}
}, throwable -> {
if (callback != null) {
callback.onError(mContext.getString(R.string.net_error));
}
}).isDisposed();
}
/**
* 领取红包
*
* @param liveUid 直播间id
* @param redPacketId 红包id
*/
public void getRedPacket(String liveUid, String stream, String redPacketId, HttpCallback<RedPacketInfoModel> callback) {
API.get().pdLiveApi(mContext)
.getRedPacket(liveUid, stream, redPacketId)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(redPacketInfoModelResponseModel -> {
if (callback != null) {
callback.onSuccess(redPacketInfoModelResponseModel.getData().getInfo());
}
}, throwable -> {
if (callback != null) {
callback.onError(mContext.getString(R.string.net_error));
}
}).isDisposed();
}
public void getRedPacketSuperPrize(String liveUid, String superJackpotId, HttpCallback<RedPacketInfoModel> callback) {
API.get().pdLiveApi(mContext)
.getRedPacketSuperPrize(liveUid, superJackpotId)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<ResponseModel<RedPacketInfoModel>>() {
@Override
public void accept(ResponseModel<RedPacketInfoModel> redPacketInfoModelResponseModel) throws Exception {
if (callback != null) {
callback.onSuccess(redPacketInfoModelResponseModel.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 getRedPacketReceive(String redPacketId, HttpCallback<List<RedPacketGiftModel>> callback) {
API.get().pdLiveApi(mContext)
.getRedPacketReceive(redPacketId)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<ResponseModel<List<RedPacketGiftModel>>>() {
@Override
public void accept(ResponseModel<List<RedPacketGiftModel>> 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 getRedPacketSuperPrizeReceive(String redPacketId, HttpCallback<List<RedPacketGiftModel>> callback) {
API.get().pdLiveApi(mContext)
.getRedPacketSuperPrizeReceive(redPacketId)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<ResponseModel<List<RedPacketGiftModel>>>() {
@Override
public void accept(ResponseModel<List<RedPacketGiftModel>> 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 endRedPacket(String liveUid, String redPacketId, HttpCallback<String> callback) {
API.get().pdLiveApi(mContext)
.endRedPacket(liveUid, redPacketId)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<ResponseModel<Object>>() {
@Override
public void accept(ResponseModel<Object> objectResponseModel) throws Exception {
if (callback != null) {
callback.onSuccess("");
}
}
}, 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 startRedPacketRobot(String liveUid, String stream, String redPacketId, HttpCallback<String> callback) {
API.get().pdLiveApi(mContext)
.startRedPacketRobot(liveUid, stream, redPacketId)
.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 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, HttpCallback<List<GiftGuideModel>> callback) {
API.get().pdLiveApi(mContext)
.getGiftGuide(liveUid)
.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 liveUid, HttpCallback<List<GiftGuideModel>> callback) {
API.get().pdLiveApi(mContext)
.getGiftGuideHistory(liveUid)
.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(HttpCallback<MedalAchievementModel> callback) {
API.get().pdLiveApi(mContext)
.getLiveMedalList()
.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();
}
/**
* 直播间取消网络请求
*/

View File

@@ -2,8 +2,8 @@ package com.yunbao.common.http.main;
import android.app.Activity;
import com.yunbao.common.bean.AnchorRecommendItemModel;
import com.yunbao.common.bean.AnchorRecommendModel;
import com.yunbao.common.bean.BaseModel;
import com.yunbao.common.bean.FaceBookUpModel;
import com.yunbao.common.bean.IMLoginModel;
import com.yunbao.common.bean.MsgSwitchDetailModel;
@@ -13,7 +13,6 @@ import com.yunbao.common.http.API;
import com.yunbao.common.http.ResponseData;
import com.yunbao.common.http.ResponseModel;
import com.yunbao.common.http.base.HttpCallback;
import com.yunbao.common.utils.ToastUtil;
import java.util.List;
@@ -207,13 +206,14 @@ public class MainNetManager {
/**
* 获取推送关注的设置和关注列表
*
* @param callback
*/
public void getMsgSwitchDetail(HttpCallback<MsgSwitchDetailModel> callback) {
API.get().pdLiveApi(mContext).getMsgSwitchDetail()
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(msgSwitchDetailModelResponseModel -> {
.subscribe(msgSwitchDetailModelResponseModel -> {
if (callback != null) {
MsgSwitchDetailModel msgSwitchDetailModel = msgSwitchDetailModelResponseModel.getData().getInfo();
callback.onSuccess(msgSwitchDetailModel);
@@ -227,13 +227,14 @@ public class MainNetManager {
/**
* 推送开关设置
*
* @param callback
*/
public void setMsgMasterSwitch(String status,String type,HttpCallback<ResponseData> callback) {
API.get().pdLiveApi(mContext).setMsgMasterSwitch(status,type)
public void setMsgMasterSwitch(String status, String type, HttpCallback<ResponseData> callback) {
API.get().pdLiveApi(mContext).setMsgMasterSwitch(status, type)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(BaseModel -> {
.subscribe(BaseModel -> {
if (callback != null) {
ResponseData responseData = BaseModel.getData();
callback.onSuccess(responseData);
@@ -247,13 +248,14 @@ public class MainNetManager {
/**
* 主播开播推送开关设置
*
* @param callback
*/
public void setBeginShowMsgSwitch(String status,String isAll,String liveuid,HttpCallback<ResponseData> callback) {
API.get().pdLiveApi(mContext).setBeginShowMsgSwitch(status,isAll,liveuid)
public void setBeginShowMsgSwitch(String status, String isAll, String liveuid, HttpCallback<ResponseData> callback) {
API.get().pdLiveApi(mContext).setBeginShowMsgSwitch(status, isAll, liveuid)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(BaseModel -> {
.subscribe(BaseModel -> {
if (callback != null) {
ResponseData responseData = BaseModel.getData();
callback.onSuccess(responseData);
@@ -264,5 +266,22 @@ public class MainNetManager {
}
}).isDisposed();
}
/**
* 获取直播间上下滑动红包集合
*/
public void getRedPacket(HttpCallback<List<AnchorRecommendItemModel>> callback) {
API.get().pdLiveApi(mContext).getRedPacket()
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(msgSwitchDetailModelResponseModel -> {
if (callback != null) {
callback.onSuccess(msgSwitchDetailModelResponseModel.getData().getInfo());
}
}, throwable -> {
if (callback != null) {
callback.onError(throwable.getMessage());
}
}).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("1").setFontColour("#ffffff"));
giftQuantityModels.add(new GiftQuantityModel().setGiftQuantity("10").setFontColour("#ffffff"));
giftQuantityModels.add(new GiftQuantityModel().setGiftQuantity("66").setFontColour("#ffffff"));
giftQuantityModels.add(new GiftQuantityModel().setGiftQuantity("88").setFontColour("#FA62A1"));
giftQuantityModels.add(new GiftQuantityModel().setGiftQuantity("100").setFontColour("#9B62FF"));
giftQuantityModels.add(new GiftQuantityModel().setGiftQuantity("520").setFontColour("#65BFFB"));
giftQuantityModels.add(new GiftQuantityModel().setGiftQuantity("1314").setFontColour("#05F3EC"));
}
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

@@ -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

@@ -542,9 +542,15 @@ public class JavascriptInterfaceUtils {
Bus.get().post(new JavascriptInterfaceEvent()
.setMethod("closeLiveRoom"));
}
@JavascriptInterface
public void clickLogOffAccount() {
Bus.get().post(new JavascriptInterfaceEvent()
.setMethod("clickLogOffAccount"));
}
@JavascriptInterface
public void toGiftNamingAlertAllPageView(String mAnchorName, String mLiveUid, String mAvatarUrl) {
RouteUtil.forwardGiftWallActivity("", mAnchorName, mLiveUid, mAvatarUrl, 0);
}
}

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

@@ -25,6 +25,8 @@ import com.lzy.okserver.OkUpload;
import com.lzy.okserver.upload.UploadListener;
import com.lzy.okserver.upload.UploadTask;
import com.yunbao.common.CommonAppConfig;
import com.yunbao.common.bean.IMLoginModel;
import com.yunbao.common.manager.IMLoginManager;
import java.io.BufferedOutputStream;
import java.io.File;
@@ -157,7 +159,13 @@ public class LogUtil {
public static void shareFile(Context context) {
try {
if (!new File(Environment.getExternalStorageDirectory().getAbsolutePath(), "pdlive.debug").exists()) {
IMLoginModel bean = IMLoginManager.get(context).getUserInfo();
boolean isAnchor=false;
if(bean!=null){
isAnchor=bean.anchorUserType();
}
//有debug文件或主播才允许
if (!new File(Environment.getExternalStorageDirectory().getAbsolutePath(), "pdlive.debug").exists()&&!isAnchor) {
return;
}
} catch (Exception e) {

View File

@@ -0,0 +1,262 @@
package com.yunbao.common.utils;
import android.content.Context;
import android.content.DialogInterface;
import android.os.Build;
import android.os.Handler;
import android.os.Looper;
import android.util.Log;
import com.yunbao.common.CommonAppConfig;
import com.yunbao.common.CommonAppContext;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.lang.reflect.Field;
import java.util.Arrays;
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;
/**
* 插件加载器
*/
public class PluginManager {
private static PluginManager manager;
private static final String TAG = "插件管理器";
private String anchorPluginDownloadUrl = "https://downs.yaoulive.com/pluginsForAnchor-release.apk";
private PluginManager() {
}
public static PluginManager getInstance() {
if (manager == null) {
manager = new PluginManager();
}
return manager;
}
/**
* 设置主播插件下载地址
*/
public void setAnchorPluginDownloadUrl(String anchorPluginDownloadUrl) {
this.anchorPluginDownloadUrl = anchorPluginDownloadUrl;
}
public boolean isDownloadApk() {
if(!CommonAppConfig.IS_PLUGIN_MODEL){
return true;
}
return new File(CommonAppContext.sInstance.getFilesDir().getAbsolutePath() + File.separator + "plugin_download" + File.separator + "anchorPlugin.apk").exists();
}
/**
* 加载主播插件
*/
public void loadAnchorPlugin(DialogInterface.OnDismissListener dismissListener) {
if(!CommonAppConfig.IS_PLUGIN_MODEL){
dismissListener.onDismiss(null);
return;
}
new Thread(() -> {
try {
if (Arrays.asList(CommonAppContext.sInstance.getAssets().list("")).contains("anchorPlugin.apk")) {
copyAssetsFile(CommonAppContext.sInstance, "anchorPlugin.apk", "anchorPlugin.apk", CommonAppContext.sInstance.getFilesDir().getAbsolutePath() + File.separator + "plugin_download");
Log.d(TAG, "解压assets下的文件");
}
} catch (IOException e) {
e.printStackTrace();
}
File sdk = new File(CommonAppContext.sInstance.getFilesDir().getAbsolutePath() + File.separator + "plugin_download" + File.separator + "anchorPlugin.apk");
if (!sdk.exists()) {
if (StringUtil.isEmpty(anchorPluginDownloadUrl)) {
Log.e(TAG, "主播下载地址为空");
return;
}
downloadAnchorSdk(dismissListener);
return;
}
String outDir = CommonAppContext.sInstance.getFilesDir().getAbsolutePath() + File.separator + "plugin";
loadFaceSo(sdk, outDir);
loadFaceBundle(sdk, outDir);
new Handler(Looper.getMainLooper()).post(() -> {
dismissListener.onDismiss(null);
});
}).start();
}
/**
* 加载美颜so文件
*
* @param plugin 插件apk文件
* @param outDir 解压路径
*/
private void loadFaceSo(File plugin, String outDir) {
if(!new File(CommonAppContext.sInstance.getFilesDir().getAbsolutePath() + File.separator + "plugin"+File.separator+"lib").exists()) {
unzip(plugin.getAbsolutePath(), outDir, ".so");
}
String[] abis = Build.SUPPORTED_ABIS;
String abi = Arrays.asList(abis).contains("arm64-v8a") ? "arm64-v8a" : "armeabi-v7a";
File plugins = new File(outDir + File.separator + "lib" + File.separator + abi);
loadSo(plugins, "libfuai");
loadSo(plugins, "libCNamaSDK");
try {
Field field = Class.forName("com.faceunity.wrapper.faceunity$LoadConfig").getDeclaredField("sLoadedLibrary");
field.setAccessible(true);
field.set(null,true);
}catch (Exception e){
e.printStackTrace();
}
}
/**
* 设置美颜Bundle文件
*
* @param plugin 插件apk文件
* @param outDir 解压路径
*/
private void loadFaceBundle(File plugin, String outDir) {
if(!new File(CommonAppContext.sInstance.getFilesDir().getAbsolutePath() + File.separator + "plugin"+File.separator+"assets").exists()) {
unzip(plugin.getAbsolutePath(), outDir, ".bundle");
}
try {
Object BUNDLE_AI_FACE = Class.forName("com.yunbao.faceunity.utils.FURenderer").getField("BUNDLE_AI_FACE").get(null);
Object BUNDLE_FACE_BEAUTIFICATION = Class.forName("com.yunbao.faceunity.utils.FaceUnityConfig").getField("BUNDLE_FACE_BEAUTIFICATION").get(null);
Class.forName("com.yunbao.faceunity.utils.FURenderer").getField("BUNDLE_AI_FACE").set(null, outDir + File.separator + "assets" + File.separator + BUNDLE_AI_FACE);
Class.forName("com.yunbao.faceunity.utils.FaceUnityConfig").getField("BUNDLE_FACE_BEAUTIFICATION").set(null, outDir + File.separator + "assets" + File.separator + BUNDLE_FACE_BEAUTIFICATION);
} catch (Exception e) {
e.printStackTrace();
}
}
/**
* 加载指定so
*
* @param dir so文件路径
* @param file so文件名字
*/
private void loadSo(File dir, String file) {
file += ".so";
if (new File(dir.getAbsolutePath() + File.separator + file).exists()) {
System.load(dir + File.separator + file);
Log.d(TAG, "加载成功 " + dir + File.separator + file);
} else {
Log.e(TAG, "不存在 " + dir + File.separator + file);
}
}
/**
* 下载主播插件包
*/
private void downloadAnchorSdk(DialogInterface.OnDismissListener dismissListener) {
String downloadDir = new File(CommonAppContext.sInstance.getFilesDir().getAbsolutePath() + File.separator + "plugin_download").getAbsolutePath();
new DownloadUtil().download("plugin", downloadDir, "anchorPlugin.apk", anchorPluginDownloadUrl, new DownloadUtil.Callback() {
@Override
public void onSuccess(File file) {
Log.d(TAG, "下载成功 " + file);
loadAnchorPlugin(dismissListener);
}
@Override
public void onProgress(int progress) {
}
@Override
public void onError(Throwable e) {
}
});
}
/**
* 解压zip文件
*
* @param zip zip文件
* @param outDir 解压路径
* @param suffix 过滤
*/
private boolean unzip(String zip, String outDir, String suffix) {
FileOutputStream out;
byte buffer[] = new byte[1024];
try {
ZipInputStream zis = new ZipInputStream(new FileInputStream(zip));
ZipEntry entry = zis.getNextEntry();
while (entry != null) {
String name = entry.getName();
if (entry.isDirectory()) {
File newDir = new File(outDir + entry.getName());
newDir.mkdir();
} else if (name.endsWith(suffix)) {
File outputFile = new File(outDir + File.separator + name);
String outputPath = outputFile.getCanonicalPath();
name = outputPath
.substring(outputPath.lastIndexOf("/") + 1);
outputPath = outputPath.substring(0, outputPath
.lastIndexOf("/"));
File outputDir = new File(outputPath);
outputDir.mkdirs();
outputFile = new File(outputPath, name);
outputFile.createNewFile();
out = new FileOutputStream(outputFile);
int tmp = 0;
while ((tmp = zis.read(buffer)) > 0) {
out.write(buffer, 0, tmp);
}
/* do {
tmp = zis.read(buffer);
if (tmp <= 0) {
break;
} else {
out.write(buffer, 0, tmp);
}
} while (true);*/
out.close();
}
entry = zis.getNextEntry();
}
zis.close();
return true;
} catch (IOException e) {
e.printStackTrace();
return false;
}
}
public static String copyAssetsFile(Context context, String assetsPath, String fileName, String saveFileDir) {
File fileDir = new File(saveFileDir);
if (!fileDir.exists()) {
fileDir.mkdirs();
}
File file = new File(fileDir, fileName);
if (file.exists()) {
return file.getAbsolutePath();
}
try {
InputStream inputStream = context.getAssets().open(assetsPath);
FileOutputStream fos = new FileOutputStream(file);
BufferedInputStream bis = new BufferedInputStream(inputStream);
BufferedOutputStream bos = new BufferedOutputStream(fos);
byte[] byteArray = new byte[1024];
int bytes = bis.read(byteArray);
while (bytes > 0) {
bos.write(byteArray, 0, bytes);
bos.flush();
bytes = bis.read(byteArray);
}
bos.close();
fos.close();
return file.getAbsolutePath();
} catch (IOException e) {
e.printStackTrace();
}
return null;
}
}

View File

@@ -10,6 +10,7 @@ import com.yunbao.common.CommonAppContext;
import com.yunbao.common.Constants;
import com.yunbao.common.HtmlConfig;
import com.yunbao.common.bean.LiveBean;
import com.yunbao.common.bean.RedPacketListBean;
import com.yunbao.common.manager.IMLoginManager;
import java.util.Locale;
@@ -34,10 +35,15 @@ 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";
public static final String PATH_LOGIN = "/main/LoginActivity";
public static final String PATH_CS = "/main/CustomerServiceWebViewActivity";
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 void forwardFansActivity(String uid) {
ARouter.getInstance().build(PATH_FANSACTIVITY)
@@ -79,6 +85,7 @@ public class RouteUtil {
.withBoolean("forwardEntry", true)
.navigation();
}
/**
* 只回到登录页,不提示东西
*/
@@ -187,6 +194,7 @@ public class RouteUtil {
ARouter.getInstance().build(PATH_EDITPROFILE)
.navigation();
}
/**
* 修改个人资料
*/
@@ -225,6 +233,15 @@ public class RouteUtil {
postcard.navigation();
}
public static void forwardGiftWallActivity(String mStream, String mAnchorName, String mLiveUid, String mAvatarUrl, int isAttention) {
ARouter.getInstance().build(PATH_GIFT_WALL)
.withString(Constants.LIVE_UID, mLiveUid)
.withString(Constants.STREAM, mStream)
.withString("mAnchorName", mAnchorName)
.withString("mAvatarUrl", mAvatarUrl)
.withInt("isAttention", isAttention)
.navigation();
}
/**
* 举报个人
@@ -251,4 +268,41 @@ public class RouteUtil {
ARouter.getInstance().build(PATH_FACEBOOKACTIVITY)
.navigation();
}
/**
* 客服页面
*/
public static void forwardCustomerService(String url) {
ARouter.getInstance().build(PATH_CS)
.withString(Constants.URL, url)
.navigation();
}
/**
* 红包记录列表
*/
public static void forwardRedPacketList() {
ARouter.getInstance().build(PATH_RED_PACKET_LIST)
.navigation();
}
/**
* 红包详情
*/
public static void forwardRedPacketInfo(RedPacketListBean bean) {
ARouter.getInstance().build(PATH_RED_PACKET_INFO)
.withSerializable("bean", bean)
.navigation();
}
/**
* 红包发放情况
*
* @param id 发放者uid
*/
public static void forwardRedPacketUser(int id) {
ARouter.getInstance().build(PATH_RED_PACKET_USER)
.withInt("id", id)
.navigation();
}
}

View File

@@ -6,6 +6,7 @@ package com.yunbao.common.utils;
public class TimeUtils {
/**
* 毫秒转秒
*
* @param duration 毫秒数
* @return
*/
@@ -17,4 +18,53 @@ public class TimeUtils {
toSecond = ((minute * 60) + second);
return toSecond;
}
//根据秒数转化为时分秒 00:00:00
public static String getTime(int second) {
if (second < 10) {
return "" + second;
}
if (second < 60) {
return "" + second;
}
if (second < 3600) {
int minute = second / 60;
second = second - minute * 60;
if (minute < 10) {
if (second < 10) {
return "0" + minute + ":0" + second;
}
return "0" + minute + ":" + second;
}
if (second < 10) {
return minute + ":0" + second;
}
return minute + ":" + second;
}
int hour = second / 3600;
int minute = (second - hour * 3600) / 60;
second = second - hour * 3600 - minute * 60;
if (hour < 10) {
if (minute < 10) {
if (second < 10) {
return "0" + hour + ":0" + minute + ":0" + second;
}
return "0" + hour + ":0" + minute + ":" + second;
}
if (second < 10) {
return "0" + hour + minute + ":0" + second;
}
return "0" + hour + minute + ":" + second;
}
if (minute < 10) {
if (second < 10) {
return hour + ":0" + minute + ":0" + second;
}
return hour + ":0" + minute + ":" + second;
}
if (second < 10) {
return hour + minute + ":0" + second;
}
return hour + minute + ":" + second;
}
}

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

@@ -0,0 +1,52 @@
package com.yunbao.common.views;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.text.style.ImageSpan;
import org.jetbrains.annotations.NotNull;
public class CenterImageSpan extends ImageSpan {
public CenterImageSpan(Drawable arg1) {
super(arg1);
}
public int getSize(@NotNull Paint paint, CharSequence text, int start, int end, Paint.FontMetricsInt fm) {
Drawable d = getDrawable();
Rect rect = d.getBounds();
if (fm != null) {
Paint.FontMetricsInt fmPaint = paint.getFontMetricsInt();
int fontHeight = fmPaint.bottom - fmPaint.top;
int drHeight = rect.bottom - rect.top;
int top = drHeight / 2 - fontHeight / 4;
int bottom = drHeight / 2 + fontHeight / 4;
fm.ascent = -bottom;
fm.top = -bottom;
fm.bottom = top;
fm.descent = top;
}
return rect.right;
}
@Override
public void draw(@NotNull Canvas canvas, CharSequence text, int start, int end, float x, int top, int y, int bottom, @NotNull Paint paint) {
Drawable b = getDrawable();
canvas.save();
int transY = 0;
transY = ((bottom - top) - b.getBounds().bottom) / 2 + top;
canvas.translate(x, transY);
b.draw(canvas);
canvas.restore();
}
}

View File

@@ -139,7 +139,7 @@ public class CustomDrawerPopupView extends DrawerPopupView {
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.online), new ViewClicksAntiShake.ViewClicksCallBack() {
@Override
public void onViewClicks() {
XPopup.Builder builder = new XPopup.Builder(getContext()).atView(findViewById(R.id.more_menu));
XPopup.Builder builder = new XPopup.Builder(getContext()).atView(findViewById(R.id.diamond_linear));
builder.hasShadowBg(false)
.isDestroyOnDismiss(true)
.isLightStatusBar(false)

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 GiftAlreadyWallViewHolder extends RecyclerView.ViewHolder {
private ImageView giftImg;
private TextView giftTitle;
public GiftAlreadyWallViewHolder(@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(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,59 @@
package com.yunbao.common.views;
import android.content.Context;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
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.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();
}
});
}
@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

@@ -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

@@ -0,0 +1,73 @@
package com.yunbao.common.views.weight;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.RectF;
import android.util.AttributeSet;
import android.view.View;
public class CircleProgress extends View {
private Paint mPaint;
private RectF mRectF;
private int mCurrent = 1, mMax = 100;
//圆弧(也可以说是圆环)的宽度
private float mArcWidth =8;
//控件的宽度
private float mWidth;
public CircleProgress(Context context) {
this(context, null);
}
public CircleProgress(Context context, AttributeSet attrs) {
this(context, attrs, 0);
}
public CircleProgress(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
mPaint = new Paint();
mPaint.setAntiAlias(true);
mRectF = new RectF();
}
public void setCurrent(int mCurrent) {
this.mCurrent = mCurrent;
invalidate();
}
public void setMax(int mMax) {
this.mMax = mMax;
}
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
//getMeasuredWidth获取的是view的原始大小也就是xml中配置或者代码中设置的大小
//getWidth获取的是view最终显示的大小这个大小不一定等于原始大小
mWidth = getMeasuredWidth();
}
@Override
protected void onDraw(Canvas canvas) {
super.onDraw(canvas);
mPaint.setStyle(Paint.Style.STROKE);
//设置圆弧的宽度(圆环的宽度)
mPaint.setStrokeWidth(mArcWidth);
mPaint.setColor(Color.parseColor("#FF98A2"));
//大圆的半径
float bigCircleRadius = mWidth / 2;
//小圆的半径
float smallCircleRadius = bigCircleRadius - mArcWidth;
//绘制小圆
canvas.drawCircle(bigCircleRadius, bigCircleRadius, smallCircleRadius, mPaint);
mPaint.setColor(Color.parseColor("#FFF7CD"));
mRectF.set(mArcWidth, mArcWidth, mWidth - mArcWidth, mWidth - mArcWidth);
//绘制圆弧
canvas.drawArc(mRectF, -90, mCurrent * 360 / mMax, false, mPaint);
setBackgroundColor(Color.parseColor("#FD2D48"));
}
}

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

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.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

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