Compare commits
393 Commits
pdlive_sam
...
gong_dev_g
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1deb197af6 | ||
|
|
3a12d848e1 | ||
|
|
cf245b0df8 | ||
|
|
0ea92c00a2 | ||
|
|
a0f3f246a6 | ||
|
|
a11d7f07e9 | ||
|
|
90bc70ebf7 | ||
|
|
4618c0a4f1 | ||
|
|
15a52aaa62 | ||
|
|
6d6010d023 | ||
|
|
94156e2984 | ||
|
|
769f527565 | ||
|
|
3dcc801331 | ||
|
|
963fe2c110 | ||
|
|
9dd3619049 | ||
|
|
96b80a460b | ||
|
|
a68bee94a9 | ||
|
|
40a2843696 | ||
| 2cefd50ac3 | |||
|
|
833b58d311 | ||
|
|
f14fb4612b | ||
| 3510a565f2 | |||
| e0669e98cf | |||
|
|
8f82c7c785 | ||
|
|
2eea1f1b75 | ||
| f1a1aae787 | |||
|
|
b68c7f1c46 | ||
|
|
dd7eb2326a | ||
| 3f1fe93f3d | |||
|
|
8c9cf4e3a8 | ||
| 0451f518d5 | |||
| a154f480f6 | |||
|
|
29badbf725 | ||
|
|
e89f22329f | ||
|
|
81e08d41af | ||
| d89b356395 | |||
| 4d2985456d | |||
| 48e3ff46ab | |||
|
|
6dd3e02c1d | ||
| d8e9cc2189 | |||
|
|
0310628ba3 | ||
| 2f54fdab12 | |||
|
|
a3228f48c2 | ||
|
|
35c83a255a | ||
|
|
0aeb2d32c2 | ||
|
|
313320473f | ||
|
|
2b86927b5b | ||
|
|
bf3ebfedbd | ||
|
|
1a2db91ceb | ||
|
|
9fa4924278 | ||
|
|
3318fa761c | ||
| a7421ba1a6 | |||
|
|
40a081caa6 | ||
|
|
1485173227 | ||
|
|
d5b60523a5 | ||
|
|
309d04653e | ||
|
|
45ae3b1624 | ||
|
|
e874c2ee16 | ||
|
|
002f0ad654 | ||
|
|
bb49472817 | ||
|
|
05e4ff89d7 | ||
| 020b5c1025 | |||
|
|
2cf10cc35a | ||
|
|
4c53c990e9 | ||
|
|
cd8b58a0ec | ||
| b41bd3b89b | |||
|
|
d66f098692 | ||
|
|
f131fcf546 | ||
|
|
eeb1cc008a | ||
| 6eba9558e1 | |||
|
|
0425b56106 | ||
|
|
c5de062171 | ||
|
|
f82dbccaa5 | ||
| 07d6b959d5 | |||
| 5ae55f87fa | |||
|
|
f59e5e527a | ||
| d70c3a8b27 | |||
|
|
c20147bf8f | ||
|
|
45743e3070 | ||
|
|
b8b43c1ef2 | ||
| 73847c46a3 | |||
|
|
b7c53a3b21 | ||
| c91947ce71 | |||
|
|
62e50ae310 | ||
|
|
5baea0f156 | ||
|
|
419e3a7ab5 | ||
|
|
66822139ba | ||
|
|
5a924d9fea | ||
| cb0772c9e3 | |||
|
|
9c9eb34756 | ||
|
|
1b57d8bc8f | ||
| edc738d80b | |||
| b5417f90b4 | |||
|
|
4bd1e4bc91 | ||
|
|
cb2729433e | ||
|
|
985e626cb5 | ||
|
|
efce2ad93c | ||
|
|
6132338c6c | ||
|
|
8c89fc1de1 | ||
|
|
a061637492 | ||
| 98095e07ee | |||
| 9764b3370e | |||
|
|
bbb5a12899 | ||
|
|
680780145c | ||
|
|
19c270ad22 | ||
|
|
ce9336737f | ||
| 0396e2d06d | |||
|
|
39cf76439f | ||
|
|
11c9a53028 | ||
|
|
c4d378daba | ||
|
|
efa698ebfa | ||
|
|
6496440e5d | ||
|
|
d3de01666c | ||
| 9621d8a6d8 | |||
| 07f97fefdb | |||
| 186b9d61ee | |||
| b7c0f5d3ec | |||
| 949c0ab759 | |||
|
|
278801b77a | ||
| 5f3ebb4235 | |||
| ab24348f72 | |||
| 022806d9da | |||
|
|
b0c5d44d1c | ||
|
|
d9b1149832 | ||
|
|
9711b1f8d4 | ||
|
|
0252963b2e | ||
|
|
ff8e75768e | ||
| c92e8dd8bc | |||
|
|
01dfb81a46 | ||
|
|
0afee3543e | ||
| 8d5990c25b | |||
|
|
d5f78cc83a | ||
|
|
cf48be7d15 | ||
| 225929c891 | |||
| bc63a3e601 | |||
| c33975fe67 | |||
| c033340aad | |||
| 24170d55e2 | |||
|
|
26a71ff825 | ||
| e36fbdc6b8 | |||
|
|
b6d0ea1fba | ||
|
|
cbf517bed6 | ||
|
|
dc0ae1124f | ||
|
|
3167ab0be8 | ||
|
|
0b218157d2 | ||
|
|
6a4ac35203 | ||
|
|
93dbee14b3 | ||
|
|
cb376aa83a | ||
| 92d1861d8f | |||
| 0ff0cb52f6 | |||
|
|
afef088555 | ||
|
|
73414f3349 | ||
|
|
abfd15f751 | ||
| 8d87dda691 | |||
| fcd13751c9 | |||
| e24805cf9b | |||
| 489a99e522 | |||
| 6a51b39134 | |||
| 86bbf6a7f3 | |||
|
|
95ded2f77c | ||
| 599e88acc6 | |||
|
|
d78055cdd9 | ||
| 2093306d36 | |||
|
|
b4adf4c77c | ||
| 8e2acc3417 | |||
| d28d0dd3d7 | |||
|
|
7d46ab8520 | ||
| 150bdba795 | |||
| 651fe12edd | |||
| d0c0f8f82e | |||
| 1f12187766 | |||
|
|
754f2a9294 | ||
|
|
9320d6c209 | ||
| 1c9493d7c8 | |||
| 34e4765e13 | |||
| d4d191fad6 | |||
|
|
8228c45a4d | ||
|
|
4147e3c5f5 | ||
|
|
583740e866 | ||
|
|
0db8eefbe6 | ||
|
|
3f68e2a3aa | ||
|
|
11ba2c45f8 | ||
|
|
320584769d | ||
|
|
5922f4c08b | ||
|
|
b29b0a1688 | ||
|
|
f88356cea2 | ||
|
|
2a67cf7228 | ||
|
|
a100ab1a4a | ||
|
|
69b45f1d21 | ||
|
|
479a743d29 | ||
|
|
382c53ab1f | ||
|
|
1c22f5fd48 | ||
|
|
09bef7afa6 | ||
|
|
88b96267ef | ||
|
|
7c006e8e03 | ||
|
|
f35b547c0d | ||
|
|
490c558e03 | ||
|
|
bbf5d159b4 | ||
|
|
e982994ecd | ||
|
|
a0294a8405 | ||
|
|
756cbb1ce1 | ||
| 9e5427bd35 | |||
|
|
f626ab03d4 | ||
|
|
0d7bdce4f0 | ||
|
|
cd3feebb94 | ||
|
|
3cca1a9e54 | ||
|
|
0b7b959151 | ||
| 1f1ac71bb0 | |||
|
|
ce7b6decc1 | ||
|
|
4a4a52aa61 | ||
|
|
123b9dd74a | ||
|
|
28dba93f17 | ||
|
|
285515345b | ||
|
|
f24744afe8 | ||
|
|
1e466ac13d | ||
|
|
d37b490088 | ||
|
|
a61bc8fbb8 | ||
| 9db23a32d1 | |||
|
|
5f1eadc47b | ||
|
|
de11b5123d | ||
|
|
5b0f5f03ab | ||
|
|
6095d2d04a | ||
|
|
3953e146a5 | ||
|
|
f04a2865af | ||
|
|
f94b3f27e3 | ||
|
|
61a966ea41 | ||
|
|
d0f2ac2c60 | ||
|
|
5dff64ec99 | ||
|
|
cad8236e5c | ||
|
|
faa401245f | ||
|
|
4fc021e866 | ||
|
|
f9a21d0357 | ||
|
|
d72a9a39c6 | ||
|
|
0317b339f8 | ||
|
|
4fabf3aba3 | ||
|
|
4693954a72 | ||
|
|
859810f1f6 | ||
|
|
53f389ddc8 | ||
|
|
ddc9bc344e | ||
|
|
cf34e73d32 | ||
|
|
1981fb553a | ||
|
|
3b6d586b58 | ||
|
|
50b6deaf01 | ||
|
|
bc8d916445 | ||
|
|
6870037683 | ||
|
|
8af7f907eb | ||
| 4d96bcc667 | |||
| f7845dde6f | |||
| ae9ef1f8a1 | |||
|
|
1023c0ab4d | ||
|
|
8184cf6c7f | ||
| df735af252 | |||
|
|
6f71a825b5 | ||
|
|
08e009e5f9 | ||
|
|
1a4a0632ee | ||
|
|
b3a02f8c2c | ||
| aa9bc7326c | |||
| 22769b981d | |||
|
|
85b4facfe8 | ||
| aef0435b93 | |||
| 9cc30186cd | |||
| f99641ed35 | |||
|
|
0552f56eb4 | ||
|
|
7ab4081f0b | ||
|
|
e7ef492015 | ||
| 1aa6cb8f55 | |||
| dc87fc7048 | |||
|
|
04b70d910a | ||
| a4ce44d9ba | |||
| 469e3e30ad | |||
|
|
7e7616ef29 | ||
|
|
dd64568fdf | ||
| 50fb801cf7 | |||
| e0200a9c7f | |||
| 5a32047c6d | |||
|
|
45fd56ba66 | ||
|
|
30b2884c46 | ||
| 0c07e8c2be | |||
|
|
508e9f1931 | ||
| 78d870ed89 | |||
|
|
c00afb1db0 | ||
|
|
dfca615735 | ||
|
|
a920b61bc4 | ||
|
|
3effb630c5 | ||
| 0e596e9be9 | |||
|
|
0a70cc027f | ||
| 47077a465a | |||
|
|
aa62dda844 | ||
|
|
004a5b2a53 | ||
|
|
64f9cee3af | ||
| 1eb43fb8cf | |||
|
|
f770370be0 | ||
| e185eb8612 | |||
| 299add0575 | |||
| feb08e1759 | |||
| 16755a9c8c | |||
|
|
d6e6164549 | ||
| 52c561fa08 | |||
| c2979b4cf7 | |||
|
|
0f70f10aed | ||
| 45f471055e | |||
|
|
c49c9c2f81 | ||
|
|
74b19de11c | ||
|
|
00b89aab69 | ||
|
|
6ff6cbbe6b | ||
|
|
ae6fdab7e8 | ||
|
|
3d1c4466e0 | ||
|
|
9963b37b6f | ||
| a8a1aa2e71 | |||
| 2857127285 | |||
|
|
3a1268aac7 | ||
|
|
5b813aff88 | ||
|
|
d9951b5a35 | ||
|
|
f928fce069 | ||
|
|
d365389ff8 | ||
| a4e98f3703 | |||
|
|
b5c8f14994 | ||
|
|
34323fd983 | ||
|
|
1f7c6c8adc | ||
|
|
29c2334ee0 | ||
|
|
2aa50ecfc7 | ||
|
|
58b2d69601 | ||
|
|
e061e61088 | ||
|
|
24788d7e21 | ||
| 54693c0d37 | |||
|
|
27f136d6ca | ||
|
|
92d271ff93 | ||
|
|
0b15df41b8 | ||
|
|
f22f8fcb4b | ||
|
|
7627219e77 | ||
|
|
cf749d85c6 | ||
|
|
ac6eb21e06 | ||
|
|
5ca13b770c | ||
| 7795317c14 | |||
|
|
a036e5eff6 | ||
| c6fb323c68 | |||
|
|
926a1a3cb6 | ||
| d629ee3f9f | |||
| df0d9795ed | |||
| 1759757176 | |||
|
|
661c2fd334 | ||
| b175e42ee1 | |||
| 6cdc648ea9 | |||
|
|
85ccbcccae | ||
| 0a6b210a76 | |||
| 43d1abbae0 | |||
| 4a5e581978 | |||
| 8a7b65955c | |||
|
|
3445ee2a56 | ||
| cf2274195f | |||
|
|
aad607ace8 | ||
| 17506f6cbf | |||
|
|
418073f07e | ||
|
|
319295de57 | ||
|
|
dcf3f5c308 | ||
| 30bdf83724 | |||
| fbb801bf62 | |||
|
|
44601c74b4 | ||
| 2808e41288 | |||
| 05aea2448f | |||
| 34986d6897 | |||
| 924afce81e | |||
| 48dcfd4a04 | |||
|
|
163ab1c80d | ||
| e06f944def | |||
|
|
a5d546d1d1 | ||
| 1304ec6cde | |||
|
|
f46d14ce28 | ||
| e2005582fe | |||
| a56a5849fe | |||
|
|
1495bfee99 | ||
| 19eecd7022 | |||
|
|
d415efde35 | ||
| 61ee585ae9 | |||
|
|
7b103aaf7c | ||
|
|
9eba98f709 | ||
| dea3264577 | |||
|
|
42cfcce1dc | ||
|
|
ac78268a85 | ||
| d001712067 | |||
|
|
dc28a3d81e | ||
| 728dec9d97 | |||
|
|
215a2f8927 | ||
| 58ace7d613 | |||
|
|
3982afb0d3 | ||
|
|
280920d5f0 | ||
|
|
e353638ec1 | ||
|
|
65a3a64d7d | ||
| b10312118b | |||
|
|
419b5d08b4 | ||
|
|
b146f93029 | ||
|
|
ef34a6cf4f | ||
| cdf3c4e411 |
@@ -1,12 +1,12 @@
|
||||
apply plugin: 'com.android.library'
|
||||
apply plugin: 'img-optimizer'
|
||||
apply plugin: 'kotlin-android'
|
||||
apply plugin: 'kotlin-android-extensions'
|
||||
|
||||
apply plugin: 'kotlin-parcelize'
|
||||
apply from: "../package_config.gradle"
|
||||
|
||||
android {
|
||||
compileSdkVersion rootProject.ext.android.compileSdkVersion
|
||||
buildToolsVersion rootProject.ext.android.buildToolsVersion
|
||||
namespace "com.yunbao.faceunity"
|
||||
compileSdk rootProject.ext.android.compileSdkVersion
|
||||
packagingOptions {
|
||||
pickFirst "lib/armeabi/libyuvutils.so"
|
||||
pickFirst "lib/arm64-v8a/libyuvutils.so"
|
||||
@@ -33,7 +33,7 @@ android {
|
||||
versionName rootProject.ext.android.versionName
|
||||
manifestPlaceholders = rootProject.ext.manifestPlaceholders
|
||||
ndk {
|
||||
abiFilters "armeabi-v7a", "arm64-v8a"
|
||||
abiFilters "armeabi-v7a", "arm64-v8a","x86","x86_64"
|
||||
}
|
||||
}
|
||||
aaptOptions {
|
||||
@@ -48,8 +48,8 @@ android {
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
sourceCompatibility JavaVersion.VERSION_18
|
||||
targetCompatibility JavaVersion.VERSION_18
|
||||
}
|
||||
}
|
||||
repositories {
|
||||
@@ -58,15 +58,15 @@ repositories {
|
||||
}
|
||||
}
|
||||
dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
implementation rootProject.ext.dependencies["appcompat-androidx"]
|
||||
implementation rootProject.ext.dependencies["recyclerview-androidx"]
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
||||
api fileTree(dir: 'libs', include: ['*.jar'])
|
||||
api rootProject.ext.dependencies["appcompat-androidx"]
|
||||
api rootProject.ext.dependencies["recyclerview-androidx"]
|
||||
api "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
||||
//common
|
||||
implementation project(path: ':common')
|
||||
api project(path: ':common')
|
||||
|
||||
implementation 'com.faceunity:core:8.3.1'
|
||||
implementation 'com.faceunity:model:8.3.1'
|
||||
api 'com.faceunity:core:8.7.0'
|
||||
api 'com.faceunity:model:8.7.0'
|
||||
//implementation 'com.faceunity:nama:8.3.1' //底层库-标准版
|
||||
|
||||
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
package com.yunbao.faceunity;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.test.platform.app.InstrumentationRegistry;
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* Instrumented test, which will execute on an Android device.
|
||||
*
|
||||
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
|
||||
*/
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
public class ExampleInstrumentedTest {
|
||||
@Test
|
||||
public void useAppContext() {
|
||||
// Context of the app under test.
|
||||
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
|
||||
assertEquals("com.yunbao.faceunity.test", appContext.getPackageName());
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,5 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
package="com.yunbao.faceunity"
|
||||
>
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
<uses-permission android:name="android.permission.CAMERA" />
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.CAMERA" />
|
||||
|
||||
@@ -96,11 +96,17 @@ public class FaceManager implements SensorEventListener {
|
||||
faceUnityView.setIFaceUnityInter(new FaceUnityView.IFaceUnityInter() {
|
||||
@Override
|
||||
public void onPause() {
|
||||
if(onMirrorChanged!=null){
|
||||
onMirrorChanged.onChange(false);
|
||||
}
|
||||
pauseFace = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStart() {
|
||||
if(onMirrorChanged!=null){
|
||||
onMirrorChanged.onChange(true);
|
||||
}
|
||||
pauseFace = false;
|
||||
}
|
||||
});
|
||||
@@ -295,7 +301,18 @@ public class FaceManager implements SensorEventListener {
|
||||
|
||||
}
|
||||
|
||||
OnMirrorChanged onMirrorChanged;
|
||||
|
||||
public void setOnMirrorChanged(OnMirrorChanged onMirrorChanged) {
|
||||
this.onMirrorChanged = onMirrorChanged;
|
||||
}
|
||||
|
||||
public interface FaceStatusChanged {
|
||||
void onFaceChanged(int num);
|
||||
}
|
||||
|
||||
|
||||
public interface OnMirrorChanged{
|
||||
void onChange(boolean falg);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,10 +52,10 @@ public class FURenderer extends IFURenderer {
|
||||
|
||||
|
||||
/* 特效FURenderKit*/
|
||||
private FURenderKit mFURenderKit;
|
||||
public FURenderKit mFURenderKit;
|
||||
|
||||
/* AI道具*/
|
||||
public static String BUNDLE_AI_FACE = "model" + File.separator + "ai_face_processor_lite.bundle";
|
||||
public static String BUNDLE_AI_FACE = "model" + File.separator + "ai_face_processor.bundle";
|
||||
public static String BUNDLE_AI_HUMAN = "model" + File.separator + "ai_human_processor.bundle";
|
||||
|
||||
/* GL 线程 ID */
|
||||
|
||||
@@ -15,7 +15,7 @@ public class FaceUnityConfig {
|
||||
|
||||
/************************** 算法Model ******************************/
|
||||
// 人脸识别
|
||||
public static String BUNDLE_AI_FACE = "model" + File.separator + "ai_face_processor_lite.bundle";
|
||||
public static String BUNDLE_AI_FACE = "model" + File.separator + "ai_face_processor.bundle";
|
||||
// 手势
|
||||
public static String BUNDLE_AI_HAND = "model" + File.separator + "ai_hand_processor.bundle";
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ import com.google.gson.JsonObject;
|
||||
import com.yunbao.faceunity.entity.net.FineStickerEntity;
|
||||
import com.yunbao.faceunity.utils.FaceUnityData;
|
||||
import com.yunbao.faceunity.utils.FileUtils;
|
||||
import com.yunbao.faceunity.utils.ZipUtils;
|
||||
import com.yunbao.common.utils.ZipUtils;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
|
||||
@@ -1,15 +1,17 @@
|
||||
apply plugin: 'com.android.library'
|
||||
apply from: "../package_config.gradle"
|
||||
|
||||
android {
|
||||
compileSdkVersion rootProject.ext.android.compileSdkVersion
|
||||
buildToolsVersion rootProject.ext.android.buildToolsVersion
|
||||
namespace "com.samsung.android.sdk.iap.lib"
|
||||
compileSdk rootProject.ext.android.compileSdkVersion
|
||||
defaultConfig {
|
||||
minSdkVersion minSdkVersion
|
||||
minSdkVersion rootProject.ext.android.minSdkVersion
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
consumerProguardFiles "consumer-rules.pro"
|
||||
versionCode versionCode
|
||||
versionName versionName
|
||||
targetSdkVersion targetSdkVersion
|
||||
versionCode rootProject.ext.android.versionCode
|
||||
versionName rootProject.ext.android.versionName
|
||||
targetSdkVersion rootProject.ext.android.targetSdkVersion
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
@@ -18,7 +20,15 @@ android {
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
|
||||
}
|
||||
}
|
||||
buildFeatures {
|
||||
buildConfig = true
|
||||
}
|
||||
}
|
||||
repositories {
|
||||
flatDir {
|
||||
dirs 'libs', '../libs'
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
|
||||
}
|
||||
BIN
IAP6Helper/libs/samsung-iap-6.1.1.aar
Normal file
BIN
IAP6Helper/libs/samsung-iap-6.1.1.aar
Normal file
Binary file not shown.
@@ -1,6 +1,5 @@
|
||||
<manifest
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.samsung.android.sdk.iap.lib"
|
||||
android:versionCode="601000004"
|
||||
android:versionName="6.1.0">
|
||||
<!-- version code [Major/Minor/Bug fix release/Build number ] : x xx xxx xxx -->
|
||||
|
||||
@@ -14,6 +14,7 @@ import com.samsung.android.iap.IAPConnector;
|
||||
import com.samsung.android.sdk.iap.lib.R;
|
||||
import com.samsung.android.sdk.iap.lib.activity.CheckPackageActivity;
|
||||
import com.samsung.android.sdk.iap.lib.activity.PaymentActivity;
|
||||
import com.samsung.android.sdk.iap.lib.helper.HelperDefine;
|
||||
import com.samsung.android.sdk.iap.lib.helper.task.ConsumePurchasedItemsTask;
|
||||
import com.samsung.android.sdk.iap.lib.helper.task.GetOwnedListTask;
|
||||
import com.samsung.android.sdk.iap.lib.helper.task.GetProductsDetailsTask;
|
||||
@@ -33,7 +34,6 @@ public class IapHelper extends HelperDefine {
|
||||
private static final String TAG = IapHelper.class.getSimpleName();
|
||||
|
||||
/**
|
||||
* When you release a application, this Mode must be set to {@link HelperDefine.OperationMode.OPERATION_MODE_PRODUCTION}
|
||||
* Please double-check this mode before release.
|
||||
*/
|
||||
private int mMode = HelperDefine.OperationMode.OPERATION_MODE_PRODUCTION.getValue();
|
||||
@@ -46,9 +46,9 @@ public class IapHelper extends HelperDefine {
|
||||
|
||||
// AsyncTask for API
|
||||
// ========================================================================
|
||||
private GetProductsDetailsTask mGetProductsDetailsTask = null;
|
||||
private GetOwnedListTask mGetOwnedListTask = null;
|
||||
private ConsumePurchasedItemsTask mConsumePurchasedItemsTask = null;
|
||||
private com.samsung.android.sdk.iap.lib.helper.task.GetProductsDetailsTask mGetProductsDetailsTask = null;
|
||||
private com.samsung.android.sdk.iap.lib.helper.task.GetOwnedListTask mGetOwnedListTask = null;
|
||||
private com.samsung.android.sdk.iap.lib.helper.task.ConsumePurchasedItemsTask mConsumePurchasedItemsTask = null;
|
||||
// ========================================================================
|
||||
|
||||
private ArrayList<BaseService> mServiceQueue = new ArrayList<BaseService>();
|
||||
@@ -267,7 +267,7 @@ public class IapHelper extends HelperDefine {
|
||||
if (mIapConnector == null || mContext == null) {
|
||||
return false;
|
||||
} else {
|
||||
mGetProductsDetailsTask = new GetProductsDetailsTask(_baseService,
|
||||
mGetProductsDetailsTask = new com.samsung.android.sdk.iap.lib.helper.task.GetProductsDetailsTask(_baseService,
|
||||
mIapConnector,
|
||||
mContext,
|
||||
_productIDs,
|
||||
@@ -344,7 +344,7 @@ public class IapHelper extends HelperDefine {
|
||||
if (mIapConnector == null || mContext == null) {
|
||||
return false;
|
||||
} else {
|
||||
mGetOwnedListTask = new GetOwnedListTask(_baseService,
|
||||
mGetOwnedListTask = new com.samsung.android.sdk.iap.lib.helper.task.GetOwnedListTask(_baseService,
|
||||
mIapConnector,
|
||||
mContext,
|
||||
_productType,
|
||||
@@ -417,7 +417,7 @@ public class IapHelper extends HelperDefine {
|
||||
mConsumePurchasedItemsTask.cancel(true);
|
||||
}
|
||||
|
||||
mConsumePurchasedItemsTask = new ConsumePurchasedItemsTask(_baseService,
|
||||
mConsumePurchasedItemsTask = new com.samsung.android.sdk.iap.lib.helper.task.ConsumePurchasedItemsTask(_baseService,
|
||||
mIapConnector,
|
||||
mContext,
|
||||
_purchaseIds,
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
apply plugin: 'com.android.library'
|
||||
apply plugin: 'img-optimizer'
|
||||
apply plugin: 'kotlin-android'
|
||||
apply plugin: 'kotlin-android-extensions'
|
||||
|
||||
apply plugin: 'kotlin-parcelize'
|
||||
apply from: "../package_config.gradle"
|
||||
|
||||
android {
|
||||
namespace "com.pdlive.shayu"
|
||||
compileSdkVersion rootProject.ext.android.compileSdkVersion
|
||||
buildToolsVersion rootProject.ext.android.buildToolsVersion
|
||||
packagingOptions {
|
||||
@@ -33,7 +34,7 @@ android {
|
||||
versionName rootProject.ext.android.versionName
|
||||
manifestPlaceholders = rootProject.ext.manifestPlaceholders
|
||||
ndk {
|
||||
abiFilters "armeabi-v7a", "arm64-v8a"
|
||||
abiFilters "armeabi-v7a", "arm64-v8a","x86","x86_64"
|
||||
}
|
||||
}
|
||||
aaptOptions {
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
package="com.pdlive.shayu">
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<queries>
|
||||
<package android:name="com.pdlive.shayu"/>
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
package com.yunbao.share;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* Example local unit test, which will execute on the development machine (host).
|
||||
*
|
||||
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
|
||||
*/
|
||||
public class ExampleUnitTest {
|
||||
@Test
|
||||
public void addition_isCorrect() {
|
||||
assertEquals(4, 2 + 2);
|
||||
}
|
||||
}
|
||||
165
app/build.gradle
165
app/build.gradle
@@ -3,39 +3,11 @@ apply plugin: 'img-optimizer'
|
||||
apply plugin: 'com.google.gms.google-services'
|
||||
apply plugin: 'com.google.firebase.crashlytics'
|
||||
apply plugin: 'com.alibaba.arouter'
|
||||
apply from: "../package_config.gradle"
|
||||
|
||||
android {
|
||||
dexOptions {
|
||||
jumboMode = true
|
||||
}
|
||||
project.tasks.getByName("tasks").doFirst {
|
||||
|
||||
}
|
||||
/* applicationVariants.all { variant ->
|
||||
variant.mergeAssetsProvider.configure {
|
||||
doLast {
|
||||
delete(fileTree(dir: outputDir, includes: [
|
||||
'model/ai_bgseg_green.bundle',
|
||||
'model/ai_face_processor.bundle',
|
||||
'model/ai_face_processor_lite.bundle',
|
||||
'model/ai_hairseg.bundle',
|
||||
'model/ai_hand_processor.bundle',
|
||||
'model/ai_human_processor.bundle',
|
||||
'model/ai_human_processor_gpu.bundle',
|
||||
'model/ai_human_processor_mb_fast.bundle',
|
||||
'graphics/body_slim.bundle',
|
||||
'graphics/controller_cpp.bundle',
|
||||
'graphics/face_beautification.bundle',
|
||||
'graphics/face_makeup.bundle',
|
||||
'graphics/fuzzytoonfilter.bundle',
|
||||
'graphics/fxaa.bundle',
|
||||
'graphics/tongue.bundle'
|
||||
]))
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
compileSdkVersion rootProject.ext.android.compileSdkVersion
|
||||
buildToolsVersion rootProject.ext.android.buildToolsVersion
|
||||
namespace "myname.pdlive.shayu"
|
||||
compileSdk rootProject.ext.android.compileSdkVersion
|
||||
packagingOptions {
|
||||
pickFirst "lib/armeabi/libyuvutils.so"
|
||||
pickFirst "lib/arm64-v8a/libyuvutils.so"
|
||||
@@ -105,33 +77,54 @@ android {
|
||||
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
sourceCompatibility JavaVersion.VERSION_18
|
||||
targetCompatibility JavaVersion.VERSION_18
|
||||
}
|
||||
buildFeatures {
|
||||
buildConfig = true
|
||||
}
|
||||
|
||||
|
||||
applicationVariants.all { variant ->
|
||||
println "清空build文件夹";
|
||||
for (final def project in rootProject.getAllprojects()) {
|
||||
delete project.buildDir
|
||||
println project.buildDir
|
||||
def name = variant.name.replace('Debug', '').replace('Release', '').toLowerCase()
|
||||
//delete project.buildDir
|
||||
delete project.rootDir.absolutePath+File.separator+"app"+File.separator+name
|
||||
//println project.buildDir
|
||||
}
|
||||
//delete project.rootDir.absolutePath + File.separator + "outputs"
|
||||
String variantName = variant.name.capitalize()
|
||||
def processManifestTask = project.tasks.getByName("process${variantName}Manifest")
|
||||
processManifestTask.doLast { pm ->
|
||||
String manifestPath = "build/intermediates/bundle_manifest/release/bundle-manifest/AndroidManifest.xml"
|
||||
def isGooglePlay = rootProject.ext.manifestPlaceholders.isGooglePlay
|
||||
String manifestPath = "build/intermediates/bundle_manifest/google_onlineRelease/bundle-manifest/AndroidManifest.xml"
|
||||
def isGooglePlay = variant.name.contains("google")
|
||||
println "谷歌版本:" + isGooglePlay
|
||||
println "文件存在" + file(manifestPath).exists()
|
||||
println "" + (isGooglePlay != 0)
|
||||
println "" + (file(manifestPath).exists() && isGooglePlay)
|
||||
if (file(manifestPath).exists() && isGooglePlay) {
|
||||
def manifestContent = file(manifestPath).getText()
|
||||
|
||||
println "移除权限"
|
||||
manifestContent = manifestContent.replace('<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />', '')
|
||||
manifestContent = manifestContent.replace('android.permission.REQUEST_INSTALL_PACKAGES', '')
|
||||
file(manifestPath).write(manifestContent)
|
||||
} else {
|
||||
print "not Exists = " + manifestPath
|
||||
}
|
||||
manifestPath = "build/intermediates/merged_manifests/google_onlineRelease/processReleaseManifest/AndroidManifest.xml"
|
||||
if (file(manifestPath).exists() && isGooglePlay) {
|
||||
def manifestContent = file(manifestPath).getText()
|
||||
println "移除权限2"
|
||||
manifestContent = manifestContent.replace('<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />', '')
|
||||
manifestContent = manifestContent.replace('android.permission.REQUEST_INSTALL_PACKAGES', '')
|
||||
file(manifestPath).write(manifestContent)
|
||||
}
|
||||
}
|
||||
variant.mergeAssetsProvider.configure {
|
||||
doLast {
|
||||
delete(fileTree(dir: outputDir, includes: ['model/ai_bgseg_green.bundle',
|
||||
'model/ai_face_processor.bundle',
|
||||
//'model/ai_face_processor.bundle',
|
||||
//'model/ai_face_processor_lite.bundle',
|
||||
'model/ai_hairseg.bundle',
|
||||
'model/ai_hand_processor.bundle',
|
||||
@@ -158,33 +151,64 @@ android {
|
||||
]))
|
||||
println "isPluginModel = " + rootProject.ext.manifestPlaceholders.isPluginModel
|
||||
if (rootProject.ext.manifestPlaceholders.isPluginModel) {
|
||||
delete(fileTree(dir: outputDir, includes: ['model/ai_face_processor_lite.bundle',
|
||||
delete(fileTree(dir: outputDir, includes: ['model/ai_face_processor.bundle',
|
||||
'graphics/face_beautification.bundle']))
|
||||
} else {
|
||||
println "不删除bundle"
|
||||
}
|
||||
}
|
||||
}
|
||||
variant.outputs.all {
|
||||
def isGoogle = "link"
|
||||
if (rootProject.ext.manifestPlaceholders.isGooglePlay == 1) {
|
||||
isGoogle = "Google"
|
||||
} else if (rootProject.ext.manifestPlaceholders.isGooglePlay == 2) {
|
||||
isGoogle = "Huawei"
|
||||
}else if (rootProject.ext.manifestPlaceholders.isGooglePlay == 3) {
|
||||
isGoogle = "Samsung"
|
||||
variant.assemble.doLast { vt ->
|
||||
def channel = ''
|
||||
def server = ''
|
||||
if (variant.name.contains('huawei')) {
|
||||
channel = "华为"
|
||||
} else if (variant.name.contains('samsung')) {
|
||||
channel = "三星"
|
||||
} else if (variant.name.contains('google')) {
|
||||
channel = "谷歌"
|
||||
} else {
|
||||
channel = "链接"
|
||||
}
|
||||
def isPlugin = "all"
|
||||
if (rootProject.ext.manifestPlaceholders.isPluginModel) {
|
||||
isPlugin = "plugin"
|
||||
if (variant.name.contains('online')) {
|
||||
server = '正式服'
|
||||
} else {
|
||||
server = '测试服'
|
||||
}
|
||||
def isTest = "测试服"
|
||||
if (rootProject.ext.manifestPlaceholders.serverHost == "https://napi.yaoulive.com") {
|
||||
isTest = "正式服"
|
||||
def fileName = "[${new Date().format("yyyy-MM-dd HHmmss", TimeZone.getTimeZone("GMT+8"))}]PDLive-${defaultConfig.versionName}-${defaultConfig.versionCode}-${channel}-${server}-${variant.buildType.name}.apk"
|
||||
variant.outputs.forEach { fe ->
|
||||
copy {
|
||||
from fe.outputFile
|
||||
into file("${project.rootDir}\\outputs\\apk\\")
|
||||
rename { fn ->
|
||||
fileName
|
||||
}
|
||||
}
|
||||
}
|
||||
outputFileName = "[${new Date().format("yyyy-MM-dd HHmmss", TimeZone.getTimeZone("GMT+8"))}]PDLive-${defaultConfig.versionName}-${isGoogle}-${isPlugin}-${variant.buildType.name}-${isTest}.apk"
|
||||
|
||||
}
|
||||
tasks.named("sign${variant.name.capitalize()}Bundle", com.android.build.gradle.internal.tasks.FinalizeBundleTask) {
|
||||
File file = finalBundleFile.asFile.get()
|
||||
def channel = ''
|
||||
def server = ''
|
||||
if (variant.name.startsWith('huawei')) {
|
||||
channel = "华为"
|
||||
} else if (variant.name.startsWith('samsung')) {
|
||||
channel = "三星"
|
||||
} else if (variant.name.startsWith('google')) {
|
||||
channel = "谷歌"
|
||||
} else {
|
||||
channel = "链接"
|
||||
}
|
||||
if (variant.name.contains('online')) {
|
||||
server = '正式服'
|
||||
} else {
|
||||
server = '测试服'
|
||||
}
|
||||
def fileName = "[${new Date().format("yyyy-MM-dd HHmmss", TimeZone.getTimeZone("GMT+8"))}]PDLive-${defaultConfig.versionName}-${defaultConfig.versionCode}-${channel}-${server}-${variant.buildType.name}.aab"
|
||||
File finalFile = new File("${project.rootDir}\\outputs\\aab", fileName)
|
||||
finalBundleFile.set(finalFile)
|
||||
}
|
||||
}
|
||||
signingConfigs {
|
||||
release {
|
||||
@@ -224,8 +248,17 @@ android {
|
||||
manifestPlaceholders = rootProject.ext.manifestPlaceholders
|
||||
multiDexEnabled true
|
||||
ndk {
|
||||
// TODO: 谷歌商城需要兼容两个平台
|
||||
abiFilters "armeabi-v7a", "arm64-v8a"
|
||||
Gradle gradle = getGradle()
|
||||
String tskReqStr = gradle.getStartParameter().getTaskRequests().args.toString()
|
||||
println("处理ndk 版本 = " + tskReqStr)
|
||||
def isLink = tskReqStr.contains("Link")
|
||||
if (isLink) {
|
||||
abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86_64"
|
||||
println("打包ndk 链接")
|
||||
} else {
|
||||
abiFilters "armeabi-v7a", "arm64-v8a"
|
||||
println("打包ndk其他")
|
||||
}
|
||||
}
|
||||
javaCompileOptions {
|
||||
annotationProcessorOptions {
|
||||
@@ -280,18 +313,4 @@ dependencies {
|
||||
//debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.10'
|
||||
|
||||
|
||||
}
|
||||
// 链接包需要注释掉 否正无法更新 谷歌包需要打开
|
||||
/*
|
||||
project.afterEvaluate {
|
||||
android.applicationVariants.all { variant ->
|
||||
variant.outputs.each { output ->
|
||||
output.processResources.doFirst { pm->
|
||||
String manifestPath = output.processResources.manifestFile;
|
||||
def manifestContent = file(manifestPath).getText()
|
||||
manifestContent = manifestContent.replace('android.permission.REQUEST_INSTALL_PACKAGES', '')
|
||||
file(manifestPath).write(manifestContent)
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
25
app/proguard-rules.pro
vendored
25
app/proguard-rules.pro
vendored
@@ -190,13 +190,18 @@ rx.internal.util.atomic.LinkedQueueNode* consumerNode;
|
||||
-keep class org.greenrobot.eventbus.android.AndroidComponentsImpl*
|
||||
|
||||
#--------ARouter
|
||||
|
||||
-keep public class com.alibaba.android.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:
|
||||
# 如果使用了 byType 的方式获取 Service,需添加下面规则,保护接口
|
||||
-keep interface * implements com.alibaba.android.arouter.facade.template.IProvider
|
||||
|
||||
# 如果使用了 单类注入,即不定义接口实现 IProvider,需添加下面规则,保护实现
|
||||
-keep class * 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
|
||||
|
||||
@@ -275,6 +280,18 @@ rx.internal.util.atomic.LinkedQueueNode* consumerNode;
|
||||
-keep class tech.sud.mgp.hello.ui.main.settings.model.** {*;}
|
||||
-keep class tech.sud.mgp.hello.ui.main.nft.model.** {*;}
|
||||
-keep class tech.sud.mgp.hello.common.event.model.** {*;}
|
||||
-keep class tech.sud.mgp.**{*;}
|
||||
|
||||
-keep class bitter.jnibridge.** { *; }
|
||||
-keep class com.google.androidgamesdk.** { *; }
|
||||
-keep class com.unity3d.** { *; }
|
||||
-keep class do.do.do.** { *; }
|
||||
-keep class do.if.do.** { *; }
|
||||
-keep class for.do.** { *; }
|
||||
-keep class if.do.do.do.** { *; }
|
||||
-keep class org.fmod.** { *; }
|
||||
-keep class tech.sud.** { *; }
|
||||
-keep class tech.unity3d.** { *; }
|
||||
|
||||
-keep class com.yunbao.common.sud.** {*;}
|
||||
|
||||
@@ -292,3 +309,9 @@ rx.internal.util.atomic.LinkedQueueNode* consumerNode;
|
||||
|
||||
-keep class com.shayu.lib_google.**{*;}
|
||||
-keep class com.shayu.lib_huawei.**{*;}
|
||||
|
||||
-keep class io.agora.**{*;}
|
||||
|
||||
-keep class com.qiniu.**{*;}
|
||||
-keep class com.qiniu.**{public <init>();}
|
||||
-ignorewarnings
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
package="myname.pdlive.shayu">
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<uses-permission
|
||||
android:name="android.permission.CALL_PHONE"
|
||||
@@ -89,6 +88,11 @@
|
||||
<!-- <uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />-->
|
||||
<!-- <uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />-->
|
||||
<uses-permission android:name="android.permission.ACCESS_NOTIFICATION_POLICY" />
|
||||
|
||||
<!-- 声网新增 -->
|
||||
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
|
||||
<uses-permission android:name="android.permission.BLUETOOTH_SCAN"/>
|
||||
|
||||
<queries>
|
||||
<package android:name="com.twitter.android" />
|
||||
<package android:name="jp.naver.line.android" />
|
||||
@@ -157,6 +161,12 @@
|
||||
<meta-data
|
||||
android:name="firebase_crashlytics_collection_enabled"
|
||||
android:value="${isUploadLog}" />
|
||||
<meta-data
|
||||
android:name="BUILD_TIME"
|
||||
android:value="${buildTime}" />
|
||||
<meta-data
|
||||
android:name="SW_RELEASE_MODEL"
|
||||
android:value="${swReleaseModel}" />
|
||||
<meta-data
|
||||
android:name="com.openinstall.APP_KEY"
|
||||
android:value="smvslm" />
|
||||
|
||||
@@ -6,6 +6,7 @@ import android.app.Activity;
|
||||
import android.app.ActivityManager;
|
||||
import android.content.Context;
|
||||
import android.net.http.HttpResponseCache;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
@@ -23,33 +24,38 @@ import com.alibaba.fastjson.JSONObject;
|
||||
import com.blankj.utilcode.util.Utils;
|
||||
import com.facebook.appevents.AppEventsLogger;
|
||||
import com.fm.openinstall.OpenInstall;
|
||||
import com.shayu.phonelive.utils.LogUtils;
|
||||
import com.google.gson.Gson;
|
||||
import com.yunbao.common.utils.LogUtils;
|
||||
import com.tencent.imsdk.v2.V2TIMGroupMemberInfo;
|
||||
import com.tencent.imsdk.v2.V2TIMManager;
|
||||
import com.tencent.imsdk.v2.V2TIMSimpleMsgListener;
|
||||
import com.tencent.imsdk.v2.V2TIMUserInfo;
|
||||
import com.umeng.analytics.MobclickAgent;
|
||||
import com.umeng.commonsdk.UMConfigure;
|
||||
import com.yunbao.common.manager.OpenAdManager;
|
||||
import com.yunbao.common.utils.MobclickAgent;
|
||||
import com.yunbao.common.BuildConfig;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.CommonAppContext;
|
||||
import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.bean.AnchorStartLiveBean;
|
||||
import com.yunbao.common.bean.CrashSaveBean;
|
||||
import com.yunbao.common.event.SudGameSocketImEvent;
|
||||
import com.yunbao.common.manager.imrongcloud.InstructorSendReward;
|
||||
import com.yunbao.common.manager.imrongcloud.InstructorSendRewardProvider;
|
||||
import com.yunbao.common.manager.imrongcloud.MessageIMManager;
|
||||
import com.yunbao.common.manager.imrongcloud.RecommendLiveRoom;
|
||||
import com.yunbao.common.manager.imrongcloud.RongcloudIMManager;
|
||||
import com.yunbao.common.utils.AppManager;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.utils.GoogleUtils;
|
||||
import com.yunbao.common.utils.L;
|
||||
import com.yunbao.common.utils.SpUtil;
|
||||
import com.yunbao.live.socket.SocketReceiveBean;
|
||||
import com.yunbao.live.socket.SocketRyClient;
|
||||
import com.yunbao.live.socket.SocketSwClient;
|
||||
import com.yunbao.live.utils.LiveImDeletUtil;
|
||||
import com.yunbao.live.views.PortraitLiveManager;
|
||||
import com.yunbao.live.views.RecommendLiveRoomProvider;
|
||||
import com.yunbao.main.activity.LoginActivity;
|
||||
import com.yunbao.main.activity.MsgSettActivity;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
@@ -58,6 +64,8 @@ import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import io.rong.imkit.config.RongConfigCenter;
|
||||
@@ -103,27 +111,31 @@ public class AppContext extends CommonAppContext {
|
||||
|
||||
@Override
|
||||
public void onActivityDestroyed(@NonNull Activity activity) {
|
||||
AppManager.getInstance().removeActivity(activity);
|
||||
for (WeakReference<Activity> reference : activities) {
|
||||
if (reference.get() == activity) {
|
||||
activities.remove(reference);
|
||||
return;
|
||||
}
|
||||
}
|
||||
AppManager.getInstance().removeActivity(activity);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivityCreated(@NonNull Activity activity, @Nullable Bundle savedInstanceState) {
|
||||
activities.add(new WeakReference<>(activity));
|
||||
if (activity instanceof LoginActivity) {
|
||||
AppManager.getInstance().clear();
|
||||
}
|
||||
CrashSaveBean.getInstance().setActivitySize(activities);
|
||||
AppManager.getInstance().addActivity(activity);
|
||||
OpenAdManager.getInstance().dismiss();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivityStarted(@NonNull Activity activity) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -137,6 +149,7 @@ public class AppContext extends CommonAppContext {
|
||||
registerError();
|
||||
registerFirebaseCrash();
|
||||
LogUtils.start(this);
|
||||
//DebugDialog.getInstance().setParams("初始化","启动");
|
||||
sInstance = this;
|
||||
L.setDeBug(BuildConfig.DEBUG);
|
||||
AppEventsLogger.activateApp(this);
|
||||
@@ -159,20 +172,20 @@ public class AppContext extends CommonAppContext {
|
||||
OpenInstall.init(this);
|
||||
}
|
||||
//设置LOG开关,默认为false
|
||||
UMConfigure.setLogEnabled(true);
|
||||
//UMConfigure.setLogEnabled(true);
|
||||
|
||||
|
||||
//友盟正式初始化
|
||||
UMConfigure.init(getApplicationContext(), "64e40ee55488fe7b3afa2c96", "PDLive", UMConfigure.DEVICE_TYPE_PHONE, "64e40ee55488fe7b3afa2c96");
|
||||
//UMConfigure.init(getApplicationContext(), "64e40ee55488fe7b3afa2c96", "PDLive", UMConfigure.DEVICE_TYPE_PHONE, "64e40ee55488fe7b3afa2c96");
|
||||
|
||||
//集成umeng-crash-vx.x.x.aar,则需要关闭原有统计SDK异常捕获功能
|
||||
MobclickAgent.setCatchUncaughtExceptions(false);
|
||||
//PushSDK初始化(如使用推送SDK,必须调用此方法)
|
||||
|
||||
//统计SDK是否支持采集在子进程中打点的自定义事件,默认不支持
|
||||
UMConfigure.setProcessEvent(true);//支持多进程打点
|
||||
MobclickAgent.setPageCollectionMode(MobclickAgent.PageMode.AUTO);
|
||||
UMConfigure.submitPolicyGrantResult(getApplicationContext(), true);
|
||||
//UMConfigure.setProcessEvent(true);//支持多进程打点
|
||||
//MobclickAgent.setPageCollectionMode(MobclickAgent.PageMode.AUTO);
|
||||
//UMConfigure.submitPolicyGrantResult(getApplicationContext(), true);
|
||||
|
||||
registerActivityLifecycleCallbacks(new AdjustLifecycleCallbacks());
|
||||
//初始化 AndroidUtilCode
|
||||
@@ -193,7 +206,7 @@ public class AppContext extends CommonAppContext {
|
||||
RongcloudIMManager.addRongcloudIMOnReceiveMessageListener(new RongIMClient.OnReceiveMessageWrapperListener() {
|
||||
@Override
|
||||
public boolean onReceived(io.rong.imlib.model.Message message, int i, boolean b, boolean b1) {
|
||||
Log.e("wewe", message.getConversationType() + "112121");
|
||||
Log.e("wewe", message.getConversationType() + "112121 " + message.getContent());
|
||||
MessageIMManager.get(sInstance).getSystemForRongcloud(message);
|
||||
//融云直播间聊天
|
||||
Message msg = Message.obtain();
|
||||
@@ -204,18 +217,51 @@ public class AppContext extends CommonAppContext {
|
||||
if (content.getContent().contains("_method_")) {
|
||||
msg.obj = content.getContent();
|
||||
//观众页面
|
||||
|
||||
String time = String.valueOf(new Date().getTime());
|
||||
//声网
|
||||
if (SocketSwClient.mSocketHandler != null && (TextUtils.equals("__system__", message.getTargetId()) || ("g" + PortraitLiveManager.liveID).contains(message.getTargetId()))) {
|
||||
SocketSwClient.mSocketHandler.sendMessage(msg);
|
||||
} else if (content.getContent().contains("LivePK_anchorStartLiveNotify")) {//开播通知
|
||||
SocketReceiveBean received = JSON.parseObject(content.getContent(), SocketReceiveBean.class);
|
||||
JSONObject map = received.getMsg().getJSONObject(0);
|
||||
sendStartAnchorLive(map);
|
||||
} else if (message.getTargetId().contains("v")) {
|
||||
/*String contentJson = ((TextMessage) message.getContent()).getContent();
|
||||
Log.e("wewe", contentJson);
|
||||
SudGameSocketImEvent sudGameSocketImEvent = new Gson().fromJson(contentJson, SudGameSocketImEvent.class);
|
||||
if (sudGameSocketImEvent.getMsg().isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
sudGameSocketImEvent.getMsg().get(0).setTime(time);
|
||||
Bus.get().post(sudGameSocketImEvent);*/
|
||||
}
|
||||
//主播页面
|
||||
if (TextUtils.isEmpty(PortraitLiveManager.liveID) && SocketSwClient.mSocketHandler != null) {
|
||||
SocketSwClient.mSocketHandler.sendMessage(msg);
|
||||
}
|
||||
|
||||
//融云
|
||||
if (SocketRyClient.mSocketHandler != null && (TextUtils.equals("__system__", message.getTargetId()) || ("g" + PortraitLiveManager.liveID).contains(message.getTargetId()))) {
|
||||
SocketRyClient.mSocketHandler.sendMessage(msg);
|
||||
} else if (content.getContent().contains("LivePK_anchorStartLiveNotify")) {//开播通知
|
||||
SocketReceiveBean received = JSON.parseObject(content.getContent(), SocketReceiveBean.class);
|
||||
JSONObject map = received.getMsg().getJSONObject(0);
|
||||
sendStartAnchorLive(map);
|
||||
} else if (message.getTargetId().contains("v")) {
|
||||
String contentJson = ((TextMessage) message.getContent()).getContent();
|
||||
Log.e("wewe", contentJson);
|
||||
SudGameSocketImEvent sudGameSocketImEvent = new Gson().fromJson(contentJson, SudGameSocketImEvent.class);
|
||||
if (sudGameSocketImEvent.getMsg().isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
sudGameSocketImEvent.getMsg().get(0).setTime(time);
|
||||
Bus.get().post(sudGameSocketImEvent);
|
||||
}
|
||||
//主播页面
|
||||
if (TextUtils.isEmpty(PortraitLiveManager.liveID) && SocketRyClient.mSocketHandler != null) {
|
||||
SocketRyClient.mSocketHandler.sendMessage(msg);
|
||||
}
|
||||
|
||||
} else if (message.getConversationType() == Conversation.ConversationType.PRIVATE) {//私聊信息
|
||||
EventBus.getDefault().post(message);
|
||||
}
|
||||
@@ -264,9 +310,9 @@ public class AppContext extends CommonAppContext {
|
||||
|
||||
});
|
||||
configSPApp();
|
||||
|
||||
//初始化美颜SDK
|
||||
// FaceManager.initFaceUnity(this);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -342,5 +388,17 @@ public class AppContext extends CommonAppContext {
|
||||
return;
|
||||
}
|
||||
String uid = CommonAppConfig.getInstance().getUid();
|
||||
|
||||
if (CommonAppConfig.IS_GOOGLE_PLAY != 2) {
|
||||
GoogleUtils.newInstance(sInstance).setFirebaseCrashData(
|
||||
uid,
|
||||
SpUtil.getInstance().getStringValue(SpUtil.USER_INFO),
|
||||
String.valueOf(CommonAppConfig.IS_GOOGLE_PLAY),
|
||||
Arrays.toString(Build.SUPPORTED_ABIS),
|
||||
String.valueOf(CrashSaveBean.getInstance().getStartTime()),
|
||||
String.valueOf(CrashSaveBean.getInstance().getEnterRoom()),
|
||||
String.valueOf(CrashSaveBean.getInstance().getSlidingRoom()),
|
||||
String.valueOf(CrashSaveBean.getInstance().getPlaySvga()), CrashSaveBean.getInstance().getActivitySize());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,15 +74,16 @@ import java.util.List;
|
||||
|
||||
import myname.pdlive.shayu.R;
|
||||
|
||||
|
||||
/**
|
||||
* Created by cxf on 2018/9/17.
|
||||
*/
|
||||
@Route(path = RouteUtil.PATH_LAUNCHER)
|
||||
public class LauncherActivity extends AppCompatActivity implements View.OnClickListener {
|
||||
|
||||
private static final String TAG = "LauncherActivity";
|
||||
private static final int WHAT_GET_CONFIG = 0;
|
||||
private static final int WHAT_COUNT_DOWN = 1;
|
||||
private final String TAG = "LauncherActivity";
|
||||
private final int WHAT_GET_CONFIG = 0;
|
||||
private final int WHAT_COUNT_DOWN = 1;
|
||||
protected Context mContext;
|
||||
private Handler mHandler;
|
||||
private ViewGroup mRoot;
|
||||
@@ -113,6 +114,7 @@ public class LauncherActivity extends AppCompatActivity implements View.OnClickL
|
||||
res.updateConfiguration(config, res.getDisplayMetrics());
|
||||
return res;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
getWindow().requestFeature(Window.FEATURE_ACTIVITY_TRANSITIONS);
|
||||
@@ -144,7 +146,11 @@ public class LauncherActivity extends AppCompatActivity implements View.OnClickL
|
||||
}
|
||||
};
|
||||
mHandler.sendEmptyMessageDelayed(WHAT_GET_CONFIG, 1000);
|
||||
LogUtil.uploadErrorLog(AppContext.sInstance);
|
||||
try {
|
||||
LogUtil.uploadErrorLog(AppContext.sInstance);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
SpUtil.getInstance().setBooleanValue("NOTIFICATION", NotificationManagerCompat.from(this).areNotificationsEnabled());
|
||||
}
|
||||
|
||||
@@ -229,7 +235,7 @@ public class LauncherActivity extends AppCompatActivity implements View.OnClickL
|
||||
} else {
|
||||
checkUidAndToken();
|
||||
}
|
||||
}else{
|
||||
} else {
|
||||
ToastUtil.show(getString(R.string.net_error));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ android {
|
||||
versionName rootProject.ext.android.versionName
|
||||
manifestPlaceholders = rootProject.ext.manifestPlaceholders
|
||||
ndk {
|
||||
abiFilters "armeabi-v7a","arm64-v8a"
|
||||
abiFilters "armeabi-v7a","arm64-v8a","x86","x86_64"
|
||||
}
|
||||
}
|
||||
buildTypes {
|
||||
|
||||
@@ -31,7 +31,7 @@ android {
|
||||
versionName rootProject.ext.android.versionName
|
||||
manifestPlaceholders = rootProject.ext.manifestPlaceholders
|
||||
ndk {
|
||||
abiFilters "armeabi-v7a","arm64-v8a"
|
||||
abiFilters "armeabi-v7a","arm64-v8a","x86","x86_64"
|
||||
}
|
||||
}
|
||||
aaptOptions {
|
||||
|
||||
27
build.gradle
27
build.gradle
@@ -1,30 +1,31 @@
|
||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||
apply from: "config.gradle"
|
||||
apply from: "dependencies.gradle"
|
||||
|
||||
apply from: "config.gradle"
|
||||
|
||||
buildscript {
|
||||
ext.kotlin_version = '1.6.20'
|
||||
ext.kotlin_version = '1.8.22'
|
||||
repositories {
|
||||
maven { url "https://mvn.mob.com/android" }
|
||||
maven { url 'https://maven.aliyun.com/repository/public' }
|
||||
maven { url 'https://maven.aliyun.com/repository/google' }
|
||||
maven { url 'https://maven.fabric.io/public' }
|
||||
maven { url 'http://maven.faceunity.com/repository/maven-public/' }//美颜库
|
||||
maven { url 'https://maven.faceunity.com/repository/maven-public/' }//美颜库
|
||||
maven { url 'https://repo1.maven.org/maven2/' }//埋点
|
||||
maven {url 'https://developer.huawei.com/repo/'}
|
||||
maven { url "https://jitpack.io" }
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:4.0.2'
|
||||
classpath 'com.android.tools.build:gradle:8.3.1'
|
||||
//一键压缩png工具
|
||||
classpath 'com.chenenyu:img-optimizer:1.3.0'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.20"
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
classpath 'com.google.gms:google-services:4.3.3'
|
||||
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.2'
|
||||
classpath "com.alibaba:arouter-register:1.0.2"
|
||||
classpath "com.github.jadepeakpoet.ARouter:arouter-register:1.0.3"
|
||||
classpath 'com.huawei.agconnect:agcp:1.5.2.300'
|
||||
}
|
||||
|
||||
@@ -40,16 +41,22 @@ allprojects {
|
||||
maven { url "https://mvn.mob.com/android" }
|
||||
maven { url 'https://maven.aliyun.com/repository/public' }
|
||||
maven { url 'https://maven.aliyun.com/repository/google' }
|
||||
maven { url 'http://developer.huawei.com/repo'}//华为库
|
||||
maven { url 'https://developer.huawei.com/repo'}//华为库
|
||||
maven { url 'https://maven.fabric.io/public' }
|
||||
maven { url 'http://maven.faceunity.com/repository/maven-public/' }//美颜库
|
||||
maven { url 'https://maven.faceunity.com/repository/maven-public/' }//美颜库
|
||||
maven { url "https://jitpack.io" }
|
||||
maven { url 'https://repo1.maven.org/maven2/' }//埋点
|
||||
google() // Google's Maven repository
|
||||
}
|
||||
}
|
||||
|
||||
task clean(type: Delete) {
|
||||
/*task clean(type: Delete) {
|
||||
delete rootProject.buildDir
|
||||
}*/
|
||||
ext {
|
||||
IS_PUBLISH_LOCAL=true
|
||||
LIB_VERSION="1.0.6"
|
||||
AGORA_RTC_SDK= 'io.agora.rtc:agora-special-full:4.2.6.12'
|
||||
// AGORA_RTC_SDK= "${rootProject.rootDir.absolutePath}/sdk"
|
||||
// AGORA_RTC_SDK="io.agora.rtc:full-sdk:4.2.6"
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
apply plugin: 'com.android.library'
|
||||
apply plugin: 'img-optimizer'
|
||||
|
||||
apply plugin: 'kotlin-android'
|
||||
apply from: "../package_config.gradle"
|
||||
|
||||
android {
|
||||
compileSdkVersion rootProject.ext.android.compileSdkVersion
|
||||
buildToolsVersion rootProject.ext.android.buildToolsVersion
|
||||
namespace "com.yunbao.common"
|
||||
compileSdk rootProject.ext.android.compileSdkVersion
|
||||
publishNonDefault true
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion rootProject.ext.android.minSdkVersion
|
||||
@@ -13,7 +15,18 @@ android {
|
||||
versionName rootProject.ext.android.versionName
|
||||
manifestPlaceholders = rootProject.ext.manifestPlaceholders
|
||||
ndk {
|
||||
abiFilters "armeabi-v7a", "arm64-v8a"
|
||||
// abiFilters "armeabi-v7a", "arm64-v8a","x86","x86_64"
|
||||
if (rootProject.ext.manifestPlaceholders.isGooglePlay == 0) {
|
||||
abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86_64"
|
||||
} else {
|
||||
abiFilters "armeabi-v7a", "arm64-v8a"
|
||||
}
|
||||
}
|
||||
|
||||
javaCompileOptions {
|
||||
annotationProcessorOptions {
|
||||
arguments = [AROUTER_MODULE_NAME: project.getName()]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,8 +66,11 @@ android {
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
sourceCompatibility JavaVersion.VERSION_18
|
||||
targetCompatibility JavaVersion.VERSION_18
|
||||
}
|
||||
buildFeatures {
|
||||
buildConfig = true
|
||||
}
|
||||
}
|
||||
repositories {
|
||||
@@ -64,7 +80,9 @@ repositories {
|
||||
}
|
||||
|
||||
|
||||
|
||||
dependencies {
|
||||
annotationProcessor rootProject.ext.dependencies["arouter-compiler"]
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
|
||||
api files('libs/jcc-bate-0.7.3.jar')
|
||||
compileOnly fileTree(dir: '../libs', include: ['*.aar'])
|
||||
@@ -158,14 +176,14 @@ dependencies {
|
||||
//腾讯im
|
||||
api 'com.tencent.imsdk:imsdk-plus:5.4.666'
|
||||
api 'com.google.code.gson:gson:2.8.8'
|
||||
api 'cn.rongcloud.sdk:rtc_lib:5.2.0' // 音视频通话基础能力库
|
||||
api 'cn.rongcloud.sdk:rtc_lib:5.7.0' // 音视频通话基础能力库
|
||||
//此处以集成 5.1.2 版本为例
|
||||
api 'cn.rongcloud.sdk:im_lib:5.2.0.2'
|
||||
api 'cn.rongcloud.sdk:im_lib:5.7.0'
|
||||
|
||||
//此处以集成 5.1.2 版本为例
|
||||
api 'cn.rongcloud.sdk:im_kit:5.2.5.4' // 即时通讯 UI 基础组件
|
||||
api 'cn.rongcloud.sdk:im_kit:5.7.0' // 即时通讯 UI 基础组件
|
||||
//融云小视频模块
|
||||
api 'cn.rongcloud.sdk:sight:5.2.5.4'
|
||||
api 'cn.rongcloud.sdk:sight:5.7.0'
|
||||
api 'com.facebook.android:facebook-android-sdk:15.2.0'
|
||||
implementation 'com.facebook.android:facebook-android-sdk:15.2.0'
|
||||
|
||||
@@ -191,7 +209,7 @@ dependencies {
|
||||
api 'com.github.princekin-f:EasyFloat:2.0.4'
|
||||
api files('libs/Msc.jar')
|
||||
|
||||
api 'com.github.li-xiaojun:XPopup:2.9.1'
|
||||
api 'com.github.li-xiaojun:XPopup:2.10.0'
|
||||
|
||||
api 'com.github.shenbengit:PagerGridLayoutManager:1.1.7'
|
||||
//选择器
|
||||
@@ -200,15 +218,15 @@ dependencies {
|
||||
//自定义圆角图片
|
||||
api 'com.makeramen:roundedimageview:2.3.0'
|
||||
// 友盟统计SDK
|
||||
api 'com.umeng.umsdk:common:9.6.3'// 必选
|
||||
api 'com.umeng.umsdk:asms:1.8.0'// 必选
|
||||
api 'com.umeng.umsdk:uyumao:1.1.2'
|
||||
// api(name: 'umeng-common-9.6.8+000', ext: 'aar')
|
||||
//高级运营分析功能依赖库,使用卸载分析、开启反作弊能力请务必集成,以免影响高级功能使用。common需搭配v9.6.3及以上版本,asms需搭配v1.7.0及以上版本。需更新隐私声明。
|
||||
// 标准版本SudMGP SDK
|
||||
api 'tech.sud.mgp:SudMGP:1.3.3.1158'
|
||||
|
||||
// 多语言语音识别扩展库(可选)
|
||||
api 'tech.sud.mgp:SudASR:1.3.3.1158'
|
||||
//侧滑删除
|
||||
api 'com.yanzhenjie.recyclerview:x:1.3.2'
|
||||
|
||||
//华为支付插件包
|
||||
//api project(':lib_huawei')
|
||||
@@ -217,7 +235,29 @@ dependencies {
|
||||
api project(':lib_google')
|
||||
|
||||
//samsung插件包
|
||||
api project(':IAP6Helper')
|
||||
//api project(':IAP6Helper')
|
||||
|
||||
//時間選擇器
|
||||
api 'com.contrarywind:Android-PickerView:4.1.9'
|
||||
|
||||
//瀑布流
|
||||
api 'com.wuxiaolong.pullloadmorerecyclerview:library:1.1.2'
|
||||
//时间选择器
|
||||
api 'com.contrarywind:Android-PickerView:4.1.9'
|
||||
//UI框架
|
||||
api 'com.github.xuexiangjys:XUI:1.1.6'
|
||||
api 'com.github.xuexiangjys.XUtil:xutil-core:2.0.0'
|
||||
|
||||
//ExoPlayer,腾讯的播放器不支持无缝切换
|
||||
api 'com.google.android.exoplayer:exoplayer:2.18.2'
|
||||
api 'com.google.android.exoplayer:exoplayer-core:2.18.2@aar'
|
||||
//文字渐变色
|
||||
api 'com.github.FlyJingFish:GradientTextView:1.2.4'
|
||||
//轮播 一屏显示多个
|
||||
api 'com.github.xiaohaibin:XBanner:androidx_v1.2.6'
|
||||
//声网SDK
|
||||
//api 'io.agora.rtc:agora-special-full:4.2.6.245'
|
||||
api 'com.xj.marqueeView:marqueeView:0.1.20'
|
||||
|
||||
api rootProject.ext.dependencies["blank-utilcode"]
|
||||
}
|
||||
|
||||
BIN
common/libs/samsung-iap-6.1.1.aar
Normal file
BIN
common/libs/samsung-iap-6.1.1.aar
Normal file
Binary file not shown.
3
common/proguard-rules.pro
vendored
3
common/proguard-rules.pro
vendored
@@ -23,3 +23,6 @@
|
||||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
||||
-keep class com.qiniu.**{*;}
|
||||
-keep class com.qiniu.**{public <init>();}
|
||||
-ignorewarnings
|
||||
@@ -1,5 +1,4 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.yunbao.common">
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<!-- <uses-permission android:name="android.permission.READ_PHONE_STATE" />-->
|
||||
<!-- <uses-permission android:name="android.permission.INTERNET" />-->
|
||||
@@ -56,9 +55,7 @@
|
||||
<activity
|
||||
android:name="com.yunbao.common.activity.SelectImageActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name="com.yunbao.common.activity.SudGameActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
|
||||
|
||||
<activity
|
||||
android:name="com.yunbao.common.activity.PreviewImageActivity"
|
||||
|
||||
BIN
common/src/main/assets/chat_message_bg.png
Normal file
BIN
common/src/main/assets/chat_message_bg.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 712 B |
@@ -12,7 +12,6 @@ import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.yunbao.common.bean.ConfigBean;
|
||||
import com.yunbao.common.bean.FansMedalBean;
|
||||
import com.yunbao.common.bean.LevelBean;
|
||||
import com.yunbao.common.bean.UserBean;
|
||||
import com.yunbao.common.bean.UserItemBean;
|
||||
import com.yunbao.common.http.CommonHttpUtil;
|
||||
@@ -29,7 +28,6 @@ import java.util.Map;
|
||||
/**
|
||||
* Created by cxf on 2017/8/4.
|
||||
*/
|
||||
|
||||
public class CommonAppConfig {
|
||||
//域名
|
||||
public static final String HOST = getMetaDataString("SERVER_HOST");
|
||||
@@ -39,6 +37,8 @@ public class CommonAppConfig {
|
||||
public static final boolean IS_UPLOAD_ERROR_LOG = getMetaDataBoolean("IS_UPLOAD_ERROR_LOG");
|
||||
//是否为插件包模式
|
||||
public static final boolean IS_PLUGIN_MODEL = getMetaDataBoolean("IS_PLUGIN_MODEL");
|
||||
public static final String BUILD_TIME = getMetaDataString("BUILD_TIME");
|
||||
public static final boolean IS_SW_RELEASE = getMetaDataBoolean("SW_RELEASE_MODEL");
|
||||
|
||||
//外部sd卡
|
||||
public static final String DCMI_PATH = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM).getAbsolutePath();
|
||||
@@ -78,7 +78,30 @@ public class CommonAppConfig {
|
||||
public static boolean isGetNewWrap = false;//是否获取到新的包裹礼物
|
||||
public static int alert_time = 1;
|
||||
public static int alert_end_time = 1;
|
||||
public static String SWToken = ""; //声网Token
|
||||
public static final String SWChannelPrefix = "g";
|
||||
//测试服
|
||||
public static final String SWAPPId_debug = "4cf0376582d742ac8a96778b25b1079e";
|
||||
//正式服
|
||||
public static final String SWAPPId = "d4a5879524d74c20a7bdd667b0f2ca21";
|
||||
|
||||
public static String getSwAppId() {
|
||||
if (IS_SW_RELEASE) {
|
||||
return SWAPPId;
|
||||
} else {
|
||||
return SWAPPId_debug;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取通道
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static String getChannelName() {
|
||||
return SWChannelPrefix + getInstance().getUid();
|
||||
}
|
||||
|
||||
private CommonAppConfig() {
|
||||
|
||||
@@ -109,8 +132,6 @@ public class CommonAppConfig {
|
||||
private boolean mLaunched;//App是否启动了
|
||||
private String mJPushAppKey;//极光推送的AppKey
|
||||
private List<UserItemBean> mUserItemList;//个人中心功能列表
|
||||
private SparseArray<LevelBean> mLevelMap;
|
||||
private SparseArray<LevelBean> mAnchorLevelMap;
|
||||
private SparseArray<FansMedalBean> mAnchorFansMedalMap;
|
||||
private String mGiftListJson;
|
||||
private String mWrapListJson;
|
||||
@@ -123,8 +144,7 @@ public class CommonAppConfig {
|
||||
|
||||
public String getUid() {
|
||||
if (TextUtils.isEmpty(mUid)) {
|
||||
String[] uidAndToken = SpUtil.getInstance()
|
||||
.getMultiStringValue(new String[]{SpUtil.UID, SpUtil.TOKEN});
|
||||
String[] uidAndToken = SpUtil.getInstance().getMultiStringValue(new String[]{SpUtil.UID, SpUtil.TOKEN});
|
||||
if (uidAndToken != null) {
|
||||
if (!TextUtils.isEmpty(uidAndToken[0]) && !TextUtils.isEmpty(uidAndToken[1])) {
|
||||
mUid = uidAndToken[0];
|
||||
@@ -315,9 +335,7 @@ public class CommonAppConfig {
|
||||
mUid = null;
|
||||
mToken = null;
|
||||
mLoginIM = false;
|
||||
SpUtil.getInstance().removeValue(
|
||||
SpUtil.UID, SpUtil.TOKEN, SpUtil.USER_INFO, SpUtil.IM_LOGIN
|
||||
);
|
||||
SpUtil.getInstance().removeValue(SpUtil.UID, SpUtil.TOKEN, SpUtil.USER_INFO, SpUtil.IM_LOGIN);
|
||||
}
|
||||
|
||||
|
||||
@@ -353,12 +371,7 @@ public class CommonAppConfig {
|
||||
mProvince = null;
|
||||
mCity = null;
|
||||
mDistrict = null;
|
||||
SpUtil.getInstance().removeValue(
|
||||
SpUtil.LOCATION_LNG,
|
||||
SpUtil.LOCATION_LAT,
|
||||
SpUtil.LOCATION_PROVINCE,
|
||||
SpUtil.LOCATION_CITY,
|
||||
SpUtil.LOCATION_DISTRICT);
|
||||
SpUtil.getInstance().removeValue(SpUtil.LOCATION_LNG, SpUtil.LOCATION_LAT, SpUtil.LOCATION_PROVINCE, SpUtil.LOCATION_CITY, SpUtil.LOCATION_DISTRICT);
|
||||
|
||||
}
|
||||
|
||||
@@ -521,46 +534,6 @@ public class CommonAppConfig {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 保存用户等级信息
|
||||
*/
|
||||
public void setLevel(String levelJson) {
|
||||
if (TextUtils.isEmpty(levelJson)) {
|
||||
return;
|
||||
}
|
||||
List<LevelBean> list = JSON.parseArray(levelJson, LevelBean.class);
|
||||
if (list == null || list.size() == 0) {
|
||||
return;
|
||||
}
|
||||
if (mLevelMap == null) {
|
||||
mLevelMap = new SparseArray<>();
|
||||
}
|
||||
mLevelMap.clear();
|
||||
for (LevelBean bean : list) {
|
||||
mLevelMap.put(bean.getLevel(), bean);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存主播等级信息
|
||||
*/
|
||||
public void setAnchorLevel(String anchorLevelJson) {
|
||||
if (TextUtils.isEmpty(anchorLevelJson)) {
|
||||
return;
|
||||
}
|
||||
List<LevelBean> list = JSON.parseArray(anchorLevelJson, LevelBean.class);
|
||||
if (list == null || list.size() == 0) {
|
||||
return;
|
||||
}
|
||||
if (mAnchorLevelMap == null) {
|
||||
mAnchorLevelMap = new SparseArray<>();
|
||||
}
|
||||
mAnchorLevelMap.clear();
|
||||
for (LevelBean bean : list) {
|
||||
mAnchorLevelMap.put(bean.getLevel(), bean);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存主播粉丝徽章信息
|
||||
*/
|
||||
@@ -599,40 +572,6 @@ public class CommonAppConfig {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取用户等级
|
||||
*/
|
||||
public LevelBean getLevel(int level) {
|
||||
if (mLevelMap == null) {
|
||||
String configString = SpUtil.getInstance().getStringValue(SpUtil.CONFIG);
|
||||
if (!TextUtils.isEmpty(configString)) {
|
||||
JSONObject obj = JSON.parseObject(configString);
|
||||
setLevel(obj.getString("level"));
|
||||
}
|
||||
}
|
||||
if (mLevelMap == null || mLevelMap.size() == 0) {
|
||||
return null;
|
||||
}
|
||||
return mLevelMap.get(level);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取主播等级
|
||||
*/
|
||||
public LevelBean getAnchorLevel(int level) {
|
||||
if (mAnchorLevelMap == null) {
|
||||
String configString = SpUtil.getInstance().getStringValue(SpUtil.CONFIG);
|
||||
if (!TextUtils.isEmpty(configString)) {
|
||||
JSONObject obj = JSON.parseObject(configString);
|
||||
setAnchorLevel(obj.getString("levelanchor"));
|
||||
}
|
||||
}
|
||||
if (mAnchorLevelMap == null || mAnchorLevelMap.size() == 0) {
|
||||
return null;
|
||||
}
|
||||
return mAnchorLevelMap.get(level);
|
||||
}
|
||||
|
||||
public String getGiftListJson() {
|
||||
return mGiftListJson;
|
||||
}
|
||||
|
||||
@@ -202,6 +202,8 @@ public class Constants {
|
||||
public static final String LuckyAngel = "LuckyCheck";//幸运天使
|
||||
public static final String Lucky100Check = "Lucky100Check";//幸运天使
|
||||
|
||||
public static final String PrankSendData = "PrankSendData";//整蛊进度
|
||||
|
||||
public static final int SOCKET_WHAT_CONN = 0;
|
||||
public static final int SOCKET_WHAT_DISCONN = 2;
|
||||
public static final int SOCKET_WHAT_BROADCAST = 1;
|
||||
@@ -263,13 +265,19 @@ public class Constants {
|
||||
|
||||
public static final String LIVE_SDK = "liveSdk";
|
||||
public static final String LIVE_KSY_CONFIG = "liveKsyConfig";
|
||||
|
||||
public static final String LIVE_PK_RANDOM_START="RankingStartRandomPK";
|
||||
public static final int LIVE_SDK_KSY = 0;//金山推流
|
||||
public static final int LIVE_SDK_TX = 1;//腾讯推流
|
||||
public static final int LIVE_SDK_SW = 2;//声网
|
||||
|
||||
public static final String LIVE_SDK_IS_SW = "liveSdkIsSw"; //是否是聲網
|
||||
|
||||
public static final int LINK_MIC_TYPE_NORMAL = 0;//观众与主播连麦
|
||||
public static final int LINK_MIC_TYPE_ANCHOR = 1;//主播与主播连麦
|
||||
|
||||
public static final String SOCKET_LIVE_ANCHOR_PK_DIALOG="GuildCompetitionNotice";//公会赛弹窗
|
||||
|
||||
//视频举报获取位置
|
||||
public static int xIndex = 0;
|
||||
public static int yindex = 0;
|
||||
|
||||
@@ -39,7 +39,7 @@ public class HtmlConfig {
|
||||
public static final String TURNTABLE_URL = CommonAppConfig.HOST + "/Appapi/Turntable/index";
|
||||
|
||||
//在线商城
|
||||
public static final String SHOP = CommonAppConfig.HOST + "/h5/shoppingMall.html";
|
||||
public static final String SHOP = CommonAppConfig.HOST + "/h5/shop/index.html";
|
||||
|
||||
//社区
|
||||
public static final String ENCOURAGE = CommonAppConfig.HOST + "/h5/shequ/index.html#/h5/shequ";
|
||||
|
||||
@@ -6,6 +6,7 @@ import android.content.Intent;
|
||||
import android.content.res.Configuration;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.Rect;
|
||||
import android.graphics.Typeface;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.provider.Settings;
|
||||
@@ -24,7 +25,7 @@ import android.widget.TextView;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import com.umeng.analytics.MobclickAgent;
|
||||
import com.yunbao.common.utils.MobclickAgent;
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.interfaces.LifeCycleListener;
|
||||
@@ -58,7 +59,6 @@ public abstract class AbsActivity extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
create();
|
||||
Intent intent = getIntent();
|
||||
if (intent != null) {
|
||||
isFullWindow = getIntent().getBooleanExtra("isFull", false);
|
||||
@@ -67,6 +67,7 @@ public abstract class AbsActivity extends AppCompatActivity {
|
||||
getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
|
||||
}
|
||||
}
|
||||
create();
|
||||
super.onCreate(savedInstanceState);
|
||||
mTag = this.getClass().getSimpleName();
|
||||
setStatusBar();
|
||||
@@ -91,7 +92,8 @@ public abstract class AbsActivity extends AppCompatActivity {
|
||||
protected void main() {
|
||||
|
||||
}
|
||||
protected void create(){
|
||||
|
||||
protected void create() {
|
||||
|
||||
}
|
||||
|
||||
@@ -106,6 +108,17 @@ public abstract class AbsActivity extends AppCompatActivity {
|
||||
}
|
||||
}
|
||||
|
||||
protected void setTitleBold(boolean bold) {
|
||||
TextView titleView = (TextView) findViewById(R.id.titleView);
|
||||
if (titleView != null) {
|
||||
if (bold) {
|
||||
titleView.setTypeface(Typeface.DEFAULT_BOLD);
|
||||
} else {
|
||||
titleView.setTypeface(Typeface.DEFAULT);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void backClick(View v) {
|
||||
if (v.getId() == R.id.btn_back) {
|
||||
onBackPressed();
|
||||
@@ -120,7 +133,7 @@ public abstract class AbsActivity extends AppCompatActivity {
|
||||
/**
|
||||
* 设置透明状态栏
|
||||
*/
|
||||
private void setStatusBar() {
|
||||
public void setStatusBar() {
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
Window window = getWindow();
|
||||
@@ -180,14 +193,14 @@ public abstract class AbsActivity extends AppCompatActivity {
|
||||
//友盟统计
|
||||
// MobclickAgent.onResume(this);
|
||||
MobclickAgent.onPageStart(this.mTag);
|
||||
Log.e("MobclickAgent","MobclickAgent:_onResume_"+this.mTag);
|
||||
Log.e("MobclickAgent", "MobclickAgent:_onResume_" + this.mTag);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPause() {
|
||||
super.onPause();
|
||||
MobclickAgent.onPageEnd(this.mTag);
|
||||
Log.e("MobclickAgent","MobclickAgent:_onPause_"+this.mTag);
|
||||
Log.e("MobclickAgent", "MobclickAgent:_onPause_" + this.mTag);
|
||||
if (mLifeCycleListeners != null) {
|
||||
for (LifeCycleListener listener : mLifeCycleListeners) {
|
||||
listener.onPause();
|
||||
@@ -382,4 +395,13 @@ public abstract class AbsActivity extends AppCompatActivity {
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isKefu(String url) {
|
||||
if (url.contains("kefu")) {
|
||||
return true;
|
||||
}
|
||||
if (url.contains("https://newkf.yaoulive.com/")) {
|
||||
return true;
|
||||
}
|
||||
return url.startsWith("https://kefu.yaoulive.com");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,214 +0,0 @@
|
||||
package com.yunbao.common.activity;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.view.View;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.lifecycle.Observer;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.lxj.xpopup.XPopup;
|
||||
import com.makeramen.roundedimageview.RoundedImageView;
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.bean.CheckRemainingBalance;
|
||||
import com.yunbao.common.bean.CreateSudRoomModel;
|
||||
import com.yunbao.common.bean.CustomSidebarChildModel;
|
||||
import com.yunbao.common.bean.CustomSidebarInfoModel;
|
||||
import com.yunbao.common.event.CheckRemainingBalanceEvent;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.http.base.HttpCallback;
|
||||
import com.yunbao.common.http.live.LiveNetManager;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.sud.QuickStartGameViewModel;
|
||||
import com.yunbao.common.sud.model.GameConfigModel;
|
||||
import com.yunbao.common.sud.state.SudMGPMGState;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.views.LiveSudGameHistoryPopup;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
public class SudGameActivity extends AbsActivity {
|
||||
private FrameLayout gameContainer;
|
||||
private long mInteractionID;
|
||||
private String mLiveUid;
|
||||
private final QuickStartGameViewModel gameViewModel = new QuickStartGameViewModel(); // 创建ViewModel
|
||||
|
||||
private CreateSudRoomModel mCreateSudRoomModel;
|
||||
private TextView gameTitle, roomName, roomNumber;
|
||||
private RoundedImageView mAvatar;
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.activity_sud_game;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void main() {
|
||||
Bus.getOn(this);
|
||||
super.main();
|
||||
initView();
|
||||
initDate();
|
||||
}
|
||||
private List<CustomSidebarChildModel> customSidebarChildModels = new ArrayList<>();
|
||||
private void initDate() {
|
||||
LiveNetManager.get(mContext)
|
||||
.getCustomSidebarInfo("1", new HttpCallback<List<CustomSidebarInfoModel>>() {
|
||||
@Override
|
||||
public void onSuccess(List<CustomSidebarInfoModel> data) {
|
||||
for (CustomSidebarInfoModel datum : data) {
|
||||
if (datum.getType().equals("6")) {
|
||||
customSidebarChildModels = datum.getChild();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
Bus.getOff(this);
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
private void initView() {
|
||||
String createSudRoomJson = getIntent().getStringExtra("CreateSudRoom");
|
||||
mCreateSudRoomModel = new Gson().fromJson(createSudRoomJson, CreateSudRoomModel.class);
|
||||
mInteractionID = mCreateSudRoomModel.getLongSudGameId();
|
||||
mLiveUid = mCreateSudRoomModel.getSudGameRoomId();
|
||||
|
||||
gameContainer = findViewById(R.id.game_container);
|
||||
gameTitle = findViewById(R.id.game_title);
|
||||
roomName = findViewById(R.id.room_name);
|
||||
roomNumber = findViewById(R.id.room_number);
|
||||
mAvatar = findViewById(R.id.avatar);
|
||||
if (mCreateSudRoomModel != null) {
|
||||
gameTitle.setText(mCreateSudRoomModel.getSudGameName());
|
||||
roomName.setText(mCreateSudRoomModel.getRoomName());
|
||||
roomNumber.setText(mCreateSudRoomModel.getSudGameRoomId());
|
||||
ImgLoader.display(mContext, mCreateSudRoomModel.getAvatar(), mAvatar);
|
||||
}
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.exit), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
gameViewModel.onDestroy();
|
||||
finish();
|
||||
}
|
||||
});
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.sud_history), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
|
||||
new XPopup.Builder(mContext)
|
||||
.enableDrag(false)
|
||||
.asCustom(new LiveSudGameHistoryPopup(mContext, customSidebarChildModels)).show();
|
||||
}
|
||||
});
|
||||
gameViewModel.gameViewLiveData.observe(this, new Observer<View>() {
|
||||
@Override
|
||||
public void onChanged(View view) {
|
||||
if (view == null) { // 在关闭游戏时,把游戏View给移除
|
||||
gameContainer.removeAllViews();
|
||||
} else { // 把游戏View添加到容器内
|
||||
gameContainer.addView(view, FrameLayout.LayoutParams.MATCH_PARENT, FrameLayout.LayoutParams.MATCH_PARENT);
|
||||
}
|
||||
}
|
||||
});
|
||||
// 加载游戏,参数定义可查看BaseGameViewModel.switchGame()方法注释
|
||||
// 游戏配置
|
||||
GameConfigModel gameConfigModel = gameViewModel.getGameConfigModel();
|
||||
gameConfigModel.ui.ping.hide = true; // 配置不隐藏ping值
|
||||
gameConfigModel.ui.level.hide = true; // 配置不隐藏ping值
|
||||
gameConfigModel.ui.lobby_game_setting.hide = true; // 配置不隐藏ping值
|
||||
|
||||
gameConfigModel.ui.lobby_players.custom = true;
|
||||
gameConfigModel.ui.join_btn.custom = true;
|
||||
gameConfigModel.ui.game_settle_again_btn.custom = true;
|
||||
gameConfigModel.ui.start_btn.custom = true;
|
||||
|
||||
// SudMGP平台64bit游戏ID
|
||||
gameViewModel.switchGame((Activity) mContext, mLiveUid, mInteractionID);
|
||||
// gameViewModel.sudFSTAPPDecorator.notifyAPPCommonSelfIn(true, -1, true, 1);
|
||||
// gameViewModel.sudFSTAPPDecorator.notifyAPPCommonSelfCaptain(String.valueOf(IMLoginManager.get(mContext).getUserInfo().getId()));
|
||||
// ViewClicksAntiShake.clicksAntiShake(gameTitle, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
// @Override
|
||||
// public void onViewClicks() {
|
||||
//
|
||||
// }
|
||||
// });
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onCheckRemainingBalanceEvent(CheckRemainingBalanceEvent event) {
|
||||
switch (event.getSudMGPMGState()) {
|
||||
case SudMGPMGState.MG_COMMON_SELF_CLICK_JOIN_BTN:
|
||||
case SudMGPMGState.MG_COMMON_SELF_CLICK_GAME_SETTLE_AGAIN_BTN:
|
||||
LiveNetManager.get(mContext).checkRemainingBalance(mCreateSudRoomModel.getSudGameRoomId(), new HttpCallback<CheckRemainingBalance>() {
|
||||
@Override
|
||||
public void onSuccess(CheckRemainingBalance data) {
|
||||
if (data.getGoldenBeanRemainingBalance() == 1) {
|
||||
gameViewModel.sudFSTAPPDecorator.notifyAPPCommonSelfIn(true, event.getSeatIndex(), true, 1);
|
||||
} else {
|
||||
if (IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) {
|
||||
ToastUtil.show("貨幣数量不足 ");
|
||||
} else {
|
||||
ToastUtil.show("Shortage of money");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
if (IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) {
|
||||
ToastUtil.show("貨幣数量不足 ");
|
||||
} else {
|
||||
ToastUtil.show("Shortage of money");
|
||||
}
|
||||
}
|
||||
});
|
||||
break;
|
||||
case SudMGPMGState.MG_COMMON_GAME_SETTLE:
|
||||
gameViewModel.sudFSTAPPDecorator.notifyAPPCommonSelfIn(false, event.getSeatIndex(), true, 1);
|
||||
break;
|
||||
case SudMGPMGState.MG_COMMON_SELF_CLICK_START_BTN:
|
||||
LiveNetManager.get(mContext).gameStartCheckRemainingBalance(mCreateSudRoomModel.getSudGameId(),
|
||||
mCreateSudRoomModel.getSudGameRoomId(), new
|
||||
HttpCallback<CheckRemainingBalance>() {
|
||||
@Override
|
||||
public void onSuccess(CheckRemainingBalance data) {
|
||||
if (data.getStatus()==1){
|
||||
gameViewModel.sudFSTAPPDecorator.notifyAPPCommonSelfPlaying(true);
|
||||
}else {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
ToastUtil.show(error);
|
||||
}
|
||||
});
|
||||
break;
|
||||
case SudMGPMGState.MG_COMMON_GAME_STATE:
|
||||
LiveNetManager.get(mContext).deductMoney( mCreateSudRoomModel.getSudGameRoomId());
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -5,6 +5,7 @@ import android.content.ClipData;
|
||||
import android.content.ClipboardManager;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Color;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Handler;
|
||||
@@ -12,6 +13,7 @@ import android.provider.MediaStore;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.WindowManager;
|
||||
import android.webkit.ValueCallback;
|
||||
import android.webkit.WebChromeClient;
|
||||
import android.webkit.WebSettings;
|
||||
@@ -29,6 +31,7 @@ import com.lxj.xpopup.XPopup;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.CommonAppContext;
|
||||
import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.HtmlConfig;
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.bean.LiveBean;
|
||||
import com.yunbao.common.event.JavascriptInterfaceEvent;
|
||||
@@ -47,6 +50,7 @@ import com.yunbao.common.utils.L;
|
||||
import com.yunbao.common.utils.LiveRoomCheckLivePresenter;
|
||||
import com.yunbao.common.utils.MicStatusManager;
|
||||
import com.yunbao.common.utils.RouteUtil;
|
||||
import com.yunbao.common.utils.StringUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.common.views.HintCustomPopup;
|
||||
@@ -80,10 +84,27 @@ public class WebViewActivity extends AbsActivity {
|
||||
return R.layout.activity_webview;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void setStatusBar() {
|
||||
getWindow().setStatusBarColor(Color.parseColor("#FFFFFF"));
|
||||
getWindow().addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
|
||||
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR | View.SYSTEM_UI_FLAG_LAYOUT_STABLE);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void main() {
|
||||
String url = getIntent().getStringExtra(Constants.URL);
|
||||
if(StringUtil.isEmpty(url)){
|
||||
url="";
|
||||
}
|
||||
L.e("H5--->" + url);
|
||||
if(isKefu(url)){
|
||||
RouteUtil.forwardCustomerService(url);
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
Bus.getOn(this);
|
||||
LinearLayout rootView = (LinearLayout) findViewById(R.id.rootView);
|
||||
mProgressBar = (ProgressBar) findViewById(R.id.progressbar);
|
||||
@@ -91,7 +112,6 @@ public class WebViewActivity extends AbsActivity {
|
||||
ft_title = (FrameLayout) findViewById(R.id.ft_title);
|
||||
v_spacing = (View) findViewById(R.id.v_spacing);
|
||||
mWebView = findViewById(R.id.webView);
|
||||
|
||||
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
|
||||
params.topMargin = DpUtil.dp2px(1);
|
||||
// mWebView.setLayoutParams(params);
|
||||
@@ -100,6 +120,10 @@ public class WebViewActivity extends AbsActivity {
|
||||
@Override
|
||||
public boolean shouldOverrideUrlLoading(WebView view, String url) {
|
||||
L.e("H5-------->" + url);
|
||||
if(isKefu(url)){
|
||||
RouteUtil.forwardCustomerService(url);
|
||||
return true;
|
||||
}
|
||||
if (url.startsWith(Constants.COPY_PREFIX)) {
|
||||
String content = url.substring(Constants.COPY_PREFIX.length());
|
||||
if (!TextUtils.isEmpty(content)) {
|
||||
@@ -123,11 +147,17 @@ public class WebViewActivity extends AbsActivity {
|
||||
if (url.contains("for")) {
|
||||
mWebView.loadUrl("javascript:goAnchorTab()");
|
||||
}
|
||||
|
||||
|
||||
if(url.startsWith(HtmlConfig.SHOP)){
|
||||
//商店页不做动态变换
|
||||
return;
|
||||
}
|
||||
//真实屏幕高度-(ft_title的高度+导航栏高度)
|
||||
//屏蔽掉是因为在线客服页面 AndroidBug5497Workaround会失效
|
||||
int height = DeviceUtils.getScreenRealHeight(mContext) - DpUtil.dp2px(72) - getCurrentNavigationBarHeight(mContext);
|
||||
if (!navigationGestureEnabled(mContext)) {
|
||||
view.loadUrl("javascript:window.androidObject.setHeight(" + height + ",0,false)");
|
||||
// view.loadUrl("javascript:window.androidObject.setHeight(" + height + ",0,false)");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -181,12 +211,14 @@ public class WebViewActivity extends AbsActivity {
|
||||
mWebView.getSettings().setAllowFileAccess(true);
|
||||
mWebView.getSettings().setUseWideViewPort(true); // 关键点
|
||||
mWebView.getSettings().setAllowFileAccess(true); // 允许访问文件
|
||||
mWebView.setHorizontalScrollBarEnabled(false);
|
||||
mWebView.setVerticalScrollBarEnabled(false);
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
mWebView.getSettings().setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);
|
||||
}
|
||||
mWebView.loadUrl(url);
|
||||
AndroidBug5497Workaround.assistActivity(this);
|
||||
AndroidBug5497Workaround.assistActivity(mWebView);
|
||||
|
||||
if (Constants.myIntoIndex == 2) {
|
||||
ft_title.setVisibility(View.GONE);
|
||||
@@ -200,6 +232,9 @@ public class WebViewActivity extends AbsActivity {
|
||||
ft_title.setVisibility(View.VISIBLE);
|
||||
v_spacing.setVisibility(View.GONE);
|
||||
}
|
||||
if(!StringUtil.isEmpty(url)&&url.startsWith(HtmlConfig.SHOP)){
|
||||
ft_title.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -397,6 +432,8 @@ public class WebViewActivity extends AbsActivity {
|
||||
} else if (TextUtils.equals(event.getMethod(), "androidMethodLookToLive")) {
|
||||
//看直播
|
||||
gotoLive(event.getLiveId());
|
||||
}else if (TextUtils.equals(event.getMethod(), "androidtoCommunityVideo")) {
|
||||
RouteUtil.forwardCommunityActivity();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -409,7 +446,7 @@ public class WebViewActivity extends AbsActivity {
|
||||
LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class);
|
||||
new LiveRoomCheckLivePresenter(mContext, liveBean.getUid(), liveBean.getStream(), new LiveRoomCheckLivePresenter.NewActionListener() {
|
||||
@Override
|
||||
public void onLiveRoomChanged(String liveUid, String stream, int liveType, String liveTypeVal, String liveSdk) {
|
||||
public void onLiveRoomChanged(String liveUid, String stream, int liveType, String liveTypeVal, String liveSdk,boolean isSw) {
|
||||
if (liveBean == null) {
|
||||
return;
|
||||
}
|
||||
@@ -425,7 +462,7 @@ public class WebViewActivity extends AbsActivity {
|
||||
}
|
||||
EventBus.getDefault().post(new LiveRoomChangeEvent(liveBean, liveType, Integer.parseInt(liveTypeVal)));
|
||||
} else {
|
||||
RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveTypeVal), Integer.parseInt(liveSdk));
|
||||
RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveTypeVal), Integer.parseInt(liveSdk),isSw);
|
||||
}
|
||||
finish();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
package com.yunbao.common.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
public abstract class BaseAdapter<T> extends RecyclerView.Adapter<BaseAdapter.BaseViewHolder> {
|
||||
public Context context;
|
||||
public List<T> data;
|
||||
|
||||
public BaseAdapter(Context context, List<T> data) {
|
||||
this.context = context;
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BaseViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
||||
View view = LayoutInflater.from(context).inflate(getItemLayoutId(), parent, false);
|
||||
return new BaseViewHolder(view);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(BaseAdapter.BaseViewHolder holder, int position) {
|
||||
T t = data.get(position);
|
||||
convert(holder, t);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return data == null ? 0 : data.size();
|
||||
}
|
||||
|
||||
public abstract void convert(BaseViewHolder holder, T item);
|
||||
|
||||
public abstract int getItemLayoutId();
|
||||
|
||||
class BaseViewHolder extends RecyclerView.ViewHolder {
|
||||
|
||||
private HashMap<Integer,View> views;
|
||||
|
||||
public BaseViewHolder(View itemView) {
|
||||
super(itemView);
|
||||
views = new HashMap<>();
|
||||
if (onItemClickListener != null){
|
||||
itemView.setOnClickListener(v ->onItemClickListener.onItemClick(getAdapterPosition()) );
|
||||
}
|
||||
}
|
||||
|
||||
public View getView(int id) {
|
||||
View view = views.get(id);
|
||||
if (view == null) {
|
||||
view = itemView.findViewById(id);
|
||||
views.put(id, view);
|
||||
if (onItemClickListener != null){
|
||||
view.setOnClickListener(v -> {
|
||||
onItemClickListener.onItemChildClick(v, getAdapterPosition());
|
||||
});
|
||||
}
|
||||
}
|
||||
return view;
|
||||
}
|
||||
}
|
||||
|
||||
private OnItemClickListener onItemClickListener;
|
||||
|
||||
public void setOnItemClickListener(OnItemClickListener onItemClickListener){
|
||||
this.onItemClickListener = onItemClickListener;
|
||||
}
|
||||
|
||||
public interface OnItemClickListener{
|
||||
default void onItemClick(int position){}
|
||||
|
||||
default void onItemChildClick(View view,int position){}
|
||||
}
|
||||
}
|
||||
@@ -40,12 +40,15 @@ public class CustomDrawerPopupAdapter extends RecyclerView.Adapter {
|
||||
private final int RIGHTS_INTERESTS = 4;
|
||||
private final int RECOMMEND = 5;
|
||||
private String liveId;
|
||||
private boolean mIs_shengwang;
|
||||
|
||||
private List<AnchorRecommendItemModel> list = new ArrayList<>();
|
||||
|
||||
private List<CustomSidebarInfoModel> infoModels = new ArrayList<>();
|
||||
|
||||
public CustomDrawerPopupAdapter(Context mContext) {
|
||||
public CustomDrawerPopupAdapter(Context mContext,boolean mIs_shengwang) {
|
||||
this.mContext = mContext;
|
||||
this.mIs_shengwang = mIs_shengwang;
|
||||
}
|
||||
|
||||
|
||||
@@ -114,6 +117,7 @@ public class CustomDrawerPopupAdapter extends RecyclerView.Adapter {
|
||||
map.put("num", "9");
|
||||
map.put("live_recommend", "sidebar");
|
||||
map.put("refresh", "1");
|
||||
map.put(" is_shengwang", mIs_shengwang?"1":"0");
|
||||
//推荐位
|
||||
MainNetManager.get((Activity) mContext)
|
||||
.anchorRecommend(map, new com.yunbao.common.http.base.HttpCallback<AnchorRecommendModel>() {
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
package com.yunbao.common.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.yunbao.common.utils.StringUtil;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.TreeMap;
|
||||
|
||||
public class DebugDialogAdapter extends RecyclerView.Adapter<DebugDialogAdapter.DebugViewHolder> {
|
||||
HashMap<String, View> paramMap = new HashMap<>();
|
||||
private Context mContext;
|
||||
|
||||
public DebugDialogAdapter(Context mContext) {
|
||||
this.mContext = mContext;
|
||||
}
|
||||
|
||||
public void setParamMap(HashMap<String, View> paramMap) {
|
||||
Log.i("debug弹窗", "setParamMap: 添加值到view " + paramMap.size());
|
||||
this.paramMap = paramMap;
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public DebugViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
Log.i("debug弹窗", "onCreateViewHolder: 创建适配器");
|
||||
return new DebugViewHolder(new LinearLayout(mContext));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull DebugViewHolder holder, int position) {
|
||||
List<String> list = new ArrayList<>(paramMap.keySet());
|
||||
Log.i("debug弹窗", "onBindViewHolder: 添加值到view " + list.size() + "|" + paramMap.size());
|
||||
holder.setData(list.get(position), paramMap.get(list.get(position)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
Log.i("debug弹窗", "getItemCount: " + paramMap.size());
|
||||
return paramMap.size();
|
||||
}
|
||||
|
||||
public class DebugViewHolder extends RecyclerView.ViewHolder {
|
||||
|
||||
public DebugViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
}
|
||||
|
||||
public void setData(String msg, View view) {
|
||||
Log.i("debug弹窗", "setData: 添加值到view " + view + "|" + msg + "|" + ((LinearLayout) itemView).indexOfChild(view));
|
||||
if (view instanceof TextView && StringUtil.isEmpty(((TextView) view).getText().toString())) {
|
||||
((TextView) view).setText(msg);
|
||||
}
|
||||
int indexOfChild = ((LinearLayout) itemView).indexOfChild(view);
|
||||
if (indexOfChild != -1) {
|
||||
if (((LinearLayout) itemView).getChildAt(indexOfChild) instanceof TextView) {
|
||||
((TextView) ((LinearLayout) itemView).getChildAt(indexOfChild)).setText(msg);
|
||||
} else {
|
||||
((LinearLayout) itemView).removeViewAt(indexOfChild);
|
||||
}
|
||||
} else {
|
||||
if (view.getParent() != null) {
|
||||
((ViewGroup) view.getParent()).removeView(view);
|
||||
}
|
||||
((LinearLayout) itemView).addView(view);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
package com.yunbao.common.adapter;
|
||||
|
||||
import android.os.CountDownTimer;
|
||||
import android.util.SparseArray;
|
||||
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.sendMoneyLongListModel;
|
||||
import com.yunbao.common.views.DragonSendMoneyListViewHolder;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class DragonSendMoneyListAdapter extends RecyclerView.Adapter {
|
||||
RecyclerView send_money_list;
|
||||
boolean isAnchor;
|
||||
SparseArray<CountDownTimer> countDownMap;
|
||||
boolean isAttention;
|
||||
|
||||
public DragonSendMoneyListAdapter setAnchor(boolean anchor) {
|
||||
isAnchor = anchor;
|
||||
return this;
|
||||
}
|
||||
|
||||
public DragonSendMoneyListAdapter setAttention(boolean attention) {
|
||||
isAttention = attention;
|
||||
return this;
|
||||
}
|
||||
|
||||
public List<sendMoneyLongListModel> getMoneyLongListModels() {
|
||||
return moneyLongListModels;
|
||||
}
|
||||
|
||||
public DragonSendMoneyListAdapter(RecyclerView send_money_list) {
|
||||
this.send_money_list = send_money_list;
|
||||
countDownMap = new SparseArray<>();
|
||||
}
|
||||
|
||||
List<sendMoneyLongListModel> moneyLongListModels = new ArrayList<>();
|
||||
DragonSendMoneyListViewHolder.DragonSendMoneyListClicksCallBack callBack;
|
||||
|
||||
public void setCallBack(DragonSendMoneyListViewHolder.DragonSendMoneyListClicksCallBack callBack) {
|
||||
this.callBack = callBack;
|
||||
}
|
||||
|
||||
public void setMoneyLongListModels(List<sendMoneyLongListModel> models) {
|
||||
|
||||
moneyLongListModels.clear();
|
||||
moneyLongListModels.addAll(models);
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
|
||||
View goodGiftsView = LayoutInflater.from(parent.getContext()).inflate(R.layout.view_dragon_send_money_list, parent, false);
|
||||
|
||||
return new DragonSendMoneyListViewHolder(goodGiftsView);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
|
||||
DragonSendMoneyListViewHolder sendMoneyListViewHolder = (DragonSendMoneyListViewHolder) holder;
|
||||
// sendMoneyLongListModel model = moneyLongListModels.get(position);
|
||||
// long mPkTimeCount2 = Long.parseLong(model.getCountdown());
|
||||
// long time = mPkTimeCount2 * 1000;
|
||||
// if (sendMoneyListViewHolder.countDownTimer != null) {
|
||||
// sendMoneyListViewHolder.countDownTimer.cancel();
|
||||
// }
|
||||
// if (time > 0) {
|
||||
//
|
||||
// }
|
||||
sendMoneyListViewHolder.setData(moneyLongListModels.get(position), callBack, isAnchor,isAttention);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return moneyLongListModels.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemViewType(int position) {
|
||||
return super.getItemViewType(position);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,112 @@
|
||||
package com.yunbao.common.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.PagerSnapHelper;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.yunbao.common.R;
|
||||
|
||||
|
||||
/**
|
||||
* Created by cxf on 2018/11/28.
|
||||
*/
|
||||
|
||||
public class ImagePreviewAdapter extends RecyclerView.Adapter<ImagePreviewAdapter.Vh> {
|
||||
|
||||
private LayoutInflater mInflater;
|
||||
private ActionListener mActionListener;
|
||||
private int mPageCount;
|
||||
private LinearLayoutManager mLayoutManager;
|
||||
private int mCurPosition;
|
||||
|
||||
public ImagePreviewAdapter(Context context, int pageCount) {
|
||||
mPageCount = pageCount;
|
||||
mInflater = LayoutInflater.from(context);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Vh onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
return new Vh(mInflater.inflate(R.layout.item_preview_img, parent, false));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull Vh vh, int position) {
|
||||
vh.setData(position);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return mPageCount;
|
||||
}
|
||||
|
||||
|
||||
class Vh extends RecyclerView.ViewHolder {
|
||||
|
||||
ImageView mImg;
|
||||
|
||||
public Vh(View itemView) {
|
||||
super(itemView);
|
||||
mImg = (ImageView) itemView;
|
||||
}
|
||||
|
||||
void setData(int position) {
|
||||
if (mActionListener != null) {
|
||||
mActionListener.loadImage(mImg, position);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void setActionListener(ActionListener actionListener) {
|
||||
mActionListener = actionListener;
|
||||
}
|
||||
|
||||
public void setCurPosition(int curPosition) {
|
||||
mCurPosition = curPosition;
|
||||
if (mActionListener != null) {
|
||||
mActionListener.onPageChanged(curPosition);
|
||||
}
|
||||
}
|
||||
|
||||
public int getCurPosition(){
|
||||
return mCurPosition;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAttachedToRecyclerView(RecyclerView recyclerView) {
|
||||
super.onAttachedToRecyclerView(recyclerView);
|
||||
mLayoutManager = (LinearLayoutManager) recyclerView.getLayoutManager();
|
||||
PagerSnapHelper pagerSnapHelper = new PagerSnapHelper();
|
||||
pagerSnapHelper.attachToRecyclerView(recyclerView);
|
||||
recyclerView.setOnScrollListener(new RecyclerView.OnScrollListener() {
|
||||
@Override
|
||||
public void onScrollStateChanged(RecyclerView recyclerView, int newState) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onScrolled(RecyclerView recyclerView, int dx, int dy) {
|
||||
int position = mLayoutManager.findFirstCompletelyVisibleItemPosition();
|
||||
if (position >= 0 && mCurPosition != position) {
|
||||
mCurPosition = position;
|
||||
if (mActionListener != null) {
|
||||
mActionListener.onPageChanged(position);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
public interface ActionListener {
|
||||
void onPageChanged(int position);
|
||||
|
||||
void loadImage(ImageView imageView, int position);
|
||||
}
|
||||
}
|
||||
@@ -13,15 +13,20 @@ import com.yunbao.common.R;
|
||||
import com.yunbao.common.bean.CustomSidebarChildModel;
|
||||
import com.yunbao.common.event.CustomDrawerPopupEvent;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.utils.SpUtil;
|
||||
import com.yunbao.common.views.InteractionGamesChildViewHolder;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 侧边栏游戏列表适配器,改游戏列表数量在这里改
|
||||
*/
|
||||
public class InteractionGamesAdapter extends RecyclerView.Adapter {
|
||||
private Context mContext;
|
||||
private boolean rigts;
|
||||
private List<CustomSidebarChildModel> child = new ArrayList<>();
|
||||
private List<CustomSidebarChildModel> srcChild = new ArrayList<>();
|
||||
|
||||
public InteractionGamesAdapter(Context mContext, boolean rigts) {
|
||||
this.mContext = mContext;
|
||||
@@ -32,7 +37,7 @@ public class InteractionGamesAdapter extends RecyclerView.Adapter {
|
||||
@Override
|
||||
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
View runGamesView = LayoutInflater.from(parent.getContext()).inflate(R.layout.view_live_new_role_fun_games_child_view3, parent, false);
|
||||
return new InteractionGamesChildViewHolder(runGamesView);
|
||||
return new InteractionGamesChildViewHolder(runGamesView,mContext);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -46,7 +51,10 @@ public class InteractionGamesAdapter extends RecyclerView.Adapter {
|
||||
long activityID = TextUtils.isEmpty(model.getSrc()) ? 0 : Long.parseLong(model.getSrc());
|
||||
if (activityID != 0) {
|
||||
Bus.get().post(new CustomDrawerPopupEvent()
|
||||
.setDisMiss(true).setInteractionID(activityID).setInteraction(true).setChild(child));
|
||||
.setDisMiss(true).setInteractionID(activityID).setInteraction(true).setChild(srcChild));
|
||||
if(model.getSudGameIsNew().equals("1")){
|
||||
SpUtil.getInstance().setLiveGameId(model.getId());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -61,6 +69,7 @@ public class InteractionGamesAdapter extends RecyclerView.Adapter {
|
||||
|
||||
public void updateData(List<CustomSidebarChildModel> mChild) {
|
||||
child.clear();
|
||||
srcChild.clear();
|
||||
if (mChild.size() > 8) {
|
||||
for (int i = 0; i < 8; i++) {
|
||||
child.add(mChild.get(i));
|
||||
@@ -68,6 +77,7 @@ public class InteractionGamesAdapter extends RecyclerView.Adapter {
|
||||
} else {
|
||||
child.addAll(mChild);
|
||||
}
|
||||
srcChild.addAll(mChild);
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
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.views.LiveBuyGuardPrivilegeViewHolder;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class LiveBuyGuardPrivilegeAdapter extends RecyclerView.Adapter {
|
||||
List<String> guardPrivilege = new ArrayList<>();
|
||||
|
||||
public void setGuardPrivilege(List<String> privilege) {
|
||||
guardPrivilege.clear();
|
||||
guardPrivilege.addAll(privilege);
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
public LiveBuyGuardPrivilegeAdapter(List<String> guardPrivilege) {
|
||||
this.guardPrivilege = guardPrivilege;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
View herdView = LayoutInflater.from(parent.getContext()).inflate(R.layout.view_live_buy_guard_privilege_item, parent, false);
|
||||
return new LiveBuyGuardPrivilegeViewHolder(herdView);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
|
||||
LiveBuyGuardPrivilegeViewHolder buyGuardSelectViewHolder = (LiveBuyGuardPrivilegeViewHolder) holder;
|
||||
buyGuardSelectViewHolder.setData(guardPrivilege.get(position));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return guardPrivilege.size();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
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.GuardPriceModel;
|
||||
import com.yunbao.common.views.LiveBuyGuardSelectViewHolder;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class LiveBuyGuardSelectAdapter extends RecyclerView.Adapter {
|
||||
List<GuardPriceModel> price = new ArrayList<>();
|
||||
GuardPriceModel model;
|
||||
|
||||
public LiveBuyGuardSelectAdapter(List<GuardPriceModel> price, GuardPriceModel mModel) {
|
||||
this.price = price;
|
||||
model = mModel;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
View herdView = LayoutInflater.from(parent.getContext()).inflate(R.layout.view_live_buy_guard_slelect_item, parent, false);
|
||||
return new LiveBuyGuardSelectViewHolder(herdView);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
|
||||
LiveBuyGuardSelectViewHolder buyGuardSelectViewHolder = (LiveBuyGuardSelectViewHolder) holder;
|
||||
buyGuardSelectViewHolder.setData(price.get(position), liveBuyGuardSelectClickListener,model);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return price.size();
|
||||
}
|
||||
|
||||
private LiveBuyGuardSelectViewHolder.LiveBuyGuardSelectClickListener liveBuyGuardSelectClickListener;
|
||||
|
||||
public LiveBuyGuardSelectAdapter setLiveBuyGuardSelectClickListener(LiveBuyGuardSelectViewHolder.LiveBuyGuardSelectClickListener liveBuyGuardSelectClickListener) {
|
||||
this.liveBuyGuardSelectClickListener = liveBuyGuardSelectClickListener;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -31,11 +31,16 @@ public class LiveNewRoleFunGamesAdapter extends RecyclerView.Adapter {
|
||||
@Override
|
||||
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
View runGamesView = LayoutInflater.from(parent.getContext()).inflate(R.layout.view_live_new_role_fun_games_child_view, parent, false);
|
||||
return new NewRoleFunGamesChildViewHolder(runGamesView,showRed);
|
||||
return new NewRoleFunGamesChildViewHolder(runGamesView,showRed,mContext);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
|
||||
ViewGroup.LayoutParams layoutParams = new ViewGroup.LayoutParams((int)
|
||||
(mContext.getResources().getDisplayMetrics().widthPixels / 4.5),
|
||||
ViewGroup.LayoutParams.WRAP_CONTENT);
|
||||
holder.itemView.setLayoutParams(layoutParams);
|
||||
|
||||
NewRoleFunGamesChildViewHolder childViewHolder = (NewRoleFunGamesChildViewHolder) holder;
|
||||
childViewHolder.setData(child.get(position), rigts);
|
||||
}
|
||||
|
||||
@@ -11,11 +11,11 @@ import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.bean.CustomSidebarChildModel;
|
||||
import com.yunbao.common.event.CustomDrawerPopupEvent;
|
||||
import com.yunbao.common.event.LiveNewRoleEvent;
|
||||
import com.yunbao.common.event.NewRoleCustomDrawerPopupEvent;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.views.InteractionGamesChildViewHolder;
|
||||
import com.yunbao.common.utils.SpUtil;
|
||||
import com.yunbao.common.views.InteractionGamesChildBottomViewHolder;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -34,14 +34,14 @@ public class LiveNewRoleInteractionGamesAdapter extends RecyclerView.Adapter {
|
||||
@Override
|
||||
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
View runGamesView = LayoutInflater.from(parent.getContext()).inflate(R.layout.view_live_new_role_fun_games_child_view3, parent, false);
|
||||
return new InteractionGamesChildViewHolder(runGamesView);
|
||||
return new InteractionGamesChildBottomViewHolder(runGamesView,mContext);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
|
||||
InteractionGamesChildViewHolder childViewHolder = (InteractionGamesChildViewHolder) holder;
|
||||
InteractionGamesChildBottomViewHolder childViewHolder = (InteractionGamesChildBottomViewHolder) holder;
|
||||
childViewHolder.setData(child.get(position), rigts);
|
||||
childViewHolder.setItemViewClicks(new InteractionGamesChildViewHolder.InteractionGamesCallBack() {
|
||||
childViewHolder.setItemViewClicks(new InteractionGamesChildBottomViewHolder.InteractionGamesCallBack() {
|
||||
@Override
|
||||
public void onItemViewClicks(CustomSidebarChildModel model, boolean rigts) {
|
||||
|
||||
@@ -52,6 +52,9 @@ public class LiveNewRoleInteractionGamesAdapter extends RecyclerView.Adapter {
|
||||
.setInteractionID(activityID)
|
||||
.setChild(child)
|
||||
.setInteraction(true));
|
||||
if(model.getSudGameIsNew().equals("1")){
|
||||
SpUtil.getInstance().setLiveGameId(model.getId());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -60,20 +63,23 @@ public class LiveNewRoleInteractionGamesAdapter extends RecyclerView.Adapter {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return child.size();
|
||||
}
|
||||
|
||||
public void updateData(List<CustomSidebarChildModel> mChild) {
|
||||
|
||||
child.clear();
|
||||
if (mChild.size() > 8) {
|
||||
/* if (mChild.size() > 8) {
|
||||
for (int i = 0; i < 8; i++) {
|
||||
child.add(mChild.get(i));
|
||||
}
|
||||
} else {
|
||||
child.addAll(mChild);
|
||||
}
|
||||
}*/
|
||||
child.addAll(mChild);
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
|
||||
@@ -39,13 +39,14 @@ public class LiveNewRolerPopupAdapter extends RecyclerView.Adapter {
|
||||
switch (viewType) {
|
||||
case FUN_GAMES:
|
||||
View runGamesView = LayoutInflater.from(parent.getContext()).inflate(R.layout.view_new_roler_fun_games_view, parent, false);
|
||||
return new LiveNewRoleFunGamesViewHolder(runGamesView);
|
||||
return new LiveNewRoleFunGamesViewHolder(runGamesView,mContext);
|
||||
case RIGHTS_INTERESTS:
|
||||
//特权
|
||||
View rightsInterestsView = LayoutInflater.from(parent.getContext()).inflate(R.layout.view_live_new_roler_ights_interests, parent, false);
|
||||
return new LiveNewRoleRigtsInterestsViewHolder(rightsInterestsView,showRed);
|
||||
return new LiveNewRoleRigtsInterestsViewHolder(rightsInterestsView,showRed,mContext);
|
||||
default:
|
||||
View gamesView = LayoutInflater.from(parent.getContext()).inflate(R.layout.view_live_new_role_interaction_games_view, parent, false);
|
||||
return new LiveNewRoleInteractionGamesViewHolder(gamesView);
|
||||
return new LiveNewRoleInteractionGamesViewHolder(gamesView,mContext);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -30,11 +30,15 @@ public class NewRoleFunGamesAdapter extends RecyclerView.Adapter {
|
||||
@Override
|
||||
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
View runGamesView = LayoutInflater.from(parent.getContext()).inflate(R.layout.view_live_new_role_fun_games_child_view2, parent, false);
|
||||
return new NewRoleFunGamesChildViewHolder(runGamesView,false);
|
||||
return new NewRoleFunGamesChildViewHolder(runGamesView,false,mContext);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
|
||||
ViewGroup.LayoutParams layoutParams = new ViewGroup.LayoutParams((int)
|
||||
(mContext.getResources().getDisplayMetrics().widthPixels / 4.5),
|
||||
ViewGroup.LayoutParams.WRAP_CONTENT);
|
||||
holder.itemView.setLayoutParams(layoutParams);
|
||||
NewRoleFunGamesChildViewHolder childViewHolder = (NewRoleFunGamesChildViewHolder) holder;
|
||||
childViewHolder.setData(child.get(position), rigts);
|
||||
}
|
||||
|
||||
@@ -67,6 +67,13 @@ public abstract class RefreshAdapter<T> extends RecyclerView.Adapter {
|
||||
}
|
||||
}
|
||||
|
||||
public void refreshDel(){
|
||||
if (mRecyclerView != null) {
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void refreshData(List<T> list) {
|
||||
if (mRecyclerView != null && list != null) {
|
||||
mList.clear();
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
package com.yunbao.common.adapter;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.appcompat.widget.AppCompatImageView;
|
||||
import androidx.appcompat.widget.AppCompatTextView;
|
||||
import com.makeramen.roundedimageview.RoundedImageView;
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.bean.SudSettleBean;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class SudGameAdapter extends BaseAdapter<SudSettleBean> {
|
||||
public SudGameAdapter(Context context, List<SudSettleBean> data) {
|
||||
super(context, data);
|
||||
}
|
||||
|
||||
private AppCompatImageView sub_rank_image;
|
||||
private RoundedImageView sub_head;
|
||||
private AppCompatTextView sub_rank_text,sub_name,sub_score;
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
@Override
|
||||
public void convert(BaseAdapter<SudSettleBean>.BaseViewHolder holder, SudSettleBean item) {
|
||||
sub_rank_image = (AppCompatImageView) holder.getView(R.id.sub_rank_image);
|
||||
sub_rank_text = (AppCompatTextView) holder.getView(R.id.sub_rank_text);
|
||||
sub_head = (RoundedImageView) holder.getView(R.id.sub_head);
|
||||
sub_name = (AppCompatTextView) holder.getView(R.id.sub_name);
|
||||
sub_score = (AppCompatTextView) holder.getView(R.id.sub_score);
|
||||
|
||||
switch (item.getRank()){
|
||||
case 1:
|
||||
sub_rank_text.setVisibility(View.GONE);
|
||||
sub_rank_image.setVisibility(View.VISIBLE);
|
||||
sub_rank_image.setImageResource(R.mipmap.sub_1);
|
||||
break;
|
||||
case 2:
|
||||
sub_rank_text.setVisibility(View.GONE);
|
||||
sub_rank_image.setVisibility(View.VISIBLE);
|
||||
sub_rank_image.setImageResource(R.mipmap.sub_2);
|
||||
break;
|
||||
case 3:
|
||||
sub_rank_text.setVisibility(View.GONE);
|
||||
sub_rank_image.setVisibility(View.VISIBLE);
|
||||
sub_rank_image.setImageResource(R.mipmap.sub_3);
|
||||
break;
|
||||
default:
|
||||
sub_rank_text.setVisibility(View.VISIBLE);
|
||||
sub_rank_image.setVisibility(View.GONE);
|
||||
sub_rank_text.setText(String.valueOf(item.getRank()));
|
||||
break;
|
||||
}
|
||||
|
||||
ImgLoader.display(context, item.getAvatar_url(),sub_head);
|
||||
sub_name.setText(item.getNick_name());
|
||||
if (item.getWin_num()>0){
|
||||
sub_score.setText("+"+item.getWin_num());
|
||||
}else {
|
||||
sub_score.setText(String.valueOf(item.getWin_num()));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemLayoutId() {
|
||||
return R.layout.view_sub_rank;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,122 @@
|
||||
package com.yunbao.common.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.bean.SudGameChatImModel;
|
||||
import com.yunbao.common.views.SudGameChatViewHolder;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class SudGameChatAdapter extends RecyclerView.Adapter {
|
||||
private boolean isBottom = false;
|
||||
List<SudGameChatImModel> sudGameChatImModels = new ArrayList<>();
|
||||
private RecyclerView mRecyclerView;
|
||||
private LinearLayoutManager mLayoutManager;
|
||||
private int mRecyclerViewScrolledDy;
|
||||
private Context mContext;
|
||||
|
||||
public SudGameChatAdapter(Context mContext) {
|
||||
this.mContext = mContext;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
View herdView = LayoutInflater.from(parent.getContext()).inflate(R.layout.view_sud_game_chat_item_holder, parent, false);
|
||||
return new SudGameChatViewHolder(herdView);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
|
||||
if (holder instanceof SudGameChatViewHolder) {
|
||||
SudGameChatViewHolder itemViewHolder = (SudGameChatViewHolder) holder;
|
||||
itemViewHolder.sudGameChat(sudGameChatImModels.get(position));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return sudGameChatImModels.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAttachedToRecyclerView(@NonNull RecyclerView recyclerView) {
|
||||
mRecyclerView = recyclerView;
|
||||
mLayoutManager = (LinearLayoutManager) recyclerView.getLayoutManager();
|
||||
mRecyclerView.addOnScrollListener(new RecyclerView.OnScrollListener() {
|
||||
@Override
|
||||
public void onScrolled(@NonNull RecyclerView recyclerView, int dx, int dy) {
|
||||
super.onScrolled(recyclerView, dx, dy);
|
||||
if (isBottom && dy >= 0) return;
|
||||
mRecyclerViewScrolledDy = dy;
|
||||
isBottom = false;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onScrollStateChanged(@NonNull RecyclerView recyclerView, int newState) {
|
||||
super.onScrollStateChanged(recyclerView, newState);
|
||||
if (newState == 0 && isSlideToBottom(recyclerView)) {
|
||||
mRecyclerViewScrolledDy = 0;
|
||||
scrollToBottom();
|
||||
isBottom = true;
|
||||
} else if (newState == 0) {
|
||||
isBottom = false;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public synchronized void insertItem(SudGameChatImModel bean) {
|
||||
if (bean == null) {
|
||||
return;
|
||||
}
|
||||
int size = sudGameChatImModels.size();
|
||||
//设置最大展示99条消息
|
||||
if (size >= 100 && (isBottom || mRecyclerViewScrolledDy == 0)) {
|
||||
|
||||
sudGameChatImModels.subList(0, 50).clear();
|
||||
notifyItemRangeRemoved(0, 50);
|
||||
}
|
||||
sudGameChatImModels.add(bean);
|
||||
if (getItemCount() == 1) {
|
||||
notifyDataSetChanged();
|
||||
} else {
|
||||
notifyItemInserted(getItemCount());
|
||||
}
|
||||
if (isBottom || mRecyclerViewScrolledDy == 0) {
|
||||
scrollToBottom();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断是否滚到底部
|
||||
*
|
||||
* @param recyclerView
|
||||
* @return
|
||||
*/
|
||||
public boolean isSlideToBottom(RecyclerView recyclerView) {
|
||||
if (recyclerView == null) return false;
|
||||
if (recyclerView.computeVerticalScrollExtent() + recyclerView.computeVerticalScrollOffset() >= recyclerView.computeVerticalScrollRange())
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
public void scrollToBottom() {
|
||||
if (sudGameChatImModels.size() > 0) {
|
||||
mRecyclerView.smoothScrollToPosition(getItemCount());
|
||||
}
|
||||
mRecyclerViewScrolledDy = 0;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,135 @@
|
||||
package com.yunbao.common.adapter;
|
||||
|
||||
import android.text.TextUtils;
|
||||
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.SudGameUserModel;
|
||||
import com.yunbao.common.views.SudGameUserListViewHolder;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class SudGameUserListAdapter extends RecyclerView.Adapter {
|
||||
private List<SudGameUserModel> gameUserModels = new ArrayList<>();
|
||||
private boolean micMax = false;
|
||||
|
||||
public SudGameUserListAdapter(List<SudGameUserModel> gameUserModels) {
|
||||
|
||||
if (gameUserModels.size() < 7) {
|
||||
this.gameUserModels.addAll(gameUserModels);
|
||||
for (int i = 0; i < this.gameUserModels.size(); i++) {
|
||||
this.gameUserModels.get(i).setNullUser(false);
|
||||
}
|
||||
int size = 7 - gameUserModels.size();
|
||||
for (int i = 0; i < size; i++) {
|
||||
this.gameUserModels.add(new SudGameUserModel().setNullUser(true));
|
||||
}
|
||||
} else if (gameUserModels.size() == 7) {
|
||||
this.gameUserModels.addAll(gameUserModels);
|
||||
for (int i = 0; i < this.gameUserModels.size(); i++) {
|
||||
this.gameUserModels.get(i).setNullUser(false);
|
||||
}
|
||||
} else {
|
||||
for (int i = 0; i < 7; i++) {
|
||||
this.gameUserModels.add(gameUserModels.get(i).setNullUser(false));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void refreshSudGameUserList(List<SudGameUserModel> gameUserModels, List<String> muteUser) {
|
||||
this.gameUserModels.clear();
|
||||
if (gameUserModels.size() < 7) {
|
||||
micMax = false;
|
||||
this.gameUserModels.addAll(gameUserModels);
|
||||
for (int i = 0; i < this.gameUserModels.size(); i++) {
|
||||
for (String userID : muteUser) {
|
||||
if (TextUtils.equals(userID, String.valueOf(this.gameUserModels.get(i).getId()))) {
|
||||
this.gameUserModels.get(i).setMute(true);
|
||||
}
|
||||
|
||||
}
|
||||
this.gameUserModels.get(i).setNullUser(false);
|
||||
}
|
||||
int size = 7 - gameUserModels.size();
|
||||
for (int i = 0; i < size; i++) {
|
||||
this.gameUserModels.add(new SudGameUserModel().setNullUser(true));
|
||||
}
|
||||
} else if (gameUserModels.size() == 7) {
|
||||
micMax = true;
|
||||
this.gameUserModels.addAll(gameUserModels);
|
||||
for (int i = 0; i < this.gameUserModels.size(); i++) {
|
||||
this.gameUserModels.get(i).setNullUser(false);
|
||||
}
|
||||
} else {
|
||||
micMax = true;
|
||||
|
||||
for (int i = 0; i < 7; i++) {
|
||||
for (String userID : muteUser) {
|
||||
if (TextUtils.equals(userID, String.valueOf(this.gameUserModels.get(i).getId()))) {
|
||||
this.gameUserModels.get(i).setMute(true);
|
||||
}
|
||||
|
||||
}
|
||||
this.gameUserModels.add(gameUserModels.get(i).setNullUser(false));
|
||||
}
|
||||
}
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
View herdView = LayoutInflater.from(parent.getContext()).inflate(R.layout.view_sud_game_user_list_holder, parent, false);
|
||||
return new SudGameUserListViewHolder(herdView);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
|
||||
SudGameUserListViewHolder sudGameUserListViewHolder = (SudGameUserListViewHolder) holder;
|
||||
sudGameUserListViewHolder.upData(gameUserModels.get(position), sudGameSmallCallBack, position);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return gameUserModels.size();
|
||||
}
|
||||
|
||||
public boolean isMicMax() {
|
||||
return micMax;
|
||||
}
|
||||
|
||||
public void muteUser(String userID, boolean mute, int position) {
|
||||
for (int i = 0; i < gameUserModels.size(); i++) {
|
||||
SudGameUserModel sudGameUserModel = gameUserModels.get(i);
|
||||
if (!sudGameUserModel.isNullUser()) {
|
||||
if (TextUtils.equals(userID, String.valueOf(sudGameUserModel.getId()))) {
|
||||
gameUserModels.get(i).setMute(mute);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
notifyItemChanged(position);
|
||||
}
|
||||
|
||||
private SudGameSmallCallBack sudGameSmallCallBack;
|
||||
|
||||
public SudGameUserListAdapter setSudGameSmallCallBack(SudGameSmallCallBack sudGameSmallCallBack) {
|
||||
this.sudGameSmallCallBack = sudGameSmallCallBack;
|
||||
return this;
|
||||
}
|
||||
|
||||
public interface SudGameSmallCallBack {
|
||||
void unMute(String userID, int position);
|
||||
|
||||
void mute(String userID, int position);
|
||||
|
||||
void viewInformation(SudGameUserModel sudGameUserModel);
|
||||
}
|
||||
}
|
||||
@@ -45,7 +45,6 @@ public class SudTitleSelectAdapter extends RecyclerView.Adapter {
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.yunbao.common.utils.StringUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
|
||||
/**
|
||||
* 机器人助手IM消息
|
||||
@@ -21,6 +24,9 @@ public class AiAutomaticSpeechModel extends BaseModel {
|
||||
//标签图片
|
||||
@SerializedName("icon")
|
||||
private String icon;
|
||||
@SerializedName("icon_en")
|
||||
@JSONField(name = "icon_en")
|
||||
private String iconEn;
|
||||
//气泡背景
|
||||
@SerializedName("system_bubble")
|
||||
private String systemBubble;
|
||||
@@ -35,7 +41,7 @@ public class AiAutomaticSpeechModel extends BaseModel {
|
||||
}
|
||||
|
||||
public String getAiName() {
|
||||
return aiName+":";
|
||||
return aiName + ":";
|
||||
}
|
||||
|
||||
public AiAutomaticSpeechModel setAiName(String aiName) {
|
||||
@@ -47,6 +53,16 @@ public class AiAutomaticSpeechModel extends BaseModel {
|
||||
return content;
|
||||
}
|
||||
|
||||
|
||||
public String getIconEn() {
|
||||
return iconEn;
|
||||
}
|
||||
|
||||
public AiAutomaticSpeechModel setIconEn(String iconEn) {
|
||||
this.iconEn = iconEn;
|
||||
return this;
|
||||
}
|
||||
|
||||
public AiAutomaticSpeechModel setContent(String content) {
|
||||
this.content = content;
|
||||
return this;
|
||||
@@ -62,6 +78,9 @@ public class AiAutomaticSpeechModel extends BaseModel {
|
||||
}
|
||||
|
||||
public String getIcon() {
|
||||
if (!WordUtil.isNewZh() && !StringUtil.isEmpty(iconEn)) {
|
||||
return iconEn;
|
||||
}
|
||||
return icon;
|
||||
}
|
||||
|
||||
|
||||
@@ -20,6 +20,16 @@ public class AnchorRecommendModel extends BaseModel {
|
||||
@SerializedName("red_packet_show")
|
||||
private int showRedPacket = 0;//是否显示首页红包浮窗
|
||||
//是否支持换一批0=不支持 1=支持
|
||||
|
||||
|
||||
@SerializedName("live_battle_pass_show_status")
|
||||
private int showWarOrder = 0;//是否显示首页戰令
|
||||
@SerializedName("live_battle_pass_image_cn")
|
||||
private String battlePassImageCn;
|
||||
@SerializedName("live_battle_pass_image_en")
|
||||
private String battlePassImageEn;
|
||||
//是否支持换一批0=不支持 1=支持
|
||||
|
||||
@SerializedName("up_show")
|
||||
private int upShow = 0;
|
||||
@SerializedName("list")
|
||||
@@ -40,10 +50,34 @@ public class AnchorRecommendModel extends BaseModel {
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getShowWarOrder() {
|
||||
return showWarOrder;
|
||||
}
|
||||
|
||||
public void setShowWarOrder(int showWarOrder) {
|
||||
this.showWarOrder = showWarOrder;
|
||||
}
|
||||
|
||||
public int getListShow() {
|
||||
return listShow;
|
||||
}
|
||||
|
||||
public String getBattlePassImageCn() {
|
||||
return battlePassImageCn;
|
||||
}
|
||||
|
||||
public void setBattlePassImageCn(String battlePassImageCn) {
|
||||
this.battlePassImageCn = battlePassImageCn;
|
||||
}
|
||||
|
||||
public String getBattlePassImageEn() {
|
||||
return battlePassImageEn;
|
||||
}
|
||||
|
||||
public void setBattlePassImageEn(String battlePassImageEn) {
|
||||
this.battlePassImageEn = battlePassImageEn;
|
||||
}
|
||||
|
||||
public AnchorRecommendModel setListShow(int listShow) {
|
||||
this.listShow = listShow;
|
||||
return this;
|
||||
|
||||
25
common/src/main/java/com/yunbao/common/bean/AvatarBean.java
Normal file
25
common/src/main/java/com/yunbao/common/bean/AvatarBean.java
Normal file
@@ -0,0 +1,25 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
public class AvatarBean extends BaseModel {
|
||||
private String avatar;
|
||||
private String avatarThumb;
|
||||
|
||||
public AvatarBean() {
|
||||
}
|
||||
|
||||
public String getAvatar() {
|
||||
return avatar;
|
||||
}
|
||||
|
||||
public void setAvatar(String avatar) {
|
||||
this.avatar = avatar;
|
||||
}
|
||||
|
||||
public String getAvatarThumb() {
|
||||
return avatarThumb;
|
||||
}
|
||||
|
||||
public void setAvatarThumb(String avatarThumb) {
|
||||
this.avatarThumb = avatarThumb;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,232 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class BattlePassPoints extends BaseModel{
|
||||
private int id;
|
||||
private int type;
|
||||
@SerializedName("rewards_name")
|
||||
private String rewardsName;
|
||||
@SerializedName("rewards_id")
|
||||
private int rewardsId;
|
||||
@SerializedName("image_url")
|
||||
private String imageUrl;
|
||||
@SerializedName("points_threshold")
|
||||
private String pointsThreshold;
|
||||
@SerializedName("points_threshold_text")
|
||||
private String pointsThresholdText;
|
||||
@SerializedName("rewards_value")
|
||||
private String rewardsValue;
|
||||
@SerializedName("battle_pass_level")
|
||||
private int battlePassLevel;
|
||||
@SerializedName("exchange_quantity")
|
||||
private int exchangeQuantity;
|
||||
@SerializedName("live_battle_pass_type_id")
|
||||
private int liveBattlePassTypeId;
|
||||
private String description;
|
||||
@SerializedName("restrict_time")
|
||||
private int restrictTime;
|
||||
private int sort;
|
||||
@SerializedName("exchange_status")
|
||||
private int exchangeStatus;
|
||||
@SerializedName("user_quinty_count")
|
||||
private int userQuintyCount;
|
||||
@SerializedName("exchange_status_remark")
|
||||
private String exchangeMark;
|
||||
|
||||
@SerializedName("send_reward_type")
|
||||
private int sendRewardType;
|
||||
@SerializedName("send_gift_type")
|
||||
private int sendGiftType;
|
||||
@SerializedName("send_gift_needcoin")
|
||||
private String sendGiftNeedcoin;
|
||||
|
||||
public BattlePassPoints() {
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public int getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(int type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getRewardsName() {
|
||||
return rewardsName;
|
||||
}
|
||||
|
||||
public void setRewardsName(String rewardsName) {
|
||||
this.rewardsName = rewardsName;
|
||||
}
|
||||
|
||||
public int getRewardsId() {
|
||||
return rewardsId;
|
||||
}
|
||||
|
||||
public void setRewardsId(int rewardsId) {
|
||||
this.rewardsId = rewardsId;
|
||||
}
|
||||
|
||||
public String getImageUrl() {
|
||||
return imageUrl;
|
||||
}
|
||||
|
||||
public void setImageUrl(String imageUrl) {
|
||||
this.imageUrl = imageUrl;
|
||||
}
|
||||
|
||||
public String getPointsThreshold() {
|
||||
return pointsThreshold;
|
||||
}
|
||||
|
||||
public void setPointsThreshold(String pointsThreshold) {
|
||||
this.pointsThreshold = pointsThreshold;
|
||||
}
|
||||
|
||||
public String getRewardsValue() {
|
||||
return rewardsValue;
|
||||
}
|
||||
|
||||
public void setRewardsValue(String rewardsValue) {
|
||||
this.rewardsValue = rewardsValue;
|
||||
}
|
||||
|
||||
public int getBattlePassLevel() {
|
||||
return battlePassLevel;
|
||||
}
|
||||
|
||||
public void setBattlePassLevel(int battlePassLevel) {
|
||||
this.battlePassLevel = battlePassLevel;
|
||||
}
|
||||
|
||||
public int getExchangeQuantity() {
|
||||
return exchangeQuantity;
|
||||
}
|
||||
|
||||
public void setExchangeQuantity(int exchangeQuantity) {
|
||||
this.exchangeQuantity = exchangeQuantity;
|
||||
}
|
||||
|
||||
public int getLiveBattlePassTypeId() {
|
||||
return liveBattlePassTypeId;
|
||||
}
|
||||
|
||||
public void setLiveBattlePassTypeId(int liveBattlePassTypeId) {
|
||||
this.liveBattlePassTypeId = liveBattlePassTypeId;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public int getRestrictTime() {
|
||||
return restrictTime;
|
||||
}
|
||||
|
||||
public void setRestrictTime(int restrictTime) {
|
||||
this.restrictTime = restrictTime;
|
||||
}
|
||||
|
||||
public int getSort() {
|
||||
return sort;
|
||||
}
|
||||
|
||||
public void setSort(int sort) {
|
||||
this.sort = sort;
|
||||
}
|
||||
|
||||
public int getExchangeStatus() {
|
||||
return exchangeStatus;
|
||||
}
|
||||
|
||||
public void setExchangeStatus(int exchangeStatus) {
|
||||
this.exchangeStatus = exchangeStatus;
|
||||
}
|
||||
|
||||
public int getUserQuintyCount() {
|
||||
return userQuintyCount;
|
||||
}
|
||||
|
||||
public void setUserQuintyCount(int userQuintyCount) {
|
||||
this.userQuintyCount = userQuintyCount;
|
||||
}
|
||||
|
||||
public String getExchangeMark() {
|
||||
return exchangeMark;
|
||||
}
|
||||
|
||||
public void setExchangeMark(String exchangeMark) {
|
||||
this.exchangeMark = exchangeMark;
|
||||
}
|
||||
|
||||
public String getPointsThresholdText() {
|
||||
return pointsThresholdText;
|
||||
}
|
||||
|
||||
public void setPointsThresholdText(String pointsThresholdText) {
|
||||
this.pointsThresholdText = pointsThresholdText;
|
||||
}
|
||||
|
||||
public int getSendRewardType() {
|
||||
return sendRewardType;
|
||||
}
|
||||
|
||||
public void setSendRewardType(int sendRewardType) {
|
||||
this.sendRewardType = sendRewardType;
|
||||
}
|
||||
|
||||
public int getSendGiftType() {
|
||||
return sendGiftType;
|
||||
}
|
||||
|
||||
public void setSendGiftType(int sendGiftType) {
|
||||
this.sendGiftType = sendGiftType;
|
||||
}
|
||||
|
||||
public String getSendGiftNeedcoin() {
|
||||
return sendGiftNeedcoin;
|
||||
}
|
||||
|
||||
public void setSendGiftNeedcoin(String sendGiftNeedcoin) {
|
||||
this.sendGiftNeedcoin = sendGiftNeedcoin;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "BattlePassPoints{" +
|
||||
"id=" + id +
|
||||
", type=" + type +
|
||||
", rewardsName='" + rewardsName + '\'' +
|
||||
", rewardsId=" + rewardsId +
|
||||
", imageUrl='" + imageUrl + '\'' +
|
||||
", pointsThreshold='" + pointsThreshold + '\'' +
|
||||
", pointsThresholdText='" + pointsThresholdText + '\'' +
|
||||
", rewardsValue='" + rewardsValue + '\'' +
|
||||
", battlePassLevel=" + battlePassLevel +
|
||||
", exchangeQuantity=" + exchangeQuantity +
|
||||
", liveBattlePassTypeId=" + liveBattlePassTypeId +
|
||||
", description='" + description + '\'' +
|
||||
", restrictTime=" + restrictTime +
|
||||
", sort=" + sort +
|
||||
", exchangeStatus=" + exchangeStatus +
|
||||
", userQuintyCount=" + userQuintyCount +
|
||||
", exchangeMark='" + exchangeMark + '\'' +
|
||||
", sendRewardType=" + sendRewardType +
|
||||
", sendGiftType=" + sendGiftType +
|
||||
", sendRewardNeedcoin='" + sendGiftNeedcoin + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
157
common/src/main/java/com/yunbao/common/bean/BattlePassTask.java
Normal file
157
common/src/main/java/com/yunbao/common/bean/BattlePassTask.java
Normal file
@@ -0,0 +1,157 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class BattlePassTask extends BaseModel {
|
||||
private List<Task> daily;// 每日任务
|
||||
private List<Task> season;// 每期任务
|
||||
|
||||
public BattlePassTask() {
|
||||
}
|
||||
|
||||
public List<Task> getDaily() {
|
||||
return daily;
|
||||
}
|
||||
|
||||
public void setDaily(List<Task> daily) {
|
||||
this.daily = daily;
|
||||
}
|
||||
|
||||
public List<Task> getSeason() {
|
||||
return season;
|
||||
}
|
||||
|
||||
public void setSeason(List<Task> season) {
|
||||
this.season = season;
|
||||
}
|
||||
|
||||
public static class Task {
|
||||
private int id;// 任务ID
|
||||
private String type;// 任务类型
|
||||
@SerializedName("task_success")
|
||||
private int taskSuccess;// 任务可以重复的次数
|
||||
@SerializedName("name_en")
|
||||
private String nameEn;// 任务名称英文
|
||||
@SerializedName("remark_en")
|
||||
private String remarkEn;// 任务备注英文
|
||||
private String name;// 任务名称中文
|
||||
private String remark; // 任务备注中文
|
||||
@SerializedName("image_path")
|
||||
private String imagePath;// 图标path
|
||||
@SerializedName("user_task_success")
|
||||
private int userTaskSuccess;// 用户完成的任务次数
|
||||
@SerializedName("received_task")
|
||||
private int receivedTask;// 用户已经领取的任务数量
|
||||
@SerializedName("not_received_task")
|
||||
private int notReceivedTask; // 用户未领取的任务数量
|
||||
public boolean isBuy(){
|
||||
return taskSuccess==0;
|
||||
}
|
||||
public String getNameText(){
|
||||
return WordUtil.isNewZh()?name:nameEn;
|
||||
}
|
||||
public String getRemarkText(){
|
||||
return WordUtil.isNewZh()?remark:remarkEn;
|
||||
}
|
||||
|
||||
public Task() {
|
||||
}
|
||||
|
||||
public Task(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public int getTaskSuccess() {
|
||||
return taskSuccess;
|
||||
}
|
||||
|
||||
public void setTaskSuccess(int taskSuccess) {
|
||||
this.taskSuccess = taskSuccess;
|
||||
}
|
||||
|
||||
public String getNameEn() {
|
||||
return nameEn;
|
||||
}
|
||||
|
||||
public void setNameEn(String nameEn) {
|
||||
this.nameEn = nameEn;
|
||||
}
|
||||
|
||||
public String getRemarkEn() {
|
||||
return remarkEn;
|
||||
}
|
||||
|
||||
public void setRemarkEn(String remarkEn) {
|
||||
this.remarkEn = remarkEn;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public String getImagePath() {
|
||||
return imagePath;
|
||||
}
|
||||
|
||||
public void setImagePath(String imagePath) {
|
||||
this.imagePath = imagePath;
|
||||
}
|
||||
|
||||
public int getUserTaskSuccess() {
|
||||
return userTaskSuccess;
|
||||
}
|
||||
|
||||
public void setUserTaskSuccess(int userTaskSuccess) {
|
||||
this.userTaskSuccess = userTaskSuccess;
|
||||
}
|
||||
|
||||
public int getReceivedTask() {
|
||||
return receivedTask;
|
||||
}
|
||||
|
||||
public void setReceivedTask(int receivedTask) {
|
||||
this.receivedTask = receivedTask;
|
||||
}
|
||||
|
||||
public int getNotReceivedTask() {
|
||||
return notReceivedTask;
|
||||
}
|
||||
|
||||
public void setNotReceivedTask(int notReceivedTask) {
|
||||
this.notReceivedTask = notReceivedTask;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,199 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class BattlePassUserInfoBean extends BaseModel{
|
||||
private String uid;
|
||||
private int points;
|
||||
@SerializedName("battle_pass_exp")
|
||||
private int battlePassExp;
|
||||
@SerializedName("battle_pass_user_records_1")
|
||||
private int battlePassUserRecords1;
|
||||
@SerializedName("battle_pass_user_records_2")
|
||||
private int battlePassUserRecords2;
|
||||
@SerializedName("battle_pass_user_records_3")
|
||||
private int battlePassUserRecords3;
|
||||
private int level;
|
||||
@SerializedName("last_level_exp")
|
||||
private int lastLevelExp;
|
||||
@SerializedName("next_level_exp")
|
||||
private int nextLevelExp;
|
||||
private String id;
|
||||
@SerializedName("battle_pass_name")
|
||||
private String battlePassName;
|
||||
@SerializedName("start_time")
|
||||
private String startTime;
|
||||
@SerializedName("end_time")
|
||||
private String endTime;
|
||||
@SerializedName("battle_pass_status")
|
||||
private boolean battlePassStatus;
|
||||
@SerializedName("max_level_exp")
|
||||
private long maxLevelExp;
|
||||
@SerializedName("max_level")
|
||||
private int maxLevel;
|
||||
|
||||
private List<LiveBattlePassRewardsBean.BattlePassType> live_battle_pass_type;
|
||||
|
||||
public BattlePassUserInfoBean() {
|
||||
}
|
||||
public List<LiveBattlePassRewardsBean.BattlePassType> getLive_battle_pass_type() {
|
||||
return live_battle_pass_type;
|
||||
}
|
||||
|
||||
public void setLive_battle_pass_type(List<LiveBattlePassRewardsBean.BattlePassType> live_battle_pass_type) {
|
||||
this.live_battle_pass_type = live_battle_pass_type;
|
||||
}
|
||||
|
||||
public String getUid() {
|
||||
return uid;
|
||||
}
|
||||
|
||||
public void setUid(String uid) {
|
||||
this.uid = uid;
|
||||
}
|
||||
|
||||
public int getPoints() {
|
||||
return points;
|
||||
}
|
||||
|
||||
public void setPoints(int points) {
|
||||
this.points = points;
|
||||
}
|
||||
|
||||
public int getBattlePassExp() {
|
||||
return battlePassExp;
|
||||
}
|
||||
|
||||
public void setBattlePassExp(int battlePassExp) {
|
||||
this.battlePassExp = battlePassExp;
|
||||
}
|
||||
|
||||
public int getBattlePassUserRecords1() {
|
||||
return battlePassUserRecords1;
|
||||
}
|
||||
|
||||
public void setBattlePassUserRecords1(int battlePassUserRecords1) {
|
||||
this.battlePassUserRecords1 = battlePassUserRecords1;
|
||||
}
|
||||
|
||||
public int getBattlePassUserRecords2() {
|
||||
return battlePassUserRecords2;
|
||||
}
|
||||
|
||||
public void setBattlePassUserRecords2(int battlePassUserRecords2) {
|
||||
this.battlePassUserRecords2 = battlePassUserRecords2;
|
||||
}
|
||||
|
||||
public int getBattlePassUserRecords3() {
|
||||
return battlePassUserRecords3;
|
||||
}
|
||||
|
||||
public void setBattlePassUserRecords3(int battlePassUserRecords3) {
|
||||
this.battlePassUserRecords3 = battlePassUserRecords3;
|
||||
}
|
||||
|
||||
public int getLevel() {
|
||||
return level;
|
||||
}
|
||||
|
||||
public void setLevel(int level) {
|
||||
this.level = level;
|
||||
}
|
||||
|
||||
public int getLastLevelExp() {
|
||||
return lastLevelExp;
|
||||
}
|
||||
|
||||
public void setLastLevelExp(int lastLevelExp) {
|
||||
this.lastLevelExp = lastLevelExp;
|
||||
}
|
||||
|
||||
public int getNextLevelExp() {
|
||||
return nextLevelExp;
|
||||
}
|
||||
|
||||
public void setNextLevelExp(int nextLevelExp) {
|
||||
this.nextLevelExp = nextLevelExp;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getBattlePassName() {
|
||||
return battlePassName;
|
||||
}
|
||||
|
||||
public void setBattlePassName(String battlePassName) {
|
||||
this.battlePassName = battlePassName;
|
||||
}
|
||||
|
||||
public String getStartTime() {
|
||||
return startTime;
|
||||
}
|
||||
|
||||
public void setStartTime(String startTime) {
|
||||
this.startTime = startTime;
|
||||
}
|
||||
|
||||
public String getEndTime() {
|
||||
return endTime;
|
||||
}
|
||||
|
||||
public void setEndTime(String endTime) {
|
||||
this.endTime = endTime;
|
||||
}
|
||||
|
||||
public boolean isBattlePassStatus() {
|
||||
return battlePassStatus;
|
||||
}
|
||||
|
||||
public void setBattlePassStatus(boolean battlePassStatus) {
|
||||
this.battlePassStatus = battlePassStatus;
|
||||
}
|
||||
|
||||
public long getMaxLevelExp() {
|
||||
return maxLevelExp;
|
||||
}
|
||||
|
||||
public void setMaxLevelExp(long maxLevelExp) {
|
||||
this.maxLevelExp = maxLevelExp;
|
||||
}
|
||||
|
||||
public int getMaxLevel() {
|
||||
return maxLevel;
|
||||
}
|
||||
|
||||
public void setMaxLevel(int maxLevel) {
|
||||
this.maxLevel = maxLevel;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "BattlePassUserInfoBean{" +
|
||||
"uid='" + uid + '\'' +
|
||||
", points=" + points +
|
||||
", battlePassExp=" + battlePassExp +
|
||||
", battlePassUserRecords1=" + battlePassUserRecords1 +
|
||||
", battlePassUserRecords2=" + battlePassUserRecords2 +
|
||||
", battlePassUserRecords3=" + battlePassUserRecords3 +
|
||||
", level=" + level +
|
||||
", lastLevelExp=" + lastLevelExp +
|
||||
", nextLevelExp=" + nextLevelExp +
|
||||
", id='" + id + '\'' +
|
||||
", battlePassName='" + battlePassName + '\'' +
|
||||
", startTime='" + startTime + '\'' +
|
||||
", endTime='" + endTime + '\'' +
|
||||
", battlePassStatus=" + battlePassStatus +
|
||||
", maxLevelExp=" + maxLevelExp +
|
||||
", maxLevel=" + maxLevel +
|
||||
", live_battle_pass_type=" + live_battle_pass_type +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -13,6 +13,16 @@ public class CheckLiveModel extends BaseModel {
|
||||
private String typeMsg;
|
||||
@SerializedName("live_sdk")
|
||||
private String liveSdk;
|
||||
@SerializedName("is_shengwang")
|
||||
private String isShengwang;
|
||||
|
||||
public String getIsShengwang() {
|
||||
return isShengwang;
|
||||
}
|
||||
|
||||
public void setIsShengwang(String isShengwang) {
|
||||
this.isShengwang = isShengwang;
|
||||
}
|
||||
|
||||
public static CheckLiveModel objectFromData(String str) {
|
||||
|
||||
|
||||
@@ -36,4 +36,13 @@ public class CheckRemainingBalance extends BaseModel {
|
||||
public void setGoldenBeanRemainingBalance(int goldenBeanRemainingBalance) {
|
||||
this.goldenBeanRemainingBalance = goldenBeanRemainingBalance;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "CheckRemainingBalance{" +
|
||||
"goldenBeanRemainingBalance=" + goldenBeanRemainingBalance +
|
||||
", status=" + status +
|
||||
", deductMoneyKey='" + deductMoneyKey + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class CheckUpgradesModel extends BaseModel {
|
||||
/**
|
||||
* {
|
||||
* "level": 33, // 等级
|
||||
* "rewards": [ // 奖励信息
|
||||
* {
|
||||
* "id": 1,
|
||||
* "reward_name": "星之守護等級牌", // 奖励名称
|
||||
* "image_path": "https://ceshi.yaoulive.com/data/upload/20240304/tequan_1.png" // 图片链接
|
||||
* },
|
||||
* {
|
||||
* "id": 2,
|
||||
* "reward_name": "人氣票",
|
||||
* "image_path": "https://ceshi.yaoulive.com/data/upload/20240304/tequan_1.png"
|
||||
* }
|
||||
* ]
|
||||
* }
|
||||
* }
|
||||
*/
|
||||
@SerializedName("level")
|
||||
private String level;
|
||||
@SerializedName("rewards")
|
||||
private List<RewardsModel> rewards;
|
||||
|
||||
public String getLevel() {
|
||||
return level;
|
||||
}
|
||||
|
||||
public CheckUpgradesModel setLevel(String level) {
|
||||
this.level = level;
|
||||
return this;
|
||||
}
|
||||
|
||||
public List<RewardsModel> getRewards() {
|
||||
return rewards;
|
||||
}
|
||||
|
||||
public CheckUpgradesModel setRewards(List<RewardsModel> rewards) {
|
||||
this.rewards = rewards;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@ package com.yunbao.common.bean;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.yunbao.common.utils.StringUtil;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
@@ -59,6 +60,9 @@ public class ConfigBean extends BaseModel {
|
||||
private String txPlayUgcLicenceUrl;//腾讯短视频鉴权
|
||||
private String txVideoUgcKey;
|
||||
private String google_isup;
|
||||
|
||||
private String sud_game_speech;
|
||||
|
||||
@SerializedName("is_return_user")//是否需要弹窗(0否,1是)
|
||||
private String isReturnUser="";
|
||||
@SerializedName("popup_img_url")//弹窗图片地址
|
||||
@@ -182,6 +186,20 @@ public class ConfigBean extends BaseModel {
|
||||
'}';
|
||||
}
|
||||
|
||||
|
||||
public boolean isSw(){
|
||||
return getSud_game_speech().equals("1");
|
||||
}
|
||||
|
||||
@JSONField(name = "sud_game_speech")
|
||||
public String getSud_game_speech() {
|
||||
return sud_game_speech;
|
||||
}
|
||||
|
||||
public void setSud_game_speech(String sud_game_speech) {
|
||||
this.sud_game_speech = sud_game_speech;
|
||||
}
|
||||
|
||||
@JSONField(name = "apk_ver")
|
||||
public String getVersion() {
|
||||
return version;
|
||||
|
||||
@@ -114,6 +114,17 @@ public class EnterRoomInfoModel extends BaseModel {
|
||||
@SerializedName("gift_wall_lighten_total")
|
||||
private String giftWallLightenTotal;
|
||||
|
||||
@SerializedName("connection_info")
|
||||
private LivePkMicModel connectionInfo;
|
||||
|
||||
public LivePkMicModel getConnectionInfo() {
|
||||
return connectionInfo;
|
||||
}
|
||||
|
||||
public void setConnectionInfo(LivePkMicModel connectionInfo) {
|
||||
this.connectionInfo = connectionInfo;
|
||||
}
|
||||
|
||||
public String getGiftWallLightenNumber() {
|
||||
return giftWallLightenNumber;
|
||||
}
|
||||
|
||||
@@ -41,8 +41,20 @@ public class EnterRoomNewModel extends BaseModel {
|
||||
private SudGameDateModel sudGameDateModel;
|
||||
@SerializedName("quick_gift_remaining_quantity")
|
||||
private int quickGiftRemainingQuantity;//剩余的小PD礼物数量
|
||||
|
||||
@SerializedName("if_viewing_duration_complete")
|
||||
private int ifViewingDurationComplete;//通过观看时间获取小PD礼物的次数
|
||||
@SerializedName("sendMoneyLongStatus")
|
||||
private SendMoneyLongStatusModel model;
|
||||
|
||||
public SendMoneyLongStatusModel getModel() {
|
||||
return model;
|
||||
}
|
||||
|
||||
public EnterRoomNewModel setModel(SendMoneyLongStatusModel model) {
|
||||
this.model = model;
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getQuickGiftRemainingQuantity() {
|
||||
return quickGiftRemainingQuantity;
|
||||
|
||||
@@ -0,0 +1,142 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class GuardDataTipModel extends BaseModel {
|
||||
/**
|
||||
* {
|
||||
* "guard_name": "星之守護", // 守护名称
|
||||
* "guard_type": 1, // 守护类型
|
||||
* "close_img": "https://ceshi.yaoulive.com/data/upload/20240304/guard_xing_close.png", // 未开通图标
|
||||
* "open_img": "https://ceshi.yaoulive.com/data/upload/20240304/guard_xing_open.png", // 已开通图标
|
||||
* "is_open": true, // 是否开通 是.true 否.false
|
||||
* "price": { // 价格
|
||||
* {
|
||||
* "opening_time": "1個月", // 开通时长
|
||||
* "original_price": "188000", // 原价
|
||||
* "discount_price": "", // 折扣价
|
||||
* "discount": "", // 折扣
|
||||
* "price_key": 1
|
||||
* },
|
||||
* {
|
||||
* "opening_time": "3個月",
|
||||
* "original_price": "564000",
|
||||
* "discount_price": "398000",
|
||||
* "discount": "7.1折",
|
||||
* "price_key": 3
|
||||
* },
|
||||
* {
|
||||
* "opening_time": "6個月",
|
||||
* "original_price": "1128000",
|
||||
* "discount_price": "738000",
|
||||
* "discount": "6.5折",
|
||||
* "price_key": 6
|
||||
* },
|
||||
* {
|
||||
* "opening_time": "12個月",
|
||||
* "original_price": "2256000",
|
||||
* "discount_price": "1314000",
|
||||
* "discount": "5.8折",
|
||||
* "price_key": 12
|
||||
* }
|
||||
* ],
|
||||
* "guard_privilege": [
|
||||
* "https://ceshi.yaoulive.com/data/upload/20240304/tequan_1.png",
|
||||
* "https://ceshi.yaoulive.com/data/upload/20240304/tequan_2.png",
|
||||
* "https://ceshi.yaoulive.com/data/upload/20240304/tequan_3.png",
|
||||
* "https://ceshi.yaoulive.com/data/upload/20240304/tequan_1.png",
|
||||
* "https://ceshi.yaoulive.com/data/upload/20240304/tequan_2.png",
|
||||
* "https://ceshi.yaoulive.com/data/upload/20240304/tequan_3.png",
|
||||
* "https://ceshi.yaoulive.com/data/upload/20240304/tequan_1.png",
|
||||
* "https://ceshi.yaoulive.com/data/upload/20240304/tequan_1.png",
|
||||
* "https://ceshi.yaoulive.com/data/upload/20240304/tequan_2.png",
|
||||
* "https://ceshi.yaoulive.com/data/upload/20240304/tequan_3.png"
|
||||
* ]
|
||||
* }
|
||||
*/
|
||||
@SerializedName("guard_name")
|
||||
private String guardName;
|
||||
@SerializedName("guard_type")
|
||||
private int guardType;
|
||||
@SerializedName("close_img")
|
||||
private String closeImg;
|
||||
@SerializedName("open_img")
|
||||
private String openImg;
|
||||
@SerializedName("is_open")
|
||||
private String isOpen;
|
||||
@SerializedName("price")
|
||||
private List<GuardPriceModel> price;
|
||||
@SerializedName("guard_privilege")
|
||||
private List<String> guardPrivilege;
|
||||
|
||||
public String getGuardName() {
|
||||
return guardName;
|
||||
}
|
||||
|
||||
public GuardDataTipModel setGuardName(String guardName) {
|
||||
this.guardName = guardName;
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getGuardType() {
|
||||
return guardType;
|
||||
}
|
||||
|
||||
public GuardDataTipModel setGuardType(int guardType) {
|
||||
this.guardType = guardType;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCloseImg() {
|
||||
return closeImg;
|
||||
}
|
||||
|
||||
public GuardDataTipModel setCloseImg(String closeImg) {
|
||||
this.closeImg = closeImg;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getOpenImg() {
|
||||
return openImg;
|
||||
}
|
||||
|
||||
public GuardDataTipModel setOpenImg(String openImg) {
|
||||
this.openImg = openImg;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isOpen() {
|
||||
return TextUtils.equals(isOpen, "1");
|
||||
}
|
||||
|
||||
public String getIsOpen() {
|
||||
return isOpen;
|
||||
}
|
||||
|
||||
public GuardDataTipModel setIsOpen(String isOpen) {
|
||||
this.isOpen = isOpen;
|
||||
return this;
|
||||
}
|
||||
|
||||
public List<GuardPriceModel> getPrice() {
|
||||
return price;
|
||||
}
|
||||
|
||||
public GuardDataTipModel setPrice(List<GuardPriceModel> price) {
|
||||
this.price = price;
|
||||
return this;
|
||||
}
|
||||
|
||||
public List<String> getGuardPrivilege() {
|
||||
return guardPrivilege;
|
||||
}
|
||||
|
||||
public GuardDataTipModel setGuardPrivilege(List<String> guardPrivilege) {
|
||||
this.guardPrivilege = guardPrivilege;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class GuardGetGuardOpenInfoModel extends BaseModel {
|
||||
|
||||
@SerializedName("user_info")
|
||||
private GuardUserInfoModel userInfo;
|
||||
@SerializedName("guard_data")
|
||||
private List<GuardDataTipModel> guardData;
|
||||
|
||||
public GuardUserInfoModel getUserInfo() {
|
||||
return userInfo;
|
||||
}
|
||||
|
||||
public GuardGetGuardOpenInfoModel setUserInfo(GuardUserInfoModel userInfo) {
|
||||
this.userInfo = userInfo;
|
||||
return this;
|
||||
}
|
||||
|
||||
public List<GuardDataTipModel> getGuardData() {
|
||||
return guardData;
|
||||
}
|
||||
|
||||
public GuardGetGuardOpenInfoModel setGuardData(List<GuardDataTipModel> guardData) {
|
||||
this.guardData = guardData;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,142 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class GuardGetGuardUserInfoModel extends BaseModel {
|
||||
/**
|
||||
* "info": {
|
||||
* "uid": "98923", // 用户ID
|
||||
* "user_avatar": "https://downs.yaoulive.com/20230706/0572c0f694601f4d2695cd210effbe93.jpeg?imageView2/2/w/600/h/600", // 用户头像链接
|
||||
* "liveuid": "98889", // 主播ID
|
||||
* "live_avatar": "https://ceshi.yaoulive.com/data/upload/20230522/20230526102906.png", // 主播头像链接
|
||||
* "guard_type": 0, // 守护类型 0.未开通 1.星之守护 2.王之守护 3.神之守护
|
||||
* "exp": 0, // 守护经验值
|
||||
* "level": 0, // 守护等级
|
||||
* "endtime": 0, // 到期时间
|
||||
* "user_language": "chinese",
|
||||
* "live_language": "chinese"
|
||||
* }
|
||||
* }
|
||||
*/
|
||||
@SerializedName("uid")
|
||||
private String uid;
|
||||
@SerializedName("user_avatar")
|
||||
private String userAvatar;
|
||||
@SerializedName("liveuid")
|
||||
private String liveuid;
|
||||
@SerializedName("live_avatar")
|
||||
private String liveAvatar;
|
||||
@SerializedName("guard_type")
|
||||
private int guardType;
|
||||
@SerializedName("exp")
|
||||
private String exp;
|
||||
@SerializedName("level")
|
||||
private int level;
|
||||
@SerializedName("endtime")
|
||||
private long endtime;
|
||||
@SerializedName("user_language")
|
||||
private String userLanguage;
|
||||
@SerializedName("live_language")
|
||||
private String liveLanguage;
|
||||
@SerializedName("is_open")
|
||||
private String isOpen;
|
||||
|
||||
public String getIsOpen() {
|
||||
return isOpen;
|
||||
}
|
||||
|
||||
public GuardGetGuardUserInfoModel setIsOpen(String isOpen) {
|
||||
this.isOpen = isOpen;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getUid() {
|
||||
return uid;
|
||||
}
|
||||
|
||||
public GuardGetGuardUserInfoModel setUid(String uid) {
|
||||
this.uid = uid;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getUserAvatar() {
|
||||
return userAvatar;
|
||||
}
|
||||
|
||||
public GuardGetGuardUserInfoModel setUserAvatar(String userAvatar) {
|
||||
this.userAvatar = userAvatar;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getLiveuid() {
|
||||
return liveuid;
|
||||
}
|
||||
|
||||
public GuardGetGuardUserInfoModel setLiveuid(String liveuid) {
|
||||
this.liveuid = liveuid;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getLiveAvatar() {
|
||||
return liveAvatar;
|
||||
}
|
||||
|
||||
public GuardGetGuardUserInfoModel setLiveAvatar(String liveAvatar) {
|
||||
this.liveAvatar = liveAvatar;
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getGuardType() {
|
||||
return guardType;
|
||||
}
|
||||
|
||||
public GuardGetGuardUserInfoModel setGuardType(int guardType) {
|
||||
this.guardType = guardType;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getExp() {
|
||||
return exp;
|
||||
}
|
||||
|
||||
public GuardGetGuardUserInfoModel setExp(String exp) {
|
||||
this.exp = exp;
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getLevel() {
|
||||
return level;
|
||||
}
|
||||
|
||||
public GuardGetGuardUserInfoModel setLevel(int level) {
|
||||
this.level = level;
|
||||
return this;
|
||||
}
|
||||
|
||||
public long getEndtime() {
|
||||
return endtime;
|
||||
}
|
||||
|
||||
public GuardGetGuardUserInfoModel setEndtime(long endtime) {
|
||||
this.endtime = endtime;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getUserLanguage() {
|
||||
return userLanguage;
|
||||
}
|
||||
|
||||
public GuardGetGuardUserInfoModel setUserLanguage(String userLanguage) {
|
||||
this.userLanguage = userLanguage;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getLiveLanguage() {
|
||||
return liveLanguage;
|
||||
}
|
||||
|
||||
public GuardGetGuardUserInfoModel setLiveLanguage(String liveLanguage) {
|
||||
this.liveLanguage = liveLanguage;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,145 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class GuardMaturityDateRemindModel extends BaseModel{
|
||||
|
||||
@SerializedName("_method_")
|
||||
private String method;
|
||||
@SerializedName("action")
|
||||
private String action;
|
||||
@SerializedName("is_overdue")
|
||||
private int isOverdue;
|
||||
@SerializedName("days")
|
||||
private int days;
|
||||
@SerializedName("uid")
|
||||
private String uid;
|
||||
@SerializedName("liveuid")
|
||||
private String liveuid;
|
||||
@SerializedName("user_avatar")
|
||||
private String userAvatar;
|
||||
@SerializedName("user_nicename")
|
||||
private String userNicename;
|
||||
@SerializedName("live_avatar")
|
||||
private String liveAvatar;
|
||||
@SerializedName("live_nicename")
|
||||
private String liveNicename;
|
||||
@SerializedName("ct")
|
||||
private String ct;
|
||||
@SerializedName("guard_type")
|
||||
private String guardType;
|
||||
|
||||
public String getGuardType() {
|
||||
return guardType;
|
||||
}
|
||||
|
||||
public GuardMaturityDateRemindModel setGuardType(String guardType) {
|
||||
this.guardType = guardType;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getMethod() {
|
||||
return method;
|
||||
}
|
||||
|
||||
public void setMethod(String method) {
|
||||
this.method = method;
|
||||
}
|
||||
|
||||
public String getAction() {
|
||||
return action;
|
||||
}
|
||||
|
||||
public void setAction(String action) {
|
||||
this.action = action;
|
||||
}
|
||||
|
||||
public int getIsOverdue() {
|
||||
return isOverdue;
|
||||
}
|
||||
|
||||
public void setIsOverdue(int isOverdue) {
|
||||
this.isOverdue = isOverdue;
|
||||
}
|
||||
|
||||
public int getDays() {
|
||||
return days;
|
||||
}
|
||||
|
||||
public void setDays(int days) {
|
||||
this.days = days;
|
||||
}
|
||||
|
||||
public String getUid() {
|
||||
return uid;
|
||||
}
|
||||
|
||||
public void setUid(String uid) {
|
||||
this.uid = uid;
|
||||
}
|
||||
|
||||
public String getLiveuid() {
|
||||
return liveuid;
|
||||
}
|
||||
|
||||
public void setLiveuid(String liveuid) {
|
||||
this.liveuid = liveuid;
|
||||
}
|
||||
|
||||
public String getUserAvatar() {
|
||||
return userAvatar;
|
||||
}
|
||||
|
||||
public void setUserAvatar(String userAvatar) {
|
||||
this.userAvatar = userAvatar;
|
||||
}
|
||||
|
||||
public String getUserNicename() {
|
||||
return userNicename;
|
||||
}
|
||||
|
||||
public void setUserNicename(String userNicename) {
|
||||
this.userNicename = userNicename;
|
||||
}
|
||||
|
||||
public String getLiveAvatar() {
|
||||
return liveAvatar;
|
||||
}
|
||||
|
||||
public void setLiveAvatar(String liveAvatar) {
|
||||
this.liveAvatar = liveAvatar;
|
||||
}
|
||||
|
||||
public String getLiveNicename() {
|
||||
return liveNicename;
|
||||
}
|
||||
|
||||
public void setLiveNicename(String liveNicename) {
|
||||
this.liveNicename = liveNicename;
|
||||
}
|
||||
|
||||
public String getCt() {
|
||||
return ct;
|
||||
}
|
||||
|
||||
public void setCt(String ct) {
|
||||
this.ct = ct;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "GuardMaturityDateRemindModel{" +
|
||||
"method='" + method + '\'' +
|
||||
", action='" + action + '\'' +
|
||||
", isOverdue=" + isOverdue +
|
||||
", days=" + days +
|
||||
", uid='" + uid + '\'' +
|
||||
", liveuid='" + liveuid + '\'' +
|
||||
", userAvatar='" + userAvatar + '\'' +
|
||||
", userNicename='" + userNicename + '\'' +
|
||||
", liveAvatar='" + liveAvatar + '\'' +
|
||||
", liveNicename='" + liveNicename + '\'' +
|
||||
", ct='" + ct + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -8,6 +8,17 @@ public class GuardModel extends BaseModel {
|
||||
private String type;
|
||||
@SerializedName("endtime")
|
||||
private String endtime;
|
||||
@SerializedName("guard_type")
|
||||
private String guardType;
|
||||
|
||||
public String getGuardType() {
|
||||
return guardType;
|
||||
}
|
||||
|
||||
public GuardModel setGuardType(String guardType) {
|
||||
this.guardType = guardType;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
|
||||
@@ -0,0 +1,94 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class GuardPriceModel extends BaseModel {
|
||||
/**
|
||||
* {
|
||||
* "opening_time": "1個月", // 开通时长
|
||||
* "original_price": "188000", // 原价
|
||||
* "discount_price": "", // 折扣价
|
||||
* "discount": "", // 折扣
|
||||
* "price_key": 1
|
||||
* }
|
||||
*/
|
||||
@SerializedName("opening_time")
|
||||
private String openingTime;
|
||||
@SerializedName("original_price")
|
||||
private String originalPrice;
|
||||
@SerializedName("discount_price")
|
||||
private String discountPrice;
|
||||
@SerializedName("discount")
|
||||
private String discount;
|
||||
@SerializedName("price_key")
|
||||
private int priceKey;
|
||||
@SerializedName("coupon_discount")
|
||||
private String couponDiscount;
|
||||
@SerializedName("coupon_discount_en")
|
||||
private String couponDiscountEn;
|
||||
@SerializedName("coupon_discount_price")
|
||||
private String couponDiscountPrice;
|
||||
@SerializedName("coupon_id")
|
||||
private String couponId;
|
||||
|
||||
public String getCouponDiscount() {
|
||||
return couponDiscount;
|
||||
}
|
||||
|
||||
public String getCouponId() {
|
||||
return couponId;
|
||||
}
|
||||
|
||||
public String getCouponDiscountEn() {
|
||||
return couponDiscountEn;
|
||||
}
|
||||
|
||||
public String getCouponDiscountPrice() {
|
||||
return couponDiscountPrice;
|
||||
}
|
||||
|
||||
public String getOpeningTime() {
|
||||
return openingTime;
|
||||
}
|
||||
|
||||
public GuardPriceModel setOpeningTime(String openingTime) {
|
||||
this.openingTime = openingTime;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getOriginalPrice() {
|
||||
return originalPrice;
|
||||
}
|
||||
|
||||
public GuardPriceModel setOriginalPrice(String originalPrice) {
|
||||
this.originalPrice = originalPrice;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getDiscountPrice() {
|
||||
return discountPrice;
|
||||
}
|
||||
|
||||
public GuardPriceModel setDiscountPrice(String discountPrice) {
|
||||
this.discountPrice = discountPrice;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getDiscount() {
|
||||
return discount;
|
||||
}
|
||||
|
||||
public GuardPriceModel setDiscount(String discount) {
|
||||
this.discount = discount;
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getPriceKey() {
|
||||
return priceKey;
|
||||
}
|
||||
|
||||
public GuardPriceModel setPriceKey(int priceKey) {
|
||||
this.priceKey = priceKey;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,142 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class GuardUserInfoModel extends BaseModel {
|
||||
/**
|
||||
* {
|
||||
* "user_info": { // 用户开通信息
|
||||
* "uid": "98888", // 用户ID
|
||||
* "user_avatar": "https://downs.yaoulive.com/mannine.png", // 用户头像链接
|
||||
* "liveuid": "98889", // 主播ID
|
||||
* "live_avatar": "https://ceshi.yaoulive.com/data/upload/20230522/20230526102906.png", // 主播头像链接
|
||||
* "guard_type": 1, // 守护类型
|
||||
* "exp": 0, // 经验值
|
||||
* "level": 1, // 等级
|
||||
* "endtime": 1710145929, // 到期时间
|
||||
* "user_language": "chinese", // 用户语言
|
||||
* "live_language": "chinese" // 主播语言
|
||||
* }
|
||||
*/
|
||||
@SerializedName("uid")
|
||||
private String uid;
|
||||
@SerializedName("user_avatar")
|
||||
private String userAvatar;
|
||||
@SerializedName("liveuid")
|
||||
private String liveuid;
|
||||
@SerializedName("live_avatar")
|
||||
private String liveAvatar;
|
||||
@SerializedName("guard_type")
|
||||
private int guardType;
|
||||
@SerializedName("exp")
|
||||
private String exp;
|
||||
@SerializedName("level")
|
||||
private String level;
|
||||
@SerializedName("endtime")
|
||||
private String endtime;
|
||||
@SerializedName("user_language")
|
||||
private String userLanguage;
|
||||
@SerializedName("live_language")
|
||||
private String liveLanguage;
|
||||
@SerializedName("is_open")
|
||||
private String isOpen;
|
||||
|
||||
public String getIsOpen() {
|
||||
return isOpen;
|
||||
}
|
||||
|
||||
public GuardUserInfoModel setIsOpen(String isOpen) {
|
||||
this.isOpen = isOpen;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getUid() {
|
||||
return uid;
|
||||
}
|
||||
|
||||
public GuardUserInfoModel setUid(String uid) {
|
||||
this.uid = uid;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getUserAvatar() {
|
||||
return userAvatar;
|
||||
}
|
||||
|
||||
public GuardUserInfoModel setUserAvatar(String userAvatar) {
|
||||
this.userAvatar = userAvatar;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getLiveuid() {
|
||||
return liveuid;
|
||||
}
|
||||
|
||||
public GuardUserInfoModel setLiveuid(String liveuid) {
|
||||
this.liveuid = liveuid;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getLiveAvatar() {
|
||||
return liveAvatar;
|
||||
}
|
||||
|
||||
public GuardUserInfoModel setLiveAvatar(String liveAvatar) {
|
||||
this.liveAvatar = liveAvatar;
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getGuardType() {
|
||||
return guardType;
|
||||
}
|
||||
|
||||
public GuardUserInfoModel setGuardType(int guardType) {
|
||||
this.guardType = guardType;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getExp() {
|
||||
return exp;
|
||||
}
|
||||
|
||||
public GuardUserInfoModel setExp(String exp) {
|
||||
this.exp = exp;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getLevel() {
|
||||
return level;
|
||||
}
|
||||
|
||||
public GuardUserInfoModel setLevel(String level) {
|
||||
this.level = level;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getEndtime() {
|
||||
return endtime;
|
||||
}
|
||||
|
||||
public GuardUserInfoModel setEndtime(String endtime) {
|
||||
this.endtime = endtime;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getUserLanguage() {
|
||||
return userLanguage;
|
||||
}
|
||||
|
||||
public GuardUserInfoModel setUserLanguage(String userLanguage) {
|
||||
this.userLanguage = userLanguage;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getLiveLanguage() {
|
||||
return liveLanguage;
|
||||
}
|
||||
|
||||
public GuardUserInfoModel setLiveLanguage(String liveLanguage) {
|
||||
this.liveLanguage = liveLanguage;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,229 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class LiveBattlePassRewardsBean extends BaseModel{
|
||||
private int level;
|
||||
private int is_received;
|
||||
private List<BattlePassType> live_battle_pass_type;
|
||||
private Map<Integer,Map<Integer,LiveBattlePassReward>> live_battle_pass_rewards;
|
||||
|
||||
public LiveBattlePassRewardsBean() {
|
||||
}
|
||||
|
||||
public int getIs_received() {
|
||||
return is_received;
|
||||
}
|
||||
|
||||
public void setIs_received(int is_received) {
|
||||
this.is_received = is_received;
|
||||
}
|
||||
|
||||
public int getLevel() {
|
||||
return level;
|
||||
}
|
||||
|
||||
public void setLevel(int level) {
|
||||
this.level = level;
|
||||
}
|
||||
|
||||
public List<BattlePassType> getLive_battle_pass_type() {
|
||||
return live_battle_pass_type;
|
||||
}
|
||||
|
||||
public void setLive_battle_pass_type(List<BattlePassType> live_battle_pass_type) {
|
||||
this.live_battle_pass_type = live_battle_pass_type;
|
||||
}
|
||||
|
||||
public Map<Integer,Map<Integer,LiveBattlePassReward>> getLive_battle_pass_rewards() {
|
||||
return live_battle_pass_rewards;
|
||||
}
|
||||
|
||||
public void setLive_battle_pass_rewards(Map<Integer,Map<Integer,LiveBattlePassReward>> live_battle_pass_rewards) {
|
||||
this.live_battle_pass_rewards = live_battle_pass_rewards;
|
||||
}
|
||||
|
||||
public static class BattlePassType extends BaseModel{
|
||||
private int id;
|
||||
private String battle_pass_name;
|
||||
private int sort;
|
||||
private int diamond_value;
|
||||
private int lock;
|
||||
|
||||
public BattlePassType() {
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getBattle_pass_name() {
|
||||
return battle_pass_name;
|
||||
}
|
||||
|
||||
public void setBattle_pass_name(String battle_pass_name) {
|
||||
this.battle_pass_name = battle_pass_name;
|
||||
}
|
||||
|
||||
public int getSort() {
|
||||
return sort;
|
||||
}
|
||||
|
||||
public void setSort(int sort) {
|
||||
this.sort = sort;
|
||||
}
|
||||
|
||||
public int getDiamond_value() {
|
||||
return diamond_value;
|
||||
}
|
||||
|
||||
public void setDiamond_value(int diamond_value) {
|
||||
this.diamond_value = diamond_value;
|
||||
}
|
||||
|
||||
public int getLock() {
|
||||
return lock;
|
||||
}
|
||||
|
||||
public void setLock(int lock) {
|
||||
this.lock = lock;
|
||||
}
|
||||
}
|
||||
public static class LiveBattlePassReward extends BaseModel{
|
||||
private int id;
|
||||
@SerializedName("live_battle_pass_level")
|
||||
private int liveBattlePassLevel;
|
||||
@SerializedName("live_battle_pass_type_id")
|
||||
private int liveBattlePassTypeId;
|
||||
@SerializedName("reward_name")
|
||||
private String rewardName;
|
||||
@SerializedName("image_url")
|
||||
private String imageUrl;
|
||||
@SerializedName("send_reward_type")
|
||||
private int sendRewardType;
|
||||
@SerializedName("send_gift_type")
|
||||
private int sendGiftType;
|
||||
@SerializedName("send_reward_needcoin")
|
||||
private String sendRewardNeedcoin;
|
||||
@SerializedName("send_reward_restrict_time")
|
||||
private String sendRewardRestrictTime;
|
||||
|
||||
private int lock;
|
||||
private int received;
|
||||
|
||||
public LiveBattlePassReward() {
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public int getLiveBattlePassLevel() {
|
||||
return liveBattlePassLevel;
|
||||
}
|
||||
|
||||
public void setLiveBattlePassLevel(int liveBattlePassLevel) {
|
||||
this.liveBattlePassLevel = liveBattlePassLevel;
|
||||
}
|
||||
|
||||
public int getLiveBattlePassTypeId() {
|
||||
return liveBattlePassTypeId;
|
||||
}
|
||||
|
||||
public void setLiveBattlePassTypeId(int liveBattlePassTypeId) {
|
||||
this.liveBattlePassTypeId = liveBattlePassTypeId;
|
||||
}
|
||||
|
||||
public String getRewardName() {
|
||||
return rewardName;
|
||||
}
|
||||
|
||||
public void setRewardName(String rewardName) {
|
||||
this.rewardName = rewardName;
|
||||
}
|
||||
|
||||
public String getImageUrl() {
|
||||
return imageUrl;
|
||||
}
|
||||
|
||||
public void setImageUrl(String imageUrl) {
|
||||
this.imageUrl = imageUrl;
|
||||
}
|
||||
|
||||
public int getLock() {
|
||||
return lock;
|
||||
}
|
||||
|
||||
public void setLock(int lock) {
|
||||
this.lock = lock;
|
||||
}
|
||||
|
||||
public int getReceived() {
|
||||
return received;
|
||||
}
|
||||
|
||||
public void setReceived(int received) {
|
||||
this.received = received;
|
||||
}
|
||||
|
||||
public int getSendRewardType() {
|
||||
return sendRewardType;
|
||||
}
|
||||
|
||||
public void setSendRewardType(int sendRewardType) {
|
||||
this.sendRewardType = sendRewardType;
|
||||
}
|
||||
|
||||
public int getSendGiftType() {
|
||||
return sendGiftType;
|
||||
}
|
||||
|
||||
public void setSendGiftType(int sendGiftType) {
|
||||
this.sendGiftType = sendGiftType;
|
||||
}
|
||||
|
||||
public String getSendRewardNeedcoin() {
|
||||
return sendRewardNeedcoin;
|
||||
}
|
||||
|
||||
public void setSendRewardNeedcoin(String sendRewardNeedcoin) {
|
||||
this.sendRewardNeedcoin = sendRewardNeedcoin;
|
||||
}
|
||||
|
||||
public String getSendRewardRestrictTime() {
|
||||
return sendRewardRestrictTime;
|
||||
}
|
||||
|
||||
public void setSendRewardRestrictTime(String sendRewardRestrictTime) {
|
||||
this.sendRewardRestrictTime = sendRewardRestrictTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "LiveBattlePassReward{" +
|
||||
"id=" + id +
|
||||
", liveBattlePassLevel=" + liveBattlePassLevel +
|
||||
", liveBattlePassTypeId=" + liveBattlePassTypeId +
|
||||
", rewardName='" + rewardName + '\'' +
|
||||
", imageUrl='" + imageUrl + '\'' +
|
||||
", sendRewardType=" + sendRewardType +
|
||||
", sendGiftType=" + sendGiftType +
|
||||
", sendRewardNeedcoin='" + sendRewardNeedcoin + '\'' +
|
||||
", sendRewardRestrictTime='" + sendRewardRestrictTime + '\'' +
|
||||
", lock=" + lock +
|
||||
", received=" + received +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -56,6 +56,18 @@ public class LiveBean implements Parcelable {
|
||||
private int redPacketStatus;
|
||||
@SerializedName("giftId")
|
||||
private String giftId;
|
||||
@SerializedName("sendMoneyLongStatus ")
|
||||
private int sendMoneyLongStatus ;
|
||||
|
||||
public int getSendMoneyLongStatus() {
|
||||
return sendMoneyLongStatus;
|
||||
}
|
||||
|
||||
public LiveBean setSendMoneyLongStatus(int sendMoneyLongStatus) {
|
||||
this.sendMoneyLongStatus = sendMoneyLongStatus;
|
||||
return this;
|
||||
}
|
||||
|
||||
private Map<String,String> params;//用于跳转Activity时扩展参数,例:从首页Banner跳转到直播间时需要根据携带参数判断是否弹出新人特惠对话框
|
||||
|
||||
public String getRecommendCardIconSizeTwo() {
|
||||
|
||||
@@ -20,6 +20,14 @@ public class LiveClassBean {
|
||||
@SerializedName("channel_show")
|
||||
private int channel_show;
|
||||
|
||||
public LiveClassBean() {
|
||||
}
|
||||
|
||||
public LiveClassBean(String chinese, String english) {
|
||||
this.chinese = chinese;
|
||||
this.english = english;
|
||||
}
|
||||
|
||||
public String getChinese() {
|
||||
return chinese;
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.yunbao.common.bean;
|
||||
import android.view.View;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
/**
|
||||
* Created by cxf on 2018/10/12.
|
||||
@@ -18,6 +19,8 @@ public class LiveGiftBean {
|
||||
// public static final int MARK_LUCK = 3;
|
||||
|
||||
private int id;
|
||||
@SerializedName("gift_id")
|
||||
private int gift_id;//包裹礼物id
|
||||
private int type;//0 普通礼物 1是贵族 2守护 3粉丝团 5盲盒礼物
|
||||
private int mark;// 0 普通 1热门 2守护 3幸运
|
||||
private String name;
|
||||
@@ -34,6 +37,7 @@ public class LiveGiftBean {
|
||||
private String isweek;
|
||||
private String end_time;
|
||||
private String tag;
|
||||
private boolean isPageGift;
|
||||
@JSONField(name = "blind_box_type")
|
||||
private int blind_box_type = 0;
|
||||
//礼物角标
|
||||
@@ -71,6 +75,14 @@ public class LiveGiftBean {
|
||||
@JSONField(name = "blind_box_ticket_id")
|
||||
private int blindBoxTicketId;
|
||||
|
||||
public boolean isPageGift() {
|
||||
return isPageGift;
|
||||
}
|
||||
|
||||
public void setPageGift(boolean pageGift) {
|
||||
isPageGift = pageGift;
|
||||
}
|
||||
|
||||
public int getBlindBoxTicketId() {
|
||||
return blindBoxTicketId;
|
||||
}
|
||||
@@ -80,6 +92,14 @@ public class LiveGiftBean {
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getGift_id() {
|
||||
return gift_id;
|
||||
}
|
||||
|
||||
public void setGift_id(int gift_id) {
|
||||
this.gift_id = gift_id;
|
||||
}
|
||||
|
||||
public int getBlindBoxTicket() {
|
||||
return blindBoxTicket;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class LivePkMicModel extends BaseModel {
|
||||
@SerializedName("pkuid")
|
||||
private String pkuid;
|
||||
@SerializedName("pkuname")
|
||||
private String pkuname;
|
||||
@SerializedName("pkuimg")
|
||||
private String pkuimg;
|
||||
|
||||
public String getPkuid() {
|
||||
return pkuid;
|
||||
}
|
||||
|
||||
public void setPkuid(String pkuid) {
|
||||
this.pkuid = pkuid;
|
||||
}
|
||||
|
||||
public String getPkuname() {
|
||||
return pkuname;
|
||||
}
|
||||
|
||||
public void setPkuname(String pkuname) {
|
||||
this.pkuname = pkuname;
|
||||
}
|
||||
|
||||
public String getPkuimg() {
|
||||
return pkuimg;
|
||||
}
|
||||
|
||||
public void setPkuimg(String pkuimg) {
|
||||
this.pkuimg = pkuimg;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class NewGuardLevelModel extends BaseModel{
|
||||
|
||||
@SerializedName("guard_type")
|
||||
private int guardType;
|
||||
@SerializedName("cn")
|
||||
private String cn;
|
||||
@SerializedName("en")
|
||||
private String en;
|
||||
|
||||
public int getGuardType() {
|
||||
return guardType;
|
||||
}
|
||||
|
||||
public void setGuardType(int guardType) {
|
||||
this.guardType = guardType;
|
||||
}
|
||||
|
||||
public String getCn() {
|
||||
return cn;
|
||||
}
|
||||
|
||||
public void setCn(String cn) {
|
||||
this.cn = cn;
|
||||
}
|
||||
|
||||
public String getEn() {
|
||||
return en;
|
||||
}
|
||||
|
||||
public void setEn(String en) {
|
||||
this.en = en;
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,6 @@ package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.utils.StringUtil;
|
||||
|
||||
import java.text.ParseException;
|
||||
@@ -22,6 +21,8 @@ public class OpenAdModel extends BaseModel {
|
||||
public static final int SHOW_ONE = 3;//3. 仅弹出一次;
|
||||
@SerializedName("id")
|
||||
private int id;
|
||||
@SerializedName("popup_name")
|
||||
private String name;
|
||||
@SerializedName("popup_location")
|
||||
private int type = TYPE_HOME;
|
||||
@SerializedName("activity_url")
|
||||
@@ -35,24 +36,27 @@ public class OpenAdModel extends BaseModel {
|
||||
@SerializedName("popup_model")
|
||||
private int model = MODEL_SQUARE;
|
||||
@SerializedName("start_show_time")
|
||||
private String startTime;//活动开始时间
|
||||
private String startTime;//活动开始时间 1
|
||||
@SerializedName("end_show_time")
|
||||
private String endTime;//活动结束时间
|
||||
private String endTime;//活动结束时间 5
|
||||
@SerializedName("popup_permission")
|
||||
private int permission;
|
||||
@SerializedName("popup_frequency")
|
||||
private int showModel = SHOW_DEF;//显示模式,1:杀死程序后弹出 2:指定时间内(本机时间) 3:1. 仅弹出一次
|
||||
@SerializedName("popup_frequency_time")
|
||||
private String section = "0";// SHOW_DEF = 2
|
||||
|
||||
private String section = "0";// SHOW_DEF = 2 1
|
||||
@SerializedName("popup_sort")
|
||||
private int popupSort = 1;//弹框类型 1.图片 2.H5
|
||||
@SerializedName("sort")
|
||||
private int sort = 0;
|
||||
|
||||
public OpenAdModel() {
|
||||
}
|
||||
|
||||
public static OpenAdModel createTestData() {
|
||||
OpenAdModel model = new OpenAdModel();
|
||||
model.id=3;
|
||||
model.type=1;
|
||||
model.id = 3;
|
||||
model.type = 1;
|
||||
model.url = "/h5/GuildTournament/20230821/rank.html";
|
||||
model.imageUrl = "https://ceshi.yaoulive.com/data/upload/20230913/1694589490.png";
|
||||
model.showTime = 10;
|
||||
@@ -66,6 +70,30 @@ public class OpenAdModel extends BaseModel {
|
||||
return model;
|
||||
}
|
||||
|
||||
public int getPopupSort() {
|
||||
return popupSort;
|
||||
}
|
||||
|
||||
public int getSort() {
|
||||
return sort;
|
||||
}
|
||||
|
||||
public void setSort(int sort) {
|
||||
this.sort = sort;
|
||||
}
|
||||
|
||||
public void setPopupSort(int popupSort) {
|
||||
this.popupSort = popupSort;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public int getShowModel() {
|
||||
return showModel;
|
||||
}
|
||||
@@ -91,10 +119,14 @@ public class OpenAdModel extends BaseModel {
|
||||
}
|
||||
|
||||
public String getUrl() {
|
||||
if (!url.startsWith("http://") || !url.startsWith("https://")) {
|
||||
url = CommonAppConfig.HOST + url;
|
||||
if (!url.startsWith("http://") && !url.startsWith("https://")) {
|
||||
url = CommonAppConfig.HOST + (url.startsWith("/") ? url : "/" + url);
|
||||
}
|
||||
return url + "?t=" + System.currentTimeMillis() / 1000;
|
||||
return url;
|
||||
}
|
||||
|
||||
public String getOriginalUrl() {
|
||||
return url;
|
||||
}
|
||||
|
||||
public void setUrl(String url) {
|
||||
@@ -195,6 +227,7 @@ public class OpenAdModel extends BaseModel {
|
||||
public String toString() {
|
||||
return "OpenAdModel{" +
|
||||
"id=" + id +
|
||||
", name='" + name + '\'' +
|
||||
", type=" + type +
|
||||
", url='" + url + '\'' +
|
||||
", imageUrl='" + imageUrl + '\'' +
|
||||
@@ -203,7 +236,10 @@ public class OpenAdModel extends BaseModel {
|
||||
", model=" + model +
|
||||
", startTime='" + startTime + '\'' +
|
||||
", endTime='" + endTime + '\'' +
|
||||
", permission='" + permission + '\'' +
|
||||
", permission=" + permission +
|
||||
", showModel=" + showModel +
|
||||
", section='" + section + '\'' +
|
||||
", sort=" + popupSort +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,4 +56,15 @@ public class PrankGiftBean extends BaseModel{
|
||||
public void setGiftId(String giftId) {
|
||||
this.giftId = giftId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "PrankGiftBean{" +
|
||||
"title='" + title + '\'' +
|
||||
", name='" + name + '\'' +
|
||||
", icon='" + icon + '\'' +
|
||||
", num=" + num +
|
||||
", giftId='" + giftId + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class PrankGiftResultBean extends BaseModel{
|
||||
private List<PrankGiftBean> prank_list;
|
||||
private String status;
|
||||
private String prank_type;
|
||||
|
||||
public List<PrankGiftBean> getPrank_list() {
|
||||
return prank_list;
|
||||
}
|
||||
|
||||
public void setPrank_list(List<PrankGiftBean> prank_list) {
|
||||
this.prank_list = prank_list;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getPrank_type() {
|
||||
return prank_type;
|
||||
}
|
||||
|
||||
public void setPrank_type(String prank_type) {
|
||||
this.prank_type = prank_type;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,176 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.JsonElement;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class PrankProgressBean extends BaseModel {
|
||||
private int status;//整蛊状态 0.关闭 1.开启
|
||||
private int prank_turntable_status;// 转盘整蛊状态 0=关闭 1=开启
|
||||
private int prank_type;// 整蛊类型 1.礼物整蛊 2.连击整蛊
|
||||
private List<PrankList> prank_list;// 整蛊进度
|
||||
private List<PrankList> completed_list;// 待完成的整蛊
|
||||
|
||||
public PrankProgressBean(){
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static class PrankList{
|
||||
private int gift_id;// 礼物ID
|
||||
private int gift_num;// 整蛊需要的礼物数量
|
||||
private String prank_content; // 整蛊内容
|
||||
private int send_num; // 用户已赠送的礼物数量
|
||||
private int completed_num;// 待完成的整蛊次数
|
||||
private String gift_name;// 礼物名称
|
||||
private String gift_icon; // 礼物图片链接
|
||||
|
||||
private String gift_name_en;
|
||||
|
||||
private int continuous_click_num;
|
||||
|
||||
public int getContinuous_click_num() {
|
||||
return continuous_click_num;
|
||||
}
|
||||
|
||||
public void setContinuous_click_num(int continuous_click_num) {
|
||||
this.continuous_click_num = continuous_click_num;
|
||||
}
|
||||
|
||||
public String getGift_name_en() {
|
||||
return gift_name_en;
|
||||
}
|
||||
|
||||
public void setGift_name_en(String gift_name_en) {
|
||||
this.gift_name_en = gift_name_en;
|
||||
}
|
||||
|
||||
public int getGift_id() {
|
||||
return gift_id;
|
||||
}
|
||||
|
||||
public void setGift_id(int gift_id) {
|
||||
this.gift_id = gift_id;
|
||||
}
|
||||
|
||||
public int getGift_num() {
|
||||
return gift_num;
|
||||
}
|
||||
|
||||
public void setGift_num(int gift_num) {
|
||||
this.gift_num = gift_num;
|
||||
}
|
||||
|
||||
public String getPrank_content() {
|
||||
return prank_content;
|
||||
}
|
||||
|
||||
public void setPrank_content(String prank_content) {
|
||||
this.prank_content = prank_content;
|
||||
}
|
||||
|
||||
public int getSend_num() {
|
||||
return send_num;
|
||||
}
|
||||
|
||||
public void setSend_num(int send_num) {
|
||||
this.send_num = send_num;
|
||||
}
|
||||
|
||||
public int getCompleted_num() {
|
||||
return completed_num;
|
||||
}
|
||||
|
||||
public void setCompleted_num(int completed_num) {
|
||||
this.completed_num = completed_num;
|
||||
}
|
||||
|
||||
public String getGift_name() {
|
||||
return gift_name;
|
||||
}
|
||||
|
||||
public void setGift_name(String gift_name) {
|
||||
this.gift_name = gift_name;
|
||||
}
|
||||
|
||||
public String getGift_icon() {
|
||||
return gift_icon;
|
||||
}
|
||||
|
||||
public void setGift_icon(String gift_icon) {
|
||||
this.gift_icon = gift_icon;
|
||||
}
|
||||
|
||||
//计算完成度
|
||||
public double getCompletionRate() {
|
||||
if (gift_num == 0) return 0; // Avoid division by zero
|
||||
return (double) send_num / gift_num;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "PrankList{" +
|
||||
"gift_id=" + gift_id +
|
||||
", gift_num=" + gift_num +
|
||||
", prank_content='" + prank_content + '\'' +
|
||||
", send_num=" + send_num +
|
||||
", completed_num=" + completed_num +
|
||||
", gift_name='" + gift_name + '\'' +
|
||||
", gift_icon='" + gift_icon + '\'' +
|
||||
", gift_name_en='" + gift_name_en + '\'' +
|
||||
", continuous_click_num=" + continuous_click_num +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
||||
public int getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(int status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public int getPrank_type() {
|
||||
return prank_type;
|
||||
}
|
||||
|
||||
public void setPrank_type(int prank_type) {
|
||||
this.prank_type = prank_type;
|
||||
}
|
||||
|
||||
public List<PrankList> getPrank_list() {
|
||||
return prank_list;
|
||||
}
|
||||
|
||||
public void setPrank_list(List<PrankList> prank_list) {
|
||||
this.prank_list = prank_list;
|
||||
}
|
||||
|
||||
public List<PrankList> getCompleted_list() {
|
||||
return completed_list;
|
||||
}
|
||||
|
||||
public void setCompleted_list(List<PrankList> completed_list) {
|
||||
this.completed_list = completed_list;
|
||||
}
|
||||
|
||||
public int getPrank_turntable_status() {
|
||||
return prank_turntable_status;
|
||||
}
|
||||
|
||||
public void setPrank_turntable_status(int prank_turntable_status) {
|
||||
this.prank_turntable_status = prank_turntable_status;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "PrankProgressBean{" +
|
||||
"status=" + status +
|
||||
", prank_turntable_status=" + prank_turntable_status +
|
||||
", prank_type=" + prank_type +
|
||||
", prank_list=" + prank_list +
|
||||
", completed_list=" + completed_list +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
16
common/src/main/java/com/yunbao/common/bean/QiniuLog.java
Normal file
16
common/src/main/java/com/yunbao/common/bean/QiniuLog.java
Normal file
@@ -0,0 +1,16 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
|
||||
public class QiniuLog extends BaseModel{
|
||||
@JSONField(name = "log_type")
|
||||
private int log_type;
|
||||
|
||||
public int getLog_type() {
|
||||
return log_type;
|
||||
}
|
||||
|
||||
public void setLog_type(int log_type) {
|
||||
this.log_type = log_type;
|
||||
}
|
||||
}
|
||||
@@ -49,6 +49,16 @@ public class RedPacketInfoModel extends BaseModel {
|
||||
//超级红包ID
|
||||
@SerializedName("super_jackpot_id")
|
||||
private String superJackpotId;
|
||||
@SerializedName("red_packet_type")
|
||||
private int redPacketType;// 1.普通红包 2.特殊红包
|
||||
|
||||
public int getRedPacketType() {
|
||||
return redPacketType;
|
||||
}
|
||||
|
||||
public void setRedPacketType(int redPacketType) {
|
||||
this.redPacketType = redPacketType;
|
||||
}
|
||||
|
||||
public String getSuperJackpotId() {
|
||||
return superJackpotId;
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class RewardsModel extends BaseModel {
|
||||
@SerializedName("id")
|
||||
private int id;
|
||||
@SerializedName("reward_name")
|
||||
private String rewardName;
|
||||
@SerializedName("image_path")
|
||||
private String imagePath;
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public RewardsModel setId(int id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getRewardName() {
|
||||
return rewardName;
|
||||
}
|
||||
|
||||
public RewardsModel setRewardName(String rewardName) {
|
||||
this.rewardName = rewardName;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getImagePath() {
|
||||
return imagePath;
|
||||
}
|
||||
|
||||
public RewardsModel setImagePath(String imagePath) {
|
||||
this.imagePath = imagePath;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class RoomMicStatusModel extends BaseModel{
|
||||
|
||||
@SerializedName("mic_status")
|
||||
private String micStatus;
|
||||
@SerializedName("im_status")
|
||||
private String imStatus;
|
||||
|
||||
public String getMicStatus() {
|
||||
return micStatus;
|
||||
}
|
||||
|
||||
public void setMicStatus(String micStatus) {
|
||||
this.micStatus = micStatus;
|
||||
}
|
||||
|
||||
public String getImStatus() {
|
||||
return imStatus;
|
||||
}
|
||||
|
||||
public void setImStatus(String imStatus) {
|
||||
this.imStatus = imStatus;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,137 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class SendMoneyLongModel extends BaseModel {
|
||||
/**
|
||||
* {
|
||||
* "_method_": "SendMoneyLong",
|
||||
* "action": "0",
|
||||
* "uid": "98888",
|
||||
* "user_nicename": "周末暴打小朋友",
|
||||
* "user_avatar": "https://downs.yaoulive.com/mannine.png",
|
||||
* "liveuid": "98889",
|
||||
* "add_time": 1710318757,
|
||||
* "gold_num": "5000"
|
||||
* "countdown": 300 // 倒计时
|
||||
* "send_money_long_key": "1710384258446",
|
||||
* }
|
||||
*/
|
||||
|
||||
@SerializedName("_method_")
|
||||
private String method;
|
||||
@SerializedName("action")
|
||||
private String action;
|
||||
@SerializedName("uid")
|
||||
private String uid;
|
||||
@SerializedName("user_nicename")
|
||||
private String userNicename;
|
||||
@SerializedName("user_avatar")
|
||||
private String userAvatar;
|
||||
@SerializedName("liveuid")
|
||||
private String liveuid;
|
||||
@SerializedName("add_time")
|
||||
private String addTime;
|
||||
@SerializedName("gold_num")
|
||||
private String goldNum;
|
||||
@SerializedName("countdown")
|
||||
private String countdown;
|
||||
@SerializedName("send_money_long_key")
|
||||
private String sendMoneyLongKey;
|
||||
|
||||
public String getSendMoneyLongKey() {
|
||||
return sendMoneyLongKey;
|
||||
}
|
||||
|
||||
public SendMoneyLongModel setSendMoneyLongKey(String sendMoneyLongKey) {
|
||||
this.sendMoneyLongKey = sendMoneyLongKey;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCountdown() {
|
||||
return countdown;
|
||||
}
|
||||
|
||||
public SendMoneyLongModel setCountdown(String countdown) {
|
||||
this.countdown = countdown;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getMethod() {
|
||||
return method;
|
||||
}
|
||||
|
||||
public void setMethod(String method) {
|
||||
this.method = method;
|
||||
}
|
||||
|
||||
public String getAction() {
|
||||
return action;
|
||||
}
|
||||
|
||||
public void setAction(String action) {
|
||||
this.action = action;
|
||||
}
|
||||
|
||||
public String getUid() {
|
||||
return uid;
|
||||
}
|
||||
|
||||
public void setUid(String uid) {
|
||||
this.uid = uid;
|
||||
}
|
||||
|
||||
public String getUserNicename() {
|
||||
return userNicename;
|
||||
}
|
||||
|
||||
public void setUserNicename(String userNicename) {
|
||||
this.userNicename = userNicename;
|
||||
}
|
||||
|
||||
public String getUserAvatar() {
|
||||
return userAvatar;
|
||||
}
|
||||
|
||||
public void setUserAvatar(String userAvatar) {
|
||||
this.userAvatar = userAvatar;
|
||||
}
|
||||
|
||||
public String getLiveuid() {
|
||||
return liveuid;
|
||||
}
|
||||
|
||||
public void setLiveuid(String liveuid) {
|
||||
this.liveuid = liveuid;
|
||||
}
|
||||
|
||||
public String getAddTime() {
|
||||
return addTime;
|
||||
}
|
||||
|
||||
public void setAddTime(String addTime) {
|
||||
this.addTime = addTime;
|
||||
}
|
||||
|
||||
public String getGoldNum() {
|
||||
return goldNum;
|
||||
}
|
||||
|
||||
public void setGoldNum(String goldNum) {
|
||||
this.goldNum = goldNum;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "SendMoneyLongModel{" +
|
||||
"method='" + method + '\'' +
|
||||
", action='" + action + '\'' +
|
||||
", uid='" + uid + '\'' +
|
||||
", userNicename='" + userNicename + '\'' +
|
||||
", userAvatar='" + userAvatar + '\'' +
|
||||
", liveuid='" + liveuid + '\'' +
|
||||
", addTime=" + addTime +
|
||||
", goldNum='" + goldNum + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,154 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class SendMoneyLongStatusModel extends BaseModel {
|
||||
/**
|
||||
* "sendMoneyLongStatus": { // 未查询到数据时为空数组
|
||||
* "liveuid": "98889", // 主播ID
|
||||
* "uid": "98888", // 发起用户ID
|
||||
* "addtime": "1710384258446", // 开始时间 毫秒时间戳
|
||||
* "gold_num": "5000", // 金豆数量
|
||||
* "user_nicename": "周末暴打小朋友", // 用户昵称
|
||||
* "user_avatar": "https://downs.yaoulive.com/mannine.png", // 用户头像链接
|
||||
* "countdown": 300 // 倒计时
|
||||
* "start_status": false,
|
||||
* "start_time": "",
|
||||
* "send_money_long_key": "1710397575473",
|
||||
* "participate": 0,
|
||||
* "add_time": "1710397575473"
|
||||
* }
|
||||
*/
|
||||
@SerializedName("liveuid")
|
||||
private String liveuid;
|
||||
@SerializedName("uid")
|
||||
private String uid;
|
||||
@SerializedName("addtime")
|
||||
private String addtime;
|
||||
@SerializedName("gold_num")
|
||||
private String goldNum;
|
||||
@SerializedName("user_nicename")
|
||||
private String userNicename;
|
||||
@SerializedName("user_avatar")
|
||||
private String userAvatar;
|
||||
@SerializedName("countdown")
|
||||
private String countdown;
|
||||
@SerializedName("start_status")
|
||||
private String startStatus;
|
||||
@SerializedName("start_time")
|
||||
private String startTime;
|
||||
@SerializedName("send_money_long_key")
|
||||
private String sendMoneyLongKey;
|
||||
@SerializedName("participate")
|
||||
private String participate;
|
||||
@SerializedName("add_time")
|
||||
private String addTime;
|
||||
|
||||
public String getLiveuid() {
|
||||
return liveuid;
|
||||
}
|
||||
|
||||
public SendMoneyLongStatusModel setLiveuid(String liveuid) {
|
||||
this.liveuid = liveuid;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getUid() {
|
||||
return uid;
|
||||
}
|
||||
|
||||
public SendMoneyLongStatusModel setUid(String uid) {
|
||||
this.uid = uid;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getAddtime() {
|
||||
return addtime;
|
||||
}
|
||||
|
||||
public SendMoneyLongStatusModel setAddtime(String addtime) {
|
||||
this.addtime = addtime;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGoldNum() {
|
||||
return goldNum;
|
||||
}
|
||||
|
||||
public SendMoneyLongStatusModel setGoldNum(String goldNum) {
|
||||
this.goldNum = goldNum;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getUserNicename() {
|
||||
return userNicename;
|
||||
}
|
||||
|
||||
public SendMoneyLongStatusModel setUserNicename(String userNicename) {
|
||||
this.userNicename = userNicename;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getUserAvatar() {
|
||||
return userAvatar;
|
||||
}
|
||||
|
||||
public SendMoneyLongStatusModel setUserAvatar(String userAvatar) {
|
||||
this.userAvatar = userAvatar;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCountdown() {
|
||||
return countdown;
|
||||
}
|
||||
|
||||
public SendMoneyLongStatusModel setCountdown(String countdown) {
|
||||
this.countdown = countdown;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getStartStatus() {
|
||||
return startStatus;
|
||||
}
|
||||
|
||||
public SendMoneyLongStatusModel setStartStatus(String startStatus) {
|
||||
this.startStatus = startStatus;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getStartTime() {
|
||||
return startTime;
|
||||
}
|
||||
|
||||
public SendMoneyLongStatusModel setStartTime(String startTime) {
|
||||
this.startTime = startTime;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getSendMoneyLongKey() {
|
||||
return sendMoneyLongKey;
|
||||
}
|
||||
|
||||
public SendMoneyLongStatusModel setSendMoneyLongKey(String sendMoneyLongKey) {
|
||||
this.sendMoneyLongKey = sendMoneyLongKey;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getParticipate() {
|
||||
return participate;
|
||||
}
|
||||
|
||||
public SendMoneyLongStatusModel setParticipate(String participate) {
|
||||
this.participate = participate;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getAddTime() {
|
||||
return addTime;
|
||||
}
|
||||
|
||||
public SendMoneyLongStatusModel setAddTime(String addTime) {
|
||||
this.addTime = addTime;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
public class SudGameChatImModel extends BaseModel {
|
||||
//昵称
|
||||
private String nickname;
|
||||
//文字消息
|
||||
private String textMessage;
|
||||
|
||||
private boolean welcomMessage;
|
||||
|
||||
public boolean isWelcomMessage() {
|
||||
return welcomMessage;
|
||||
}
|
||||
|
||||
public SudGameChatImModel setWelcomMessage(boolean welcomMessage) {
|
||||
this.welcomMessage = welcomMessage;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getNickname() {
|
||||
return nickname;
|
||||
}
|
||||
|
||||
public SudGameChatImModel setNickname(String nickname) {
|
||||
this.nickname = nickname;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getTextMessage() {
|
||||
return textMessage;
|
||||
}
|
||||
|
||||
public SudGameChatImModel setTextMessage(String textMessage) {
|
||||
this.textMessage = textMessage;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
public class SudGameInfoBean {
|
||||
private String uid;//玩家id
|
||||
private String nick_name;//玩家昵称
|
||||
private String avatar_url;//玩家头像
|
||||
private String gender;//玩家性别
|
||||
private int is_ai;//是否是ai
|
||||
|
||||
public String getUid() {
|
||||
return uid;
|
||||
}
|
||||
|
||||
public void setUid(String uid) {
|
||||
this.uid = uid;
|
||||
}
|
||||
|
||||
public String getNick_name() {
|
||||
return nick_name;
|
||||
}
|
||||
|
||||
public void setNick_name(String nick_name) {
|
||||
this.nick_name = nick_name;
|
||||
}
|
||||
|
||||
public String getAvatar_url() {
|
||||
return avatar_url;
|
||||
}
|
||||
|
||||
public void setAvatar_url(String avatar_url) {
|
||||
this.avatar_url = avatar_url;
|
||||
}
|
||||
|
||||
public String getGender() {
|
||||
return gender;
|
||||
}
|
||||
|
||||
public void setGender(String gender) {
|
||||
this.gender = gender;
|
||||
}
|
||||
|
||||
public int getIs_ai() {
|
||||
return is_ai;
|
||||
}
|
||||
|
||||
public void setIs_ai(int is_ai) {
|
||||
this.is_ai = is_ai;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "SudGameInfoBean{" +
|
||||
"uid=" + uid +
|
||||
", nick_name='" + nick_name + '\'' +
|
||||
", avatar_url='" + avatar_url + '\'' +
|
||||
", gender='" + gender + '\'' +
|
||||
", is_ai=" + is_ai +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
public class SudGameScoreBean extends BaseModel{
|
||||
private int golden_bean_remaining_balance;//
|
||||
private int room_sill;//房间的金豆门槛
|
||||
private int room_ticket;//收取的门票费
|
||||
private int room_win_num;//赢家获得的金豆
|
||||
private int game_mode;//1.双人对战 2.多人游戏
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "SudGameScoreBean{" +
|
||||
"golden_bean_remaining_balance=" + golden_bean_remaining_balance +
|
||||
", room_sill=" + room_sill +
|
||||
", room_ticket=" + room_ticket +
|
||||
", room_win_num=" + room_win_num +
|
||||
", game_mode=" + game_mode +
|
||||
'}';
|
||||
}
|
||||
|
||||
public int getGame_mode() {
|
||||
return game_mode;
|
||||
}
|
||||
|
||||
public void setGame_mode(int game_mode) {
|
||||
this.game_mode = game_mode;
|
||||
}
|
||||
|
||||
public int getGolden_bean_remaining_balance() {
|
||||
return golden_bean_remaining_balance;
|
||||
}
|
||||
|
||||
public void setGolden_bean_remaining_balance(int golden_bean_remaining_balance) {
|
||||
this.golden_bean_remaining_balance = golden_bean_remaining_balance;
|
||||
}
|
||||
|
||||
public int getRoom_sill() {
|
||||
return room_sill;
|
||||
}
|
||||
|
||||
public void setRoom_sill(int room_sill) {
|
||||
this.room_sill = room_sill;
|
||||
}
|
||||
|
||||
public int getRoom_ticket() {
|
||||
return room_ticket;
|
||||
}
|
||||
|
||||
public void setRoom_ticket(int room_ticket) {
|
||||
this.room_ticket = room_ticket;
|
||||
}
|
||||
|
||||
public int getRoom_win_num() {
|
||||
return room_win_num;
|
||||
}
|
||||
|
||||
public void setRoom_win_num(int room_win_num) {
|
||||
this.room_win_num = room_win_num;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class SudGameUserModel extends BaseModel {
|
||||
private boolean nullUser;
|
||||
@SerializedName("user_nicename")
|
||||
private String userNicename;
|
||||
@SerializedName("avatar")
|
||||
private String avatar;
|
||||
@SerializedName("sex")
|
||||
private int sex;
|
||||
@SerializedName("id")
|
||||
private int id;
|
||||
@SerializedName("mic_status")
|
||||
private int micStatus; //麦克风状态 2.打开麦克风 3.关闭麦克风
|
||||
@SerializedName("game_status")
|
||||
private String gameStatus;// 游戏状态 1.未在游戏状态 2.游戏中;
|
||||
|
||||
public String getGameStatus() {
|
||||
return gameStatus;
|
||||
}
|
||||
|
||||
public boolean isGameIng() {
|
||||
return TextUtils.equals(getGameStatus(), "2") ;
|
||||
}
|
||||
|
||||
public SudGameUserModel setGameStatus(String gameStatus) {
|
||||
this.gameStatus = gameStatus;
|
||||
return this;
|
||||
}
|
||||
|
||||
private boolean mute = false;
|
||||
|
||||
public boolean isMute() {
|
||||
return mute;
|
||||
}
|
||||
|
||||
public SudGameUserModel setMute(boolean mute) {
|
||||
this.mute = mute;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isNullUser() {
|
||||
return nullUser;
|
||||
}
|
||||
|
||||
public SudGameUserModel setNullUser(boolean nullUser) {
|
||||
this.nullUser = nullUser;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getUserNicename() {
|
||||
return userNicename;
|
||||
}
|
||||
|
||||
public SudGameUserModel setUserNicename(String userNicename) {
|
||||
this.userNicename = userNicename;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getAvatar() {
|
||||
return avatar;
|
||||
}
|
||||
|
||||
public SudGameUserModel setAvatar(String avatar) {
|
||||
this.avatar = avatar;
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getSex() {
|
||||
return sex;
|
||||
}
|
||||
|
||||
public SudGameUserModel setSex(int sex) {
|
||||
this.sex = sex;
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public SudGameUserModel setId(int id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getMicStatus() {
|
||||
return micStatus;
|
||||
}
|
||||
|
||||
public SudGameUserModel setMicStatus(int micStatus) {
|
||||
this.micStatus = micStatus;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class SudSettleBean {
|
||||
private String uid;//玩家id
|
||||
private String nick_name;//玩家昵称
|
||||
private String avatar_url;//玩家头像
|
||||
private int rank;//玩家排名
|
||||
private int win_num;//赢得或者失去的金豆
|
||||
|
||||
public String getUid() {
|
||||
return uid;
|
||||
}
|
||||
|
||||
public void setUid(String uid) {
|
||||
this.uid = uid;
|
||||
}
|
||||
|
||||
public String getNick_name() {
|
||||
return nick_name;
|
||||
}
|
||||
|
||||
public void setNick_name(String nick_name) {
|
||||
this.nick_name = nick_name;
|
||||
}
|
||||
|
||||
public String getAvatar_url() {
|
||||
return avatar_url;
|
||||
}
|
||||
|
||||
public void setAvatar_url(String avatar_url) {
|
||||
this.avatar_url = avatar_url;
|
||||
}
|
||||
|
||||
public int getRank() {
|
||||
return rank;
|
||||
}
|
||||
|
||||
public void setRank(int rank) {
|
||||
this.rank = rank;
|
||||
}
|
||||
|
||||
public int getWin_num() {
|
||||
return win_num;
|
||||
}
|
||||
|
||||
public void setWin_num(int win_num) {
|
||||
this.win_num = win_num;
|
||||
}
|
||||
|
||||
|
||||
public SudSettleBean(String uid, String nick_name, String avatar_url, int rank, int win_num) {
|
||||
this.uid = uid;
|
||||
this.nick_name = nick_name;
|
||||
this.avatar_url = avatar_url;
|
||||
this.rank = rank;
|
||||
this.win_num = win_num;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "SudSettleBean{" +
|
||||
"uid='" + uid + '\'' +
|
||||
", nick_name='" + nick_name + '\'' +
|
||||
", avatar_url='" + avatar_url + '\'' +
|
||||
", rank=" + rank +
|
||||
", win_num=" + win_num +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
/**
|
||||
* 声网token
|
||||
*/
|
||||
public class SwTokenModel extends BaseModel {
|
||||
private String token;
|
||||
|
||||
public SwTokenModel() {
|
||||
}
|
||||
|
||||
public SwTokenModel(String token) {
|
||||
this.token = token;
|
||||
}
|
||||
|
||||
public String getToken() {
|
||||
return token;
|
||||
}
|
||||
|
||||
public void setToken(String token) {
|
||||
this.token = token;
|
||||
}
|
||||
}
|
||||
@@ -865,11 +865,20 @@ public class UserBean implements Parcelable {
|
||||
private String medal;
|
||||
private String bubble;
|
||||
private String medal_new;
|
||||
private String medal_new_en;
|
||||
|
||||
public String getMedal_new() {
|
||||
return medal_new;
|
||||
}
|
||||
|
||||
public String getMedal_new_en() {
|
||||
return medal_new_en;
|
||||
}
|
||||
|
||||
public void setMedal_new_en(String medal_new_en) {
|
||||
this.medal_new_en = medal_new_en;
|
||||
}
|
||||
|
||||
public void setMedal_new(String medal_new) {
|
||||
this.medal_new = medal_new;
|
||||
}
|
||||
@@ -898,6 +907,66 @@ public class UserBean implements Parcelable {
|
||||
this.bubble = bubble;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "UserBean{" +
|
||||
"id='" + id + '\'' +
|
||||
", userNiceName='" + userNiceName + '\'' +
|
||||
", avatar='" + avatar + '\'' +
|
||||
", avatarThumb='" + avatarThumb + '\'' +
|
||||
", sex=" + sex +
|
||||
", signature='" + signature + '\'' +
|
||||
", coin='" + coin + '\'' +
|
||||
", gold='" + gold + '\'' +
|
||||
", votes='" + votes + '\'' +
|
||||
", consumption='" + consumption + '\'' +
|
||||
", votestotal='" + votestotal + '\'' +
|
||||
", province='" + province + '\'' +
|
||||
", city='" + city + '\'' +
|
||||
", location='" + location + '\'' +
|
||||
", birthday='" + birthday + '\'' +
|
||||
", level=" + level +
|
||||
", levelAnchor=" + levelAnchor +
|
||||
", lives=" + lives +
|
||||
", follows=" + follows +
|
||||
", fans=" + fans +
|
||||
", vip=" + vip +
|
||||
", liang=" + liang +
|
||||
", car=" + car +
|
||||
", medal_level=" + medal_level +
|
||||
", medal_name='" + medal_name + '\'' +
|
||||
", Dress=" + Dress +
|
||||
", noble_id='" + noble_id + '\'' +
|
||||
", yuanbao='" + yuanbao + '\'' +
|
||||
", noble_name='" + noble_name + '\'' +
|
||||
", islive='" + islive + '\'' +
|
||||
", medal_no_display_src='" + medal_no_display_src + '\'' +
|
||||
", hot_num='" + hot_num + '\'' +
|
||||
", goodnum='" + goodnum + '\'' +
|
||||
", fans_pic='" + fans_pic + '\'' +
|
||||
", gifticon='" + gifticon + '\'' +
|
||||
", department_name='" + department_name + '\'' +
|
||||
", token_rong='" + token_rong + '\'' +
|
||||
", noble_end_time='" + noble_end_time + '\'' +
|
||||
", slide='" + slide + '\'' +
|
||||
", users_type='" + users_type + '\'' +
|
||||
", is_bind='" + is_bind + '\'' +
|
||||
", mobile='" + mobile + '\'' +
|
||||
", front_task='" + front_task + '\'' +
|
||||
", is_admin='" + is_admin + '\'' +
|
||||
", praise=" + praise +
|
||||
", isHide=" + isHide +
|
||||
", randomPk=" + randomPk +
|
||||
", mRankPkImgUrl='" + mRankPkImgUrl + '\'' +
|
||||
", user_info_complete=" + user_info_complete +
|
||||
", fansLevel=" + fansLevel +
|
||||
", typeMic=" + typeMic +
|
||||
", isMicList=" + isMicList +
|
||||
", isRequest=" + isRequest +
|
||||
", fansEnterRoomUrl='" + fansEnterRoomUrl + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,154 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class sendMoneyLongListModel extends BaseModel {
|
||||
/**
|
||||
* {
|
||||
* "liveuid": "98889", // 主播ID
|
||||
* "uid": "98888", // 用户ID
|
||||
* "addtime": "1710397350011", // 创建时间 毫秒时间戳
|
||||
* "gold_num": "5000", // 金豆数量
|
||||
* "user_nicename": "周末暴打小朋友", // 用户昵称
|
||||
* "user_avatar": "https://downs.yaoulive.com/mannine.png", // 用户头像
|
||||
* "countdown": 300, // 倒计时
|
||||
* "start_status": false,
|
||||
* "start_time": "",
|
||||
* "send_money_long_key": "1710397485729",
|
||||
* "participate": 0, // 是否参与活动 0.未参与 1.已参与
|
||||
* "add_time": "1710397485729"
|
||||
* }
|
||||
*/
|
||||
@SerializedName("liveuid")
|
||||
private String liveuid;
|
||||
@SerializedName("uid")
|
||||
private String uid;
|
||||
@SerializedName("addtime")
|
||||
private String addtime;
|
||||
@SerializedName("gold_num")
|
||||
private String goldNum;
|
||||
@SerializedName("user_nicename")
|
||||
private String userNicename;
|
||||
@SerializedName("user_avatar")
|
||||
private String userAvatar;
|
||||
@SerializedName("countdown")
|
||||
private String countdown;
|
||||
@SerializedName("start_status")
|
||||
private boolean startStatus;
|
||||
@SerializedName("start_time")
|
||||
private String startTime;
|
||||
@SerializedName("send_money_long_key")
|
||||
private String sendMoneyLongKey;
|
||||
@SerializedName("participate")
|
||||
private String participate;
|
||||
@SerializedName("add_time")
|
||||
private String addTime;
|
||||
|
||||
public String getLiveuid() {
|
||||
return liveuid;
|
||||
}
|
||||
|
||||
public sendMoneyLongListModel setLiveuid(String liveuid) {
|
||||
this.liveuid = liveuid;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getUid() {
|
||||
return uid;
|
||||
}
|
||||
|
||||
public sendMoneyLongListModel setUid(String uid) {
|
||||
this.uid = uid;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getAddtime() {
|
||||
return addtime;
|
||||
}
|
||||
|
||||
public sendMoneyLongListModel setAddtime(String addtime) {
|
||||
this.addtime = addtime;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGoldNum() {
|
||||
return goldNum;
|
||||
}
|
||||
|
||||
public sendMoneyLongListModel setGoldNum(String goldNum) {
|
||||
this.goldNum = goldNum;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getUserNicename() {
|
||||
return userNicename;
|
||||
}
|
||||
|
||||
public sendMoneyLongListModel setUserNicename(String userNicename) {
|
||||
this.userNicename = userNicename;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getUserAvatar() {
|
||||
return userAvatar;
|
||||
}
|
||||
|
||||
public sendMoneyLongListModel setUserAvatar(String userAvatar) {
|
||||
this.userAvatar = userAvatar;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCountdown() {
|
||||
return countdown;
|
||||
}
|
||||
|
||||
public sendMoneyLongListModel setCountdown(String countdown) {
|
||||
this.countdown = countdown;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isStartStatus() {
|
||||
return startStatus;
|
||||
}
|
||||
|
||||
public sendMoneyLongListModel setStartStatus(boolean startStatus) {
|
||||
this.startStatus = startStatus;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getStartTime() {
|
||||
return startTime;
|
||||
}
|
||||
|
||||
public sendMoneyLongListModel setStartTime(String startTime) {
|
||||
this.startTime = startTime;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getSendMoneyLongKey() {
|
||||
return sendMoneyLongKey;
|
||||
}
|
||||
|
||||
public sendMoneyLongListModel setSendMoneyLongKey(String sendMoneyLongKey) {
|
||||
this.sendMoneyLongKey = sendMoneyLongKey;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getParticipate() {
|
||||
return participate;
|
||||
}
|
||||
|
||||
public sendMoneyLongListModel setParticipate(String participate) {
|
||||
this.participate = participate;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getAddTime() {
|
||||
return addTime;
|
||||
}
|
||||
|
||||
public sendMoneyLongListModel setAddTime(String addTime) {
|
||||
this.addTime = addTime;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
package com.yunbao.common.custom;
|
||||
|
||||
import android.view.View;
|
||||
|
||||
import androidx.core.view.ViewCompat;
|
||||
|
||||
import com.stx.xhb.androidx.transformers.BasePageTransformer;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
|
||||
public class LiveGuardScalePageTransformer extends BasePageTransformer {
|
||||
/**
|
||||
* author: xiaohaibin.
|
||||
* time: 2018/10/9
|
||||
* mail:xhb_199409@163.com
|
||||
* github:https://github.com/xiaohaibin
|
||||
* describe: 适用于一屏显示多个模式
|
||||
*/
|
||||
private float mMinScale = 0.85f;
|
||||
private float mMinAlpha = 1f;
|
||||
|
||||
public LiveGuardScalePageTransformer() {
|
||||
}
|
||||
|
||||
public LiveGuardScalePageTransformer(float minAlpha, float minScale) {
|
||||
setMinAlpha(minAlpha);
|
||||
setMinScale(minScale);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleInvisiblePage(View view, float position) {
|
||||
ViewCompat.setAlpha(view, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleLeftPage(View view, float position) {
|
||||
float scale = Math.max(mMinScale, 1 + position);
|
||||
float vertMargin = view.getHeight() * (1 - scale) / 2;
|
||||
float horzMargin = view.getWidth() * (1 - scale) / 2;
|
||||
view.setTranslationX(horzMargin - vertMargin / 2);
|
||||
view.setScaleX(scale);
|
||||
view.setScaleY( scale);
|
||||
view.setAlpha( mMinAlpha + (scale - mMinScale) / (1 - mMinScale) * (1 - mMinAlpha));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleRightPage(View view, float position) {
|
||||
float scale = Math.max(mMinScale, 1 - position);
|
||||
float vertMargin = view.getHeight() * (1 - scale) / 2;
|
||||
float horzMargin = view.getWidth() * (1 - scale) / 2;
|
||||
view.setTranslationX( -horzMargin + vertMargin / 2);
|
||||
view.setScaleX( scale);
|
||||
|
||||
view.setScaleY( scale);
|
||||
view.setAlpha( mMinAlpha + (scale - mMinScale) / (1 - mMinScale) * (1 - mMinAlpha));
|
||||
}
|
||||
|
||||
public void setMinAlpha(float minAlpha) {
|
||||
if (minAlpha >= 0.6f && minAlpha <= 1.0f) {
|
||||
mMinAlpha = minAlpha;
|
||||
}
|
||||
}
|
||||
|
||||
public void setMinScale(float minScale) {
|
||||
if (minScale >= 0.6f && minScale <= 1.0f) {
|
||||
mMinScale = minScale;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -24,6 +24,11 @@ public abstract class AbsDialogCenterPopupWindow extends CenterPopupView {
|
||||
public abstract void buildDialog(XPopup.Builder builder);
|
||||
public abstract int bindLayoutId();
|
||||
|
||||
@Override
|
||||
protected void onShow() {
|
||||
super.onShow();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getImplLayoutId() {
|
||||
return bindLayoutId();
|
||||
@@ -36,4 +41,24 @@ public abstract class AbsDialogCenterPopupWindow extends CenterPopupView {
|
||||
buildDialog(builder);
|
||||
builder.asCustom(this).show();
|
||||
}
|
||||
|
||||
/**
|
||||
* Dismiss监听
|
||||
*/
|
||||
private OnDismissListener onDismissListener;
|
||||
public interface OnDismissListener{
|
||||
void onDismiss();
|
||||
}
|
||||
|
||||
public void setOnDismissListener(OnDismissListener onDismissListener) {
|
||||
this.onDismissListener = onDismissListener;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDismiss() {
|
||||
super.onDismiss();
|
||||
if (onDismissListener != null){
|
||||
onDismissListener.onDismiss();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
package com.yunbao.common.dialog;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.text.Spannable;
|
||||
import android.text.SpannableString;
|
||||
import android.text.style.ImageSpan;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.lxj.xpopup.XPopup;
|
||||
import com.lxj.xpopup.core.CenterPopupView;
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.utils.DeviceUtils;
|
||||
import com.yunbao.common.utils.DpUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
|
||||
public class ActivateEliteBattleOrderPopupWindow extends CenterPopupView {
|
||||
private boolean elites;//是否精英战令
|
||||
private String spendMoney;//花费钱
|
||||
private View buttonWarOrder;
|
||||
private LiberalBattlePassPopupWindow.LiberalBattlePassCallback mPassCallback;
|
||||
private String mBattlePassTypeId;
|
||||
|
||||
public ActivateEliteBattleOrderPopupWindow(@NonNull Context context, String mSpendMoney,
|
||||
boolean elites,
|
||||
LiberalBattlePassPopupWindow.LiberalBattlePassCallback passCallback
|
||||
, String battlePassTypeId) {
|
||||
super(context);
|
||||
this.elites = elites;
|
||||
spendMoney = mSpendMoney;
|
||||
mPassCallback=passCallback;
|
||||
mBattlePassTypeId = battlePassTypeId;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getImplLayoutId() {
|
||||
return R.layout.activate_elite_battle_order_popup;
|
||||
}
|
||||
|
||||
// 执行初始化操作,比如:findView,设置点击,或者任何你弹窗内的业务逻辑
|
||||
@Override
|
||||
protected void onCreate() {
|
||||
super.onCreate();
|
||||
buttonWarOrder = findViewById(R.id.button_war_order);
|
||||
if (elites) {
|
||||
findViewById(R.id.gift_overvalue).setVisibility(VISIBLE);
|
||||
findViewById(R.id.gift_overvalue3).setVisibility(GONE);
|
||||
findViewById(R.id.enjoy_image).setVisibility(GONE);
|
||||
findViewById(R.id.elites_image).setVisibility(VISIBLE);
|
||||
findViewById(R.id.gift_overvalue).setVisibility(VISIBLE);
|
||||
((TextView)findViewById(R.id.gift3_text)).setText(WordUtil.getNewString(R.string.unlock_more_gifts));
|
||||
} else {
|
||||
findViewById(R.id.gift_overvalue).setVisibility(GONE);
|
||||
findViewById(R.id.gift_overvalue3).setVisibility(VISIBLE);
|
||||
findViewById(R.id.enjoy_image).setVisibility(VISIBLE);
|
||||
findViewById(R.id.elites_image).setVisibility(GONE);
|
||||
findViewById(R.id.gift_overvalue).setVisibility(GONE);
|
||||
((TextView)findViewById(R.id.gift3_text)).setText(WordUtil.getNewString(R.string.unlock_more_gifts2));
|
||||
}
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.war_order_close), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
dialog.dismiss();
|
||||
}
|
||||
});
|
||||
//中文按钮文字
|
||||
|
||||
((TextView)findViewById(R.id.button_war_order_text)).setText(spendMoney);
|
||||
|
||||
ViewClicksAntiShake.clicksAntiShake(buttonWarOrder, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
dialog.dismiss();
|
||||
new XPopup.Builder(getContext())
|
||||
.enableDrag(false)
|
||||
.maxWidth(DeviceUtils.getScreenHeight((Activity) getContext()) - DpUtil.dp2px(34))
|
||||
.asCustom(new LiberalBattlePassPopupWindow(getContext(), spendMoney, elites,mPassCallback,mBattlePassTypeId))
|
||||
.show();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.yunbao.common.dialog;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.lxj.xpopup.core.CenterPopupView;
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
|
||||
/**
|
||||
* 活动结束
|
||||
*/
|
||||
public class ActivityEndPopupWindow extends CenterPopupView {
|
||||
public ActivityEndPopupWindow(@NonNull Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getImplLayoutId() {
|
||||
return R.layout.activity_end_popup;
|
||||
}
|
||||
|
||||
// 执行初始化操作,比如:findView,设置点击,或者任何你弹窗内的业务逻辑
|
||||
@Override
|
||||
protected void onCreate() {
|
||||
super.onCreate();
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.confirm), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
dialog.dismiss();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -14,7 +14,7 @@ import android.widget.TextView;
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.lxj.xpopup.core.CenterPopupView;
|
||||
import com.umeng.analytics.MobclickAgent;
|
||||
import com.yunbao.common.utils.MobclickAgent;
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.bean.CoolConfig;
|
||||
import com.yunbao.common.http.base.HttpCallback;
|
||||
|
||||
@@ -20,8 +20,8 @@ import com.google.gson.Gson;
|
||||
import com.lxj.xpopup.XPopup;
|
||||
import com.lxj.xpopup.core.BottomPopupView;
|
||||
import com.lxj.xpopup.enums.PopupPosition;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.activity.SudGameActivity;
|
||||
import com.yunbao.common.bean.CreateSudRoomModel;
|
||||
import com.yunbao.common.bean.CustomSidebarChildModel;
|
||||
import com.yunbao.common.event.CheckCurrencyModel;
|
||||
@@ -33,6 +33,7 @@ import com.yunbao.common.http.base.HttpCallback;
|
||||
import com.yunbao.common.http.live.LiveNetManager;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.utils.RouteUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
@@ -45,6 +46,9 @@ import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Random;
|
||||
|
||||
/**
|
||||
* 半屏创建游戏房间
|
||||
*/
|
||||
public class CreateSudGamePopup extends BottomPopupView {
|
||||
private List<CustomSidebarChildModel> customSidebarChildModels = new ArrayList<>();
|
||||
private TextView createGameType, selectCurrencyType;
|
||||
@@ -150,8 +154,6 @@ public class CreateSudGamePopup extends BottomPopupView {
|
||||
.asCustom(new SudGameListSelectPopup(getContext(), 4, customSidebarChildModels, interactionID))
|
||||
.show();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.room_back),
|
||||
@@ -279,9 +281,11 @@ public class CreateSudGamePopup extends BottomPopupView {
|
||||
public void onSuccess(CreateSudRoomModel data) {
|
||||
if (isHome) {
|
||||
dialog.dismiss();
|
||||
Intent intent = new Intent(getContext(), SudGameActivity.class);
|
||||
intent.putExtra("CreateSudRoom", new Gson().toJson(data));
|
||||
getContext().startActivity(intent);
|
||||
if(CommonAppConfig.getInstance().getConfig().isSw()){
|
||||
RouteUtil.forwardSwSudGameActivity(new Gson().toJson(data),true,isHome);
|
||||
}else{
|
||||
RouteUtil.forwardRySudGameActivity(new Gson().toJson(data),true,isHome);
|
||||
}
|
||||
} else {
|
||||
Bus.get().post(new LiveSudGamePopupShowOrHideEvent().setType(0).setCreateSudRoomModel(data));
|
||||
|
||||
@@ -314,20 +318,50 @@ public class CreateSudGamePopup extends BottomPopupView {
|
||||
animator.setDuration(animDuration);
|
||||
animator.setInterpolator(new LinearInterpolator());
|
||||
animator.start();
|
||||
XPopup.Builder builder = new XPopup.Builder(getContext()).atView(findViewById(R.id.currency_type));
|
||||
builder.hasShadowBg(false)
|
||||
.isDestroyOnDismiss(true)
|
||||
.isLightStatusBar(false)
|
||||
.popupPosition(PopupPosition.Bottom)
|
||||
.asCustom(new SudGameListSelectPopup(getContext(), 5, currencyTypeName,isYuanbao)
|
||||
.setOnDismissListener(new DialogInterface.OnDismissListener() {
|
||||
@Override
|
||||
public void onDismiss(DialogInterface dialog) {
|
||||
closeAnimSudGameListEvent();
|
||||
}
|
||||
})
|
||||
)
|
||||
.show();
|
||||
if (hasMoveUp) {
|
||||
InputMethodManager imm = getSystemService(getContext(), InputMethodManager.class);
|
||||
if (imm != null) {
|
||||
imm.hideSoftInputFromWindow(roomName.getWindowToken(), 0);
|
||||
imm.hideSoftInputFromWindow(gameSill.getWindowToken(), 0);
|
||||
}
|
||||
new Handler().postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
XPopup.Builder builder = new XPopup.Builder(getContext()).atView(findViewById(R.id.currency_type));
|
||||
builder.hasShadowBg(false)
|
||||
.isDestroyOnDismiss(true)
|
||||
.isLightStatusBar(false)
|
||||
.popupPosition(PopupPosition.Bottom)
|
||||
.asCustom(new SudGameListSelectPopup(getContext(), 5, currencyTypeName,isYuanbao)
|
||||
.setOnDismissListener(new DialogInterface.OnDismissListener() {
|
||||
@Override
|
||||
public void onDismiss(DialogInterface dialog) {
|
||||
closeAnimSudGameListEvent();
|
||||
}
|
||||
})
|
||||
)
|
||||
.show();
|
||||
}
|
||||
}, 500);
|
||||
}else {
|
||||
XPopup.Builder builder = new XPopup.Builder(getContext()).atView(findViewById(R.id.currency_type));
|
||||
builder.hasShadowBg(false)
|
||||
.isDestroyOnDismiss(true)
|
||||
.isLightStatusBar(false)
|
||||
.popupPosition(PopupPosition.Bottom)
|
||||
.asCustom(new SudGameListSelectPopup(getContext(), 5, currencyTypeName,isYuanbao)
|
||||
.setOnDismissListener(new DialogInterface.OnDismissListener() {
|
||||
@Override
|
||||
public void onDismiss(DialogInterface dialog) {
|
||||
closeAnimSudGameListEvent();
|
||||
}
|
||||
})
|
||||
)
|
||||
.show();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
172
common/src/main/java/com/yunbao/common/dialog/DebugDialog.java
Normal file
172
common/src/main/java/com/yunbao/common/dialog/DebugDialog.java
Normal file
@@ -0,0 +1,172 @@
|
||||
package com.yunbao.common.dialog;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.lzf.easyfloat.EasyFloat;
|
||||
import com.lzf.easyfloat.enums.ShowPattern;
|
||||
import com.lzf.easyfloat.interfaces.OnPermissionResult;
|
||||
import com.lzf.easyfloat.permission.PermissionUtils;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.adapter.DebugDialogAdapter;
|
||||
import com.yunbao.common.utils.AppManager;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Timer;
|
||||
import java.util.TimerTask;
|
||||
|
||||
|
||||
public class DebugDialog {
|
||||
RecyclerView recyclerView;
|
||||
LinkedHashMap<String, View> params;
|
||||
DebugDialogAdapter adapter;
|
||||
private static DebugDialog debugDialog;
|
||||
Context mContext;
|
||||
private ShowPattern showPattern = ShowPattern.CURRENT_ACTIVITY;
|
||||
|
||||
private DebugDialogRunnable runnable;
|
||||
|
||||
public static void getInstance(DebugDialogRunnable runnable) {
|
||||
if (debugDialog == null) {
|
||||
debugDialog = new DebugDialog(runnable);
|
||||
} else {
|
||||
runnable.run(debugDialog);
|
||||
}
|
||||
debugDialog.showPattern = ShowPattern.CURRENT_ACTIVITY;
|
||||
}
|
||||
|
||||
public static boolean checkShow() {
|
||||
return EasyFloat.isShow("debug");
|
||||
}
|
||||
|
||||
public DebugDialog clear() {
|
||||
params.clear();
|
||||
return this;
|
||||
}
|
||||
|
||||
public void setParams(String tag, String msg) {
|
||||
Log.i("debug弹窗", "setParams: " + tag + "|" + msg);
|
||||
if (params.containsKey(tag)) {
|
||||
((TextView) params.get(tag)).setText(tag + ":" + msg);
|
||||
} else {
|
||||
TextView textView = new TextView(mContext);
|
||||
textView.setText(tag + ":" + msg);
|
||||
params.put(tag, textView);
|
||||
adapter.setParamMap(params);
|
||||
}
|
||||
EasyFloat.updateFloat("debug");
|
||||
}
|
||||
|
||||
private DebugDialog(DebugDialogRunnable runnable) {
|
||||
this.runnable = runnable;
|
||||
if (params == null) {
|
||||
Log.i("debug弹窗", "DebugDialog: 初始化参数");
|
||||
params = new LinkedHashMap<>();
|
||||
}
|
||||
init();
|
||||
}
|
||||
|
||||
private void init() {
|
||||
this.mContext = AppManager.getInstance().getMainActivity();
|
||||
if (mContext == null) {
|
||||
startWaitMainActivity();
|
||||
return;
|
||||
}
|
||||
runnable.run(this);
|
||||
// createView();
|
||||
}
|
||||
|
||||
private void startWaitMainActivity() {
|
||||
new Timer().schedule(new TimerTask() {
|
||||
@Override
|
||||
public void run() {
|
||||
Log.i("debug弹窗", "run: " + AppManager.getInstance().getMainActivity());
|
||||
if (AppManager.getInstance().getMainActivity() != null) {
|
||||
init();
|
||||
cancel();
|
||||
}
|
||||
}
|
||||
}, 0, 1000);
|
||||
}
|
||||
|
||||
public void close() {
|
||||
EasyFloat.dismiss("debug");
|
||||
}
|
||||
|
||||
public void show() {
|
||||
if (recyclerView != null) return;
|
||||
if (showPattern == ShowPattern.CURRENT_ACTIVITY) {
|
||||
createView();
|
||||
return;
|
||||
}
|
||||
if (PermissionUtils.checkPermission(mContext)) {
|
||||
createView();
|
||||
} else {
|
||||
PermissionUtils.requestPermission((Activity) mContext, new OnPermissionResult() {
|
||||
@Override
|
||||
public void permissionResult(boolean b) {
|
||||
ToastUtil.show("悬浮权限" + b);
|
||||
if (b) {
|
||||
createView();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
protected void createView() {
|
||||
recyclerView = new RecyclerView(mContext);
|
||||
adapter = new DebugDialogAdapter(mContext);
|
||||
recyclerView.setLayoutManager(new LinearLayoutManager(mContext, LinearLayoutManager.VERTICAL, false));
|
||||
recyclerView.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT));
|
||||
recyclerView.setAdapter(adapter);
|
||||
recyclerView.setBackgroundColor(Color.WHITE);
|
||||
TextView textView = new TextView(mContext);
|
||||
textView.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
ToastUtil.show("debug弹窗:" + params.size());
|
||||
EasyFloat.updateFloat("debug");
|
||||
}
|
||||
});
|
||||
params.put("发包时间:" + CommonAppConfig.BUILD_TIME, textView);
|
||||
adapter.setParamMap(params);
|
||||
|
||||
EasyFloat.with(mContext)
|
||||
.setTag("debug")
|
||||
.setShowPattern(this.showPattern)
|
||||
.setLayout(recyclerView)
|
||||
.show();
|
||||
runnable.run(this);
|
||||
Log.i("debug弹窗", "createView: 创建");
|
||||
}
|
||||
|
||||
public void setView(String value, View view, View.OnClickListener onClickListener) {
|
||||
if (params.containsKey(value)) {
|
||||
params.get(value).setOnClickListener(onClickListener);
|
||||
} else {
|
||||
view.setOnClickListener(onClickListener);
|
||||
params.put(value, view);
|
||||
}
|
||||
adapter.setParamMap(params);
|
||||
EasyFloat.updateFloat("debug");
|
||||
}
|
||||
|
||||
public void setShowPattern(ShowPattern showPattern) {
|
||||
this.showPattern = showPattern;
|
||||
}
|
||||
|
||||
public interface DebugDialogRunnable {
|
||||
void run(DebugDialog dialog);
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user