Compare commits
16 Commits
直播间提示优化
...
gong_dev_g
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1deb197af6 | ||
|
|
3a12d848e1 | ||
|
|
cf245b0df8 | ||
|
|
0ea92c00a2 | ||
|
|
a0f3f246a6 | ||
|
|
a11d7f07e9 | ||
|
|
90bc70ebf7 | ||
|
|
4618c0a4f1 | ||
|
|
15a52aaa62 | ||
|
|
6d6010d023 | ||
|
|
94156e2984 | ||
| 2cefd50ac3 | |||
| 3510a565f2 | |||
| e0669e98cf | |||
|
|
2eea1f1b75 | ||
| f1a1aae787 |
@@ -5,8 +5,8 @@ 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"
|
||||
@@ -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 {
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
package com.yunbao.faceunity;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.test.platform.app.Instrimport com.yunbao.common.utils.MobclickAgent;ntationRegistry;
|
||||
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" />
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -2,16 +2,16 @@ 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 {
|
||||
@@ -20,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
@@ -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,
|
||||
|
||||
@@ -5,6 +5,7 @@ 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 {
|
||||
|
||||
@@ -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"/>
|
||||
|
||||
@@ -6,12 +6,8 @@ apply plugin: 'com.alibaba.arouter'
|
||||
apply from: "../package_config.gradle"
|
||||
|
||||
android {
|
||||
project.tasks.getByName("tasks").doFirst {
|
||||
|
||||
}
|
||||
|
||||
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"
|
||||
@@ -81,8 +77,11 @@ android {
|
||||
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
sourceCompatibility JavaVersion.VERSION_18
|
||||
targetCompatibility JavaVersion.VERSION_18
|
||||
}
|
||||
buildFeatures {
|
||||
buildConfig = true
|
||||
}
|
||||
|
||||
|
||||
|
||||
9
app/proguard-rules.pro
vendored
@@ -196,9 +196,12 @@ rx.internal.util.atomic.LinkedQueueNode* consumerNode;
|
||||
-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
|
||||
|
||||
@@ -308,3 +311,7 @@ rx.internal.util.atomic.LinkedQueueNode* consumerNode;
|
||||
-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"
|
||||
|
||||
@@ -25,7 +25,7 @@ import com.blankj.utilcode.util.Utils;
|
||||
import com.facebook.appevents.AppEventsLogger;
|
||||
import com.fm.openinstall.OpenInstall;
|
||||
import com.google.gson.Gson;
|
||||
import com.shayu.phonelive.utils.LogUtils;
|
||||
import com.yunbao.common.utils.LogUtils;
|
||||
import com.tencent.imsdk.v2.V2TIMGroupMemberInfo;
|
||||
import com.tencent.imsdk.v2.V2TIMManager;
|
||||
import com.tencent.imsdk.v2.V2TIMSimpleMsgListener;
|
||||
|
||||
@@ -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;
|
||||
|
||||
15
build.gradle
@@ -4,27 +4,28 @@ 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,9 +41,9 @@ 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
|
||||
|
||||
@@ -2,10 +2,12 @@ apply plugin: 'com.android.library'
|
||||
apply plugin: 'img-optimizer'
|
||||
apply plugin: 'kotlin-android'
|
||||
apply from: "../package_config.gradle"
|
||||
|
||||
android {
|
||||
namespace "com.yunbao.common"
|
||||
compileSdk rootProject.ext.android.compileSdkVersion
|
||||
publishNonDefault true
|
||||
compileSdkVersion rootProject.ext.android.compileSdkVersion
|
||||
buildToolsVersion rootProject.ext.android.buildToolsVersion
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion rootProject.ext.android.minSdkVersion
|
||||
targetSdkVersion rootProject.ext.android.targetSdkVersion
|
||||
@@ -13,7 +15,18 @@ android {
|
||||
versionName rootProject.ext.android.versionName
|
||||
manifestPlaceholders = rootProject.ext.manifestPlaceholders
|
||||
ndk {
|
||||
abiFilters "armeabi-v7a", "arm64-v8a","x86","x86_64"
|
||||
// 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'
|
||||
|
||||
@@ -200,7 +218,7 @@ dependencies {
|
||||
//自定义圆角图片
|
||||
api 'com.makeramen:roundedimageview:2.3.0'
|
||||
// 友盟统计SDK
|
||||
// api(name: 'umeng-common-9.6.8+000', ext: 'aar')
|
||||
// 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'
|
||||
@@ -210,29 +228,36 @@ dependencies {
|
||||
//侧滑删除
|
||||
api 'com.yanzhenjie.recyclerview:x:1.3.2'
|
||||
|
||||
huawei_onlineImplementation project(':lib_huawei')
|
||||
huawei_testImplementation project(':lib_huawei')
|
||||
//华为支付插件包
|
||||
//api project(':lib_huawei')
|
||||
|
||||
samsung_onlineImplementation project(":lib_google")
|
||||
samsung_testImplementation project(":lib_google")
|
||||
|
||||
google_onlineImplementation project(":lib_google")
|
||||
google_testImplementation project(":lib_google")
|
||||
|
||||
link_onlineImplementation project(":lib_google")
|
||||
link_testImplementation project(":lib_google")
|
||||
//google插件包
|
||||
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'
|
||||
|
||||
//ExoPlayer,腾讯的播放器不支持无缝切换
|
||||
api 'com.google.android.exoplayer:exoplayer:2.18.2'
|
||||
api 'com.google.android.exoplayer:exoplayer-core:2.18.2@aar'
|
||||
api rootProject.ext.dependencies["blank-utilcode"]
|
||||
}
|
||||
|
||||
BIN
common/libs/samsung-iap-6.1.1.aar
Normal file
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" />-->
|
||||
|
||||
@@ -59,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);
|
||||
@@ -68,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();
|
||||
@@ -133,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();
|
||||
|
||||
@@ -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;
|
||||
@@ -82,6 +84,15 @@ 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);
|
||||
|
||||
@@ -9,7 +9,7 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
public abstract class BaseAdapter<T> extends RecyclerView.Adapter<BaseAdapter.BaseViewHolder> {
|
||||
private Context context;
|
||||
public Context context;
|
||||
public List<T> data;
|
||||
|
||||
public BaseAdapter(Context context, List<T> data) {
|
||||
@@ -34,7 +34,7 @@ public abstract class BaseAdapter<T> extends RecyclerView.Adapter<BaseAdapter.Ba
|
||||
return data == null ? 0 : data.size();
|
||||
}
|
||||
|
||||
public abstract void convert(BaseViewHolder holder, T t);
|
||||
public abstract void convert(BaseViewHolder holder, T item);
|
||||
|
||||
public abstract int getItemLayoutId();
|
||||
|
||||
@@ -67,7 +67,7 @@ public abstract class BaseAdapter<T> extends RecyclerView.Adapter<BaseAdapter.Ba
|
||||
|
||||
private OnItemClickListener onItemClickListener;
|
||||
|
||||
private void setOnItemClickListener(OnItemClickListener onItemClickListener){
|
||||
public void setOnItemClickListener(OnItemClickListener onItemClickListener){
|
||||
this.onItemClickListener = onItemClickListener;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,6 @@ package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.yunbao.common.BuildConfig;
|
||||
|
||||
public class CheckLiveModel extends BaseModel {
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@ package com.yunbao.common.bean;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.yunbao.common.BuildConfig;
|
||||
import com.yunbao.common.utils.StringUtil;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -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,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 +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ import com.yunbao.common.http.base.HttpCallback;
|
||||
import com.yunbao.common.http.live.LiveNetManager;
|
||||
import com.yunbao.common.interfaces.OnItemClickListener;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.utils.StringUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
@@ -124,6 +125,10 @@ public class OrderLevelPopupWindow extends CenterPopupView {
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.buying_experience), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
if(StringUtil.isEmpty(orderLevel.getText().toString())||"0".equals(orderLevel.getText().toString())){
|
||||
ToastUtil.show(WordUtil.isNewZh()?"输入数字不可为0":"The input number cannot be 0");
|
||||
return;
|
||||
}
|
||||
if (Integer.parseInt(orderLevel.getText().toString()+"00") <= maxExp) {
|
||||
LiveNetManager.get(getContext()).buyingExperiencePoint(buyExp + "00", new HttpCallback<ResponseModel<Object>>() {
|
||||
@Override
|
||||
|
||||
@@ -0,0 +1,187 @@
|
||||
package com.yunbao.common.dialog;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.os.CountDownTimer;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.appcompat.widget.AppCompatImageView;
|
||||
import androidx.appcompat.widget.AppCompatTextView;
|
||||
|
||||
import com.blankj.utilcode.util.LogUtils;
|
||||
import com.lxj.xpopup.XPopup;
|
||||
import com.makeramen.roundedimageview.RoundedImageView;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.bean.SudSettleBean;
|
||||
import com.yunbao.common.event.CheckRemainingBalanceEvent;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.sud.state.SudMGPMGState;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 双人小游戏结算弹窗
|
||||
*/
|
||||
public class SudGameDoubleDialog extends AbsDialogCenterPopupWindow{
|
||||
public SudGameDoubleDialog(@NonNull Context context) {
|
||||
super(context);
|
||||
}
|
||||
@Override
|
||||
public int bindLayoutId() {
|
||||
return R.layout.dialog_sub_double;
|
||||
}
|
||||
|
||||
private AppCompatImageView sub_win_hat,sub_leave,sub_again,sub_title;
|
||||
private RoundedImageView sub_win_head,sub_loss_head;
|
||||
private AppCompatTextView sub_win_name,sub_win_score,sub_loss_name,sub_loss_score,sub_time;
|
||||
private CountDownTimer countDownTimer;
|
||||
private List<SudSettleBean> settleBeans = new ArrayList<>();
|
||||
private boolean containMe;
|
||||
|
||||
@Override
|
||||
public void buildDialog(XPopup.Builder builder) {
|
||||
builder.dismissOnTouchOutside(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate() {
|
||||
super.onCreate();
|
||||
sub_title = findViewById(R.id.sub_title);//弹窗标题
|
||||
sub_win_hat = findViewById(R.id.sub_win_hat);//胜利皇冠(平局隐藏)
|
||||
sub_leave = findViewById(R.id.sub_leave);//离开按钮
|
||||
sub_again = findViewById(R.id.sub_again);//再来一局按钮
|
||||
sub_win_head = findViewById(R.id.sub_win_head);//胜利方头像
|
||||
sub_loss_head = findViewById(R.id.sub_loss_head);//失败方头像
|
||||
sub_win_name = findViewById(R.id.sub_win_name);//胜利方昵称
|
||||
sub_win_score = findViewById(R.id.sub_win_score);//胜利方分数
|
||||
sub_loss_name = findViewById(R.id.sub_loss_name);//失败方昵称
|
||||
sub_loss_score = findViewById(R.id.sub_loss_score);//失败方分数
|
||||
sub_time = findViewById(R.id.sub_time);//关闭倒计时
|
||||
|
||||
|
||||
initData();
|
||||
|
||||
if (WordUtil.isNewZh()){
|
||||
sub_leave.setImageResource(R.mipmap.sub_leave_zh);
|
||||
sub_again.setImageResource(R.mipmap.sub_again_zh);
|
||||
}else {
|
||||
sub_leave.setImageResource(R.mipmap.sub_leave_en);
|
||||
sub_again.setImageResource(R.mipmap.sub_again_en);
|
||||
}
|
||||
|
||||
sub_leave.setOnClickListener(v-> destroyDialog());
|
||||
sub_again.setOnClickListener(v-> {
|
||||
Bus.get().post(new CheckRemainingBalanceEvent().setSudMGPMGState(SudMGPMGState.MG_COMMON_SELF_CLICK_GAME_SETTLE_AGAIN_BTN).setSubReady(false));
|
||||
destroyDialog();
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
private void initData() {
|
||||
if (settleBeans.size() == 2){
|
||||
sortByWinNum(settleBeans);
|
||||
SudSettleBean sudSettleBean1 = settleBeans.get(0); // 第一名
|
||||
SudSettleBean sudSettleBean2 = settleBeans.get(1); // 第二名
|
||||
checkMe(sudSettleBean1.getUid(),sudSettleBean2.getUid());//判断这场对局是不是包含自己
|
||||
|
||||
// 检查是否是当前用户
|
||||
boolean isFirstMe = CommonAppConfig.getInstance().getUid().equals(sudSettleBean1.getUid());
|
||||
boolean isDraw = sudSettleBean1.getWin_num() == sudSettleBean2.getWin_num();
|
||||
boolean isZh = WordUtil.isNewZh();
|
||||
|
||||
if (containMe) {
|
||||
// 当前用户在游戏中
|
||||
SudSettleBean winBean = isFirstMe ? sudSettleBean1 : sudSettleBean2;
|
||||
SudSettleBean lossBean = isFirstMe ? sudSettleBean2 : sudSettleBean1;
|
||||
|
||||
ImgLoader.display(mContext, winBean.getAvatar_url(), sub_win_head);
|
||||
ImgLoader.display(mContext, lossBean.getAvatar_url(), sub_loss_head);
|
||||
sub_win_name.setText(winBean.getNick_name());
|
||||
sub_loss_name.setText(lossBean.getNick_name());
|
||||
|
||||
sub_win_score.setText(winBean.getWin_num() > 0 ? "+" + winBean.getWin_num() : String.valueOf(winBean.getWin_num()));
|
||||
sub_loss_score.setText(String.valueOf(lossBean.getWin_num()));
|
||||
|
||||
if (isDraw) {
|
||||
// 平局
|
||||
sub_title.setImageResource(isZh ? R.mipmap.sub_draw_zh : R.mipmap.sub_draw_en);
|
||||
sub_win_hat.setVisibility(View.GONE);
|
||||
} else {
|
||||
// 胜利或失败
|
||||
sub_title.setImageResource(isZh ? (isFirstMe ? R.mipmap.sub_win_zh : R.mipmap.sub_loss_zh) : (isFirstMe ? R.mipmap.sub_win_en : R.mipmap.sub_loss_en));
|
||||
sub_win_hat.setVisibility(View.VISIBLE);
|
||||
}
|
||||
} else {
|
||||
// 当前用户不在游戏中
|
||||
ImgLoader.display(mContext, sudSettleBean1.getAvatar_url(), sub_win_head);
|
||||
ImgLoader.display(mContext, sudSettleBean2.getAvatar_url(), sub_loss_head);
|
||||
sub_win_name.setText(sudSettleBean1.getNick_name());
|
||||
sub_loss_name.setText(sudSettleBean2.getNick_name());
|
||||
|
||||
sub_win_score.setText(sudSettleBean1.getWin_num() > 0 ? "+" + sudSettleBean1.getWin_num() : String.valueOf(sudSettleBean1.getWin_num()));
|
||||
sub_loss_score.setText(String.valueOf(sudSettleBean2.getWin_num()));
|
||||
|
||||
if (isDraw) {
|
||||
// 平局
|
||||
sub_title.setImageResource(isZh ? R.mipmap.sub_draw_zh : R.mipmap.sub_draw_en);
|
||||
sub_win_hat.setVisibility(View.GONE);
|
||||
} else {
|
||||
// 非当前用户的胜利
|
||||
sub_title.setImageResource(isZh ? R.mipmap.sub_win_zh : R.mipmap.sub_win_en);
|
||||
sub_win_hat.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void checkMe(String id1,String id2){
|
||||
containMe = CommonAppConfig.getInstance().getUid().equals(id1) || CommonAppConfig.getInstance().getUid().equals(id2);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onShow() {
|
||||
super.onShow();
|
||||
//关闭倒计时
|
||||
countDownTimer = new CountDownTimer(10000, 1000){
|
||||
|
||||
@Override
|
||||
public void onTick(long l) {
|
||||
sub_time.setText(String.valueOf((l+500)/1000));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFinish() {
|
||||
destroyDialog();
|
||||
}
|
||||
}.start();
|
||||
initData();
|
||||
}
|
||||
|
||||
public void setSudSettleList(List<SudSettleBean> data){
|
||||
settleBeans.clear();
|
||||
settleBeans.addAll(data);
|
||||
LogUtils.e("yqw=====>"+settleBeans);
|
||||
}
|
||||
|
||||
private void sortByWinNum(List<SudSettleBean> list){
|
||||
// 按照胜利数排序 settleBeans 列表
|
||||
Collections.sort(list, (bean1, bean2) -> {
|
||||
return Integer.compare(bean2.getWin_num(), bean1.getWin_num()); // 从大到小排序
|
||||
});
|
||||
}
|
||||
|
||||
private void destroyDialog(){
|
||||
dismiss();
|
||||
countDownTimer.cancel();
|
||||
countDownTimer = null;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,124 @@
|
||||
package com.yunbao.common.dialog;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.os.CountDownTimer;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.appcompat.widget.AppCompatImageView;
|
||||
import androidx.appcompat.widget.AppCompatTextView;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import com.lxj.xpopup.XPopup;
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.adapter.SudGameAdapter;
|
||||
import com.yunbao.common.bean.SudSettleBean;
|
||||
import com.yunbao.common.event.CheckRemainingBalanceEvent;
|
||||
import com.yunbao.common.sud.state.SudMGPMGState;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 多人小游戏弹窗
|
||||
*/
|
||||
public class SudGameMultipleDialog extends AbsDialogCenterPopupWindow{
|
||||
public SudGameMultipleDialog(@NonNull Context context) {
|
||||
super(context);
|
||||
}
|
||||
@Override
|
||||
public int bindLayoutId() {
|
||||
return R.layout.dialog_sub_multiple;
|
||||
}
|
||||
|
||||
private RecyclerView sub_recycle_rank;
|
||||
private AppCompatImageView sub_leave,sub_again,sub_title;
|
||||
private AppCompatTextView sub_time;
|
||||
private CountDownTimer countDownTimer;
|
||||
private SudGameAdapter sudGameAdapter;
|
||||
private final List<SudSettleBean> settleBeans = new ArrayList<>();
|
||||
@Override
|
||||
public void buildDialog(XPopup.Builder builder) {
|
||||
builder.dismissOnTouchOutside(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate() {
|
||||
super.onCreate();
|
||||
sub_recycle_rank = findViewById(R.id.sub_recycle_rank);//分数排名
|
||||
sub_leave = findViewById(R.id.sub_leave);//离开按钮
|
||||
sub_again = findViewById(R.id.sub_again);//再来一局按钮
|
||||
sub_title = findViewById(R.id.sub_title);//弹窗标题
|
||||
sub_time = findViewById(R.id.sub_time);//关闭倒计时
|
||||
|
||||
if (WordUtil.isNewZh()){
|
||||
sub_leave.setImageResource(R.mipmap.sub_leave_zh);
|
||||
sub_again.setImageResource(R.mipmap.sub_again_zh);
|
||||
sub_title.setImageResource(R.mipmap.sub_over_zh);
|
||||
}else {
|
||||
sub_leave.setImageResource(R.mipmap.sub_leave_en);
|
||||
sub_again.setImageResource(R.mipmap.sub_again_en);
|
||||
sub_title.setImageResource(R.mipmap.sub_over_en);
|
||||
}
|
||||
|
||||
sub_leave.setOnClickListener(v-> destroyDialog());
|
||||
sub_again.setOnClickListener(v-> {
|
||||
Bus.get().post(new CheckRemainingBalanceEvent().setSudMGPMGState(SudMGPMGState.MG_COMMON_SELF_CLICK_GAME_SETTLE_AGAIN_BTN).setSubReady(false));
|
||||
destroyDialog();
|
||||
});
|
||||
|
||||
//设置排名数据
|
||||
sudGameAdapter = new SudGameAdapter(mContext,settleBeans);
|
||||
sub_recycle_rank.setLayoutManager(new LinearLayoutManager(mContext));
|
||||
sub_recycle_rank.setAdapter(sudGameAdapter);
|
||||
|
||||
}
|
||||
|
||||
@SuppressLint("NotifyDataSetChanged")
|
||||
@Override
|
||||
protected void onShow() {
|
||||
super.onShow();
|
||||
//关闭倒计时
|
||||
countDownTimer = new CountDownTimer(10000, 1000){
|
||||
|
||||
@Override
|
||||
public void onTick(long l) {
|
||||
sub_time.setText(String.valueOf((l+500)/1000));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFinish() {
|
||||
destroyDialog();
|
||||
}
|
||||
}.start();
|
||||
sudGameAdapter.notifyDataSetChanged();
|
||||
// limitItem();
|
||||
}
|
||||
|
||||
public void setSudSettleList(List<SudSettleBean> data){
|
||||
settleBeans.clear();
|
||||
settleBeans.addAll(data);
|
||||
}
|
||||
|
||||
//设置最多显示的高度
|
||||
private void limitItem(){
|
||||
sub_recycle_rank.post(() -> {
|
||||
View itemView = sub_recycle_rank.getChildAt(0);
|
||||
if (itemView != null){
|
||||
int height = (int) (itemView.getHeight()*3.5);
|
||||
ViewGroup.LayoutParams layoutParams = sub_recycle_rank.getLayoutParams();
|
||||
layoutParams.height = height;
|
||||
sub_recycle_rank.setLayoutParams(layoutParams);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void destroyDialog(){
|
||||
dismiss();
|
||||
countDownTimer.cancel();
|
||||
countDownTimer = null;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
package com.yunbao.common.dialog;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.View;
|
||||
import android.widget.ProgressBar;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.appcompat.widget.AppCompatImageView;
|
||||
import androidx.appcompat.widget.LinearLayoutCompat;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import com.lxj.xpopup.XPopup;
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
|
||||
public class SudLoadDialog extends AbsDialogCenterPopupWindow{
|
||||
public SudLoadDialog(@NonNull Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
private LinearLayoutCompat sud_load_bg;
|
||||
private AppCompatImageView sud_load,sud_load_skip,sud_load_again;
|
||||
private ProgressBar sud_load_bar_double,sud_load_bar_multiple;
|
||||
private int isDouble = 0;//游戏模式 1:双人对战 2:多人游戏
|
||||
private int clickStatus = 0;//0:什么都不点击 1:点击跳过 2:点击再来一局
|
||||
|
||||
public int getClickStatus() {
|
||||
return clickStatus;
|
||||
}
|
||||
|
||||
public void setClickStatus(int clickStatus) {
|
||||
this.clickStatus = clickStatus;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void buildDialog(XPopup.Builder builder) {
|
||||
builder.dismissOnTouchOutside(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int bindLayoutId() {
|
||||
return R.layout.dialog_sud_load;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate() {
|
||||
super.onCreate();
|
||||
sud_load_bg = findViewById(R.id.sud_load_bg);
|
||||
sud_load = findViewById(R.id.sud_load);
|
||||
sud_load_skip = findViewById(R.id.sud_load_skip);
|
||||
sud_load_again = findViewById(R.id.sud_load_again);
|
||||
sud_load_bar_double = findViewById(R.id.sud_load_bar_double);
|
||||
sud_load_bar_multiple = findViewById(R.id.sud_load_bar_multiple);
|
||||
|
||||
if (WordUtil.isNewZh()){
|
||||
sud_load.setImageResource(R.mipmap.sud_load_zh);
|
||||
sud_load_skip.setImageResource(R.mipmap.sud_load_skip_zh);
|
||||
sud_load_again.setImageResource(R.mipmap.sub_again_zh);
|
||||
}else {
|
||||
sud_load.setImageResource(R.mipmap.sud_load_en);
|
||||
sud_load_skip.setImageResource(R.mipmap.sud_load_skip_en);
|
||||
sud_load_again.setImageResource(R.mipmap.sub_again_en);
|
||||
}
|
||||
|
||||
sud_load_skip.setOnClickListener(v->{
|
||||
clickStatus = 1;
|
||||
dismiss();
|
||||
});
|
||||
|
||||
sud_load_again.setOnClickListener(v->{
|
||||
clickStatus = 2;
|
||||
dismiss();
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onShow() {
|
||||
super.onShow();
|
||||
if (isDouble == 1){
|
||||
sud_load_bg.setBackground(ContextCompat.getDrawable(mContext,R.mipmap.sud_load_bg_double));
|
||||
sud_load_bar_double.setVisibility(View.VISIBLE);
|
||||
sud_load_bar_multiple.setVisibility(View.GONE);
|
||||
}else {
|
||||
sud_load_bg.setBackground(ContextCompat.getDrawable(mContext,R.mipmap.sud_load_bg_multiple));
|
||||
sud_load_bar_double.setVisibility(View.GONE);
|
||||
sud_load_bar_multiple.setVisibility(View.VISIBLE);
|
||||
}
|
||||
// new Handler(Looper.getMainLooper()).postDelayed(() -> {
|
||||
// if (this.isShow()){
|
||||
// dismiss();
|
||||
// }
|
||||
// },10000);
|
||||
}
|
||||
|
||||
public void setDouble(int isDouble){
|
||||
this.isDouble = isDouble;
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,22 @@
|
||||
package com.yunbao.common.event;
|
||||
|
||||
import com.yunbao.common.bean.BaseModel;
|
||||
import com.yunbao.common.sud.state.SudMGPMGState;
|
||||
|
||||
public class CheckRemainingBalanceEvent extends BaseModel {
|
||||
public int seatIndex=0;
|
||||
private String SudMGPMGState;
|
||||
private boolean subReady = false;//是否直接自动准备
|
||||
private SudMGPMGState.MGCommonGameSettle mgCommonGameSettle;//结算数据
|
||||
|
||||
public SudMGPMGState.MGCommonGameSettle getMgCommonGameSettle() {
|
||||
return mgCommonGameSettle;
|
||||
}
|
||||
|
||||
public CheckRemainingBalanceEvent setMgCommonGameSettle(SudMGPMGState.MGCommonGameSettle mgCommonGameSettle) {
|
||||
this.mgCommonGameSettle = mgCommonGameSettle;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getSudMGPMGState() {
|
||||
return SudMGPMGState;
|
||||
@@ -23,4 +35,13 @@ public class CheckRemainingBalanceEvent extends BaseModel {
|
||||
this.seatIndex = seatIndex;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CheckRemainingBalanceEvent setSubReady(boolean subReady){
|
||||
this.subReady = subReady;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean getSubReady(){
|
||||
return subReady;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ public class CommonHttpConsts {
|
||||
public static final String DOWNLOAD_GIF = "downloadGif";
|
||||
public static final String GET_BALANCE = "getBalance";
|
||||
public static final String CHECK_TOKEN_INVALID = "checkTokenInvalid";
|
||||
public static final String NOTIFY_GOOGLE = "Charge.google_pay";
|
||||
public static final String NOTIFY_GOOGLE = "Charge.goole_validate_pd";
|
||||
public static final String COMMUNITY_SETREPORT = "Community.setReport";
|
||||
|
||||
public static final String GET_USER_HOME = "getUserHome";
|
||||
|
||||
@@ -8,12 +8,12 @@ import android.util.Log;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.blankj.utilcode.util.DeviceUtils;
|
||||
import com.lzy.okgo.OkGo;
|
||||
import com.lzy.okgo.callback.StringCallback;
|
||||
import com.lzy.okgo.model.Response;
|
||||
import com.lzy.okgo.request.PostRequest;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.CommonAppContext;
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.activity.ErrorActivity;
|
||||
import com.yunbao.common.bean.ConfigBean;
|
||||
@@ -28,6 +28,7 @@ import com.yunbao.common.utils.AppManager;
|
||||
import com.yunbao.common.utils.DialogUitl;
|
||||
import com.yunbao.common.utils.L;
|
||||
import com.yunbao.common.utils.SpUtil;
|
||||
import com.yunbao.common.utils.StringUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.VersionUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
@@ -398,8 +399,12 @@ public class CommonHttpUtil {
|
||||
HttpClient.getInstance().get(CommonHttpConsts.NOTIFY_GOOGLE, CommonHttpConsts.NOTIFY_GOOGLE).params("purchaseToken", purchaseToken).params("productId", productId).params("orderno", orderno).params("package_name", "com.pdlive.shayu").execute(callback);
|
||||
}
|
||||
|
||||
public static void notifyGoogle(String purchaseToken, String orderNo, String tradeNo, String allData, String gps_adid, HttpCallback callback) {
|
||||
HttpClient.getInstance().get(CommonHttpConsts.NOTIFY_GOOGLE, CommonHttpConsts.NOTIFY_GOOGLE).params("purchaseToken", purchaseToken).params("orderno", orderNo).params("trade_no", tradeNo).params("allData", allData).params("gps_adid", gps_adid).params("package_name", "com.pdlive.shayu").execute(callback);
|
||||
public static void notifyGoogle(String purchaseToken, String productId, HttpCallback callback) {
|
||||
HttpClient.getInstance().get(CommonHttpConsts.NOTIFY_GOOGLE, CommonHttpConsts.NOTIFY_GOOGLE)
|
||||
.params("purchaseToken", purchaseToken)
|
||||
.params("productId", productId)
|
||||
.params("package_name", "com.pdlive.shayu")
|
||||
.execute(callback);
|
||||
}
|
||||
|
||||
public static void Google_sec_pay(String purchaseToken, String orderNo, String tradeNo, HttpCallback callback) {
|
||||
@@ -459,6 +464,20 @@ public class CommonHttpUtil {
|
||||
.params("token", CommonAppConfig.getInstance().getToken())
|
||||
.params("ext", isImg ? ".jpeg" : ".mp4")
|
||||
.execute(callback);
|
||||
} /**
|
||||
* 上传文件 获取七牛云token的接口
|
||||
*/
|
||||
public static void getUploadQiNiuTokenLog(HttpCallback callback,String fileName) {
|
||||
String uid = CommonAppConfig.getInstance().getUid();
|
||||
if(StringUtil.isEmpty(uid)){
|
||||
uid="NotLogin_"+ DeviceUtils.getUniqueDeviceId();
|
||||
}
|
||||
HttpClient.getInstance().get("Pdluserhome.getQiNiuToken3", "Pdluserhome.getQiNiuToken3")
|
||||
.params("uid",uid)
|
||||
.params("token", CommonAppConfig.getInstance().getToken())
|
||||
.params("file_name", fileName)
|
||||
.params("ext", ".zip")
|
||||
.execute(callback);
|
||||
}
|
||||
//
|
||||
// //埋点唯一性
|
||||
|
||||
@@ -36,7 +36,6 @@ public abstract class HttpCallback extends AbsCallback<JsonBean> {
|
||||
public void onSuccess(Response<JsonBean> response) {
|
||||
JsonBean bean = response.body();
|
||||
String gson = new Gson().toJson(bean);
|
||||
Log.e("onSuccess", gson);
|
||||
if (bean != null) {
|
||||
if (200 == bean.getRet()) {
|
||||
Data data = bean.getData();
|
||||
|
||||
@@ -133,15 +133,18 @@ public class HttpLoggingInterceptor implements Interceptor {
|
||||
ResponseBody responseBody = clone.body();
|
||||
boolean logBody = (printLevel == Level.BODY);
|
||||
boolean logHeaders = (printLevel == Level.BODY || printLevel == Level.HEADERS);
|
||||
|
||||
StringBuilder sb=new StringBuilder();
|
||||
try {
|
||||
log("<-- " + clone.code() + ' ' + clone.message() + ' ' + clone.request().url() + " (" + tookMs + "ms)");
|
||||
sb.append("<-- ").append(clone.code())
|
||||
.append(' ').append(clone.message())
|
||||
.append(' ').append(clone.request().url())
|
||||
.append(" (").append(tookMs).append("ms)\n");
|
||||
if (logHeaders) {
|
||||
Headers headers = clone.headers();
|
||||
for (int i = 0, count = headers.size(); i < count; i++) {
|
||||
log("\t" + headers.name(i) + ": " + headers.value(i));
|
||||
sb.append("\t").append(headers.name(i)).append(": ").append(headers.value(i)).append("\n");
|
||||
}
|
||||
log(" ");
|
||||
sb.append("\n");
|
||||
if (logBody && HttpHeaders.hasBody(clone)) {
|
||||
if (responseBody == null) return response;
|
||||
|
||||
@@ -149,18 +152,19 @@ public class HttpLoggingInterceptor implements Interceptor {
|
||||
byte[] bytes = IOUtils.toByteArray(responseBody.byteStream());
|
||||
MediaType contentType = responseBody.contentType();
|
||||
String body = new String(bytes, getCharset(contentType));
|
||||
log("\tbody:" + body);
|
||||
sb.append("\tbody:").append(body).append("\n");
|
||||
responseBody = ResponseBody.create(responseBody.contentType(), bytes);
|
||||
return response.newBuilder().body(responseBody).build();
|
||||
} else {
|
||||
log("\tbody: maybe [binary body], omitted!");
|
||||
sb.append("\tbody: maybe [binary body], omitted!").append("\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
OkLogger.printStackTrace(e);
|
||||
} finally {
|
||||
log("<-- END HTTP");
|
||||
sb.append("<-- END HTTP").append("\n");
|
||||
log(sb.toString());
|
||||
}
|
||||
return response;
|
||||
}
|
||||
|
||||
@@ -243,10 +243,11 @@ public class LiveHttpUtil {
|
||||
/**
|
||||
* 举报用户 + 图片
|
||||
*/
|
||||
public static void setReport(String touid, String content, File file1, File file2, File file3, String videoId, HttpCallback callback) {
|
||||
public static void setReport(String touid,String report_argument, String content, File file1, File file2, File file3, String videoId, HttpCallback callback) {
|
||||
PostRequest<JsonBean> request = HttpClient.getInstance().post("Live.setReport", LiveHttpConsts.SET_REPORT)
|
||||
.isMultipart(true)
|
||||
.params("touid", touid)
|
||||
.params("report_argument", report_argument)
|
||||
.params("content", content);
|
||||
if (file1 != null) {
|
||||
request.params("file1", file1);
|
||||
|
||||
@@ -57,6 +57,7 @@ import com.yunbao.common.bean.PrankGiftBean;
|
||||
import com.yunbao.common.bean.PrankGiftResultBean;
|
||||
import com.yunbao.common.bean.PrankHttpTurntableBean;
|
||||
import com.yunbao.common.bean.PrankProgressBean;
|
||||
import com.yunbao.common.bean.QiniuLog;
|
||||
import com.yunbao.common.bean.QuickGiftSendGiftModel;
|
||||
import com.yunbao.common.bean.RandomPkUserBean;
|
||||
import com.yunbao.common.bean.RankPkInfoBean;
|
||||
@@ -70,6 +71,8 @@ import com.yunbao.common.bean.SendMoneyLongModel;
|
||||
import com.yunbao.common.bean.SetAttentsModel;
|
||||
import com.yunbao.common.bean.SlideInBannerModel;
|
||||
import com.yunbao.common.bean.StarChallengeStatusModel;
|
||||
import com.yunbao.common.bean.SudGameInfoBean;
|
||||
import com.yunbao.common.bean.SudGameScoreBean;
|
||||
import com.yunbao.common.bean.SudGameUserModel;
|
||||
import com.yunbao.common.bean.SudRoomListModel;
|
||||
import com.yunbao.common.bean.SudgameCodeModel;
|
||||
@@ -1022,6 +1025,22 @@ public interface PDLiveApi {
|
||||
@GET("/api/public/?service=Sudgame.getCode")
|
||||
Observable<ResponseModel<List<SudgameCodeModel>>> getCode();
|
||||
|
||||
/**
|
||||
* 获取房间金豆门槛和赢家获得的金豆
|
||||
*/
|
||||
@GET("/api/public/?service=Sudgameserver.checkRemainingBalance")
|
||||
Observable<ResponseModel<SudGameScoreBean>> getScore(
|
||||
@Query("room_id") String roomId
|
||||
);
|
||||
|
||||
/**
|
||||
* 获取游戏中玩家的信息
|
||||
*/
|
||||
@GET("/api/public/?service=Sudgameserver.getGameUser")
|
||||
Observable<ResponseModel<List<SudGameInfoBean>>> getSudGameInfo(
|
||||
@Query("room_id") String roomId
|
||||
);
|
||||
|
||||
/**
|
||||
* 创建游戏房
|
||||
*
|
||||
@@ -1261,4 +1280,8 @@ public interface PDLiveApi {
|
||||
@Query("anchor_id")String anchor_id,
|
||||
@Query("gift_id")String gift_id
|
||||
);
|
||||
@GET("/api/public/?service=Tx.androidQiniuLog")
|
||||
Observable<ResponseModel<QiniuLog>> getPrankList(
|
||||
@Query("type")String type
|
||||
);
|
||||
}
|
||||
|
||||
@@ -57,6 +57,7 @@ import com.yunbao.common.bean.PrankGiftBean;
|
||||
import com.yunbao.common.bean.PrankGiftResultBean;
|
||||
import com.yunbao.common.bean.PrankHttpTurntableBean;
|
||||
import com.yunbao.common.bean.PrankProgressBean;
|
||||
import com.yunbao.common.bean.QiniuLog;
|
||||
import com.yunbao.common.bean.QuickGiftSendGiftModel;
|
||||
import com.yunbao.common.bean.RandomPkUserBean;
|
||||
import com.yunbao.common.bean.RankPkInfoBean;
|
||||
@@ -68,6 +69,8 @@ import com.yunbao.common.bean.RoomMicStatusModel;
|
||||
import com.yunbao.common.bean.SendMoneyLongModel;
|
||||
import com.yunbao.common.bean.SetAttentsModel;
|
||||
import com.yunbao.common.bean.StarChallengeStatusModel;
|
||||
import com.yunbao.common.bean.SudGameInfoBean;
|
||||
import com.yunbao.common.bean.SudGameScoreBean;
|
||||
import com.yunbao.common.bean.SudGameUserModel;
|
||||
import com.yunbao.common.bean.SudRoomListModel;
|
||||
import com.yunbao.common.bean.SudgameCodeModel;
|
||||
@@ -2294,6 +2297,48 @@ public class LiveNetManager {
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取房间金豆门槛和赢家获得的金豆
|
||||
* @param roomId
|
||||
* @param callback
|
||||
*/
|
||||
public void getScore(String roomId,HttpCallback<SudGameScoreBean> callback){
|
||||
API.get().pdLiveApi(mContext)
|
||||
.getScore(roomId)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(sudGameScoreBeanResponseModel -> {
|
||||
if (callback != null){
|
||||
callback.onSuccess(sudGameScoreBeanResponseModel.getData().getInfo());
|
||||
}
|
||||
}, throwable -> {
|
||||
if (callback != null){
|
||||
callback.onError(mContext.getString(R.string.net_error));
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取游戏中所有玩家的信息
|
||||
* @param roomId
|
||||
* @param callback
|
||||
*/
|
||||
public void getSudGameInfo(String roomId,HttpCallback<List<SudGameInfoBean>> callback){
|
||||
API.get().pdLiveApi(mContext)
|
||||
.getSudGameInfo(roomId)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(infoModel->{
|
||||
if (callback != null){
|
||||
callback.onSuccess(infoModel.getData().getInfo());
|
||||
}
|
||||
},throwable -> {
|
||||
if (callback != null){
|
||||
callback.onError(mContext.getString(R.string.net_error));
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
public void createSudRoom(String roomName, String goldenBeanNumber, String currencyType, String gameId, HttpCallback<CreateSudRoomModel> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.createSudRoom(roomName, goldenBeanNumber, currencyType, gameId)
|
||||
@@ -3237,6 +3282,31 @@ public class LiveNetManager {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 上报日志相关
|
||||
* @param type 1为查询,3为删除
|
||||
* @param callback
|
||||
*/
|
||||
public void getLogUpdateStatus(String type, HttpCallback<QiniuLog>callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.getPrankList(type)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(listResponseModel -> {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(listResponseModel.getData().getInfo());
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
throwable.printStackTrace();
|
||||
if (callback != null) {
|
||||
callback.onError(mContext.getString(R.string.net_error));
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
|
||||
}
|
||||
|
||||
public void updateFile(File file, HttpCallback<AvatarBean> callback) {
|
||||
MultipartBody.Part uploadFile = createUploadFile(file);
|
||||
|
||||
@@ -0,0 +1,297 @@
|
||||
package com.yunbao.common.pay.google;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.android.billingclient.api.BillingClient;
|
||||
import com.android.billingclient.api.BillingClientStateListener;
|
||||
import com.android.billingclient.api.BillingFlowParams;
|
||||
import com.android.billingclient.api.BillingResult;
|
||||
import com.android.billingclient.api.ConsumeParams;
|
||||
import com.android.billingclient.api.ProductDetails;
|
||||
import com.android.billingclient.api.Purchase;
|
||||
import com.android.billingclient.api.PurchasesUpdatedListener;
|
||||
import com.android.billingclient.api.QueryProductDetailsParams;
|
||||
import com.android.billingclient.api.QueryPurchasesParams;
|
||||
import com.google.android.gms.ads.identifier.AdvertisingIdClient;
|
||||
import com.google.android.gms.common.ConnectionResult;
|
||||
import com.google.android.gms.common.GoogleApiAvailability;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.yunbao.common.CommonAppContext;
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.http.CommonHttpUtil;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
//谷歌支付
|
||||
public class GooglePlay implements PurchasesUpdatedListener {
|
||||
|
||||
private String TAG = "mLog";
|
||||
private BillingClient billingClient;
|
||||
private GoogleBillingListener billingListener;
|
||||
|
||||
private GooglePlay() {
|
||||
init();
|
||||
}
|
||||
|
||||
private boolean init() {
|
||||
if (getGoogleService() && billingClient == null) {
|
||||
billingClient = BillingClient.newBuilder(CommonAppContext.sInstance)
|
||||
.setListener(this)
|
||||
.enablePendingPurchases()
|
||||
.build();
|
||||
startConnection();
|
||||
return true;
|
||||
}
|
||||
if (billingClient != null && !billingClient.isReady()) {//没有连接的话去连接
|
||||
startConnection();
|
||||
}
|
||||
if (billingClient == null)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
private void startConnection() {
|
||||
if (!billingClient.isReady()) {
|
||||
//请求连接到GooglePay
|
||||
billingClient.startConnection(new BillingClientStateListener() {
|
||||
@Override
|
||||
public void onBillingSetupFinished(@NonNull BillingResult billingResult) {
|
||||
int code = billingResult.getResponseCode();
|
||||
if (code != BillingClient.BillingResponseCode.OK) {
|
||||
String msg = billingResult.getDebugMessage();
|
||||
Log.e(TAG, "连接到GooglePay失败 code = " + code + " msg = " + msg);
|
||||
return;
|
||||
}
|
||||
Log.e(TAG, "连接到GooglePay成功");
|
||||
}
|
||||
|
||||
//连接失败
|
||||
@Override
|
||||
public void onBillingServiceDisconnected() {
|
||||
Log.e(TAG, "连接到GooglePay失败,请重试");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//点击商品,先查询商品 然后出来支付界面,调用下单
|
||||
public void purchase(Activity activity, String orderNumber, String id) {
|
||||
if (!init()) {
|
||||
return;
|
||||
}
|
||||
ImmutableList<QueryProductDetailsParams.Product> productList = ImmutableList.of(QueryProductDetailsParams.Product.newBuilder()
|
||||
.setProductId(id)
|
||||
.setProductType(BillingClient.ProductType.INAPP)
|
||||
.build());
|
||||
QueryProductDetailsParams queryProductDetailsParams =
|
||||
QueryProductDetailsParams.newBuilder()
|
||||
.setProductList(productList)
|
||||
.build();
|
||||
billingClient.queryProductDetailsAsync(
|
||||
queryProductDetailsParams,
|
||||
(billingResult, list) -> {
|
||||
//查询商品成功
|
||||
int code = billingResult.getResponseCode();
|
||||
if (code != BillingClient.BillingResponseCode.OK || list == null || list.isEmpty()) {
|
||||
String msg = billingResult.getDebugMessage();
|
||||
Log.e(TAG, "查询商品失败 code = " + code + " msg = " + msg);
|
||||
return;
|
||||
}
|
||||
Log.e(TAG, "查询商品成功");
|
||||
buyIt(activity, orderNumber, list.get(0));
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
//开始下单,准备生成订单了
|
||||
private void buyIt(Activity activity, String orderNumber, ProductDetails productDetails) {
|
||||
List<BillingFlowParams.ProductDetailsParams> productDetailsParamsList = new ArrayList<>();
|
||||
productDetailsParamsList.add(BillingFlowParams.ProductDetailsParams.newBuilder()
|
||||
// retrieve a value for "productDetails" by calling queryProductDetailsAsync()
|
||||
.setProductDetails(productDetails)
|
||||
// For one-time products, "setOfferToken" method shouldn't be called.
|
||||
// For subscriptions, to get an offer token, call
|
||||
// ProductDetails.subscriptionOfferDetails() for a list of offers
|
||||
// that are available to the user.
|
||||
//一次性商品不需要传token
|
||||
// .setOfferToken(selectedOfferToken)
|
||||
.build());
|
||||
|
||||
BillingFlowParams billingFlowParams = BillingFlowParams.newBuilder()
|
||||
.setProductDetailsParamsList(productDetailsParamsList)
|
||||
.setObfuscatedAccountId(orderNumber)//好像是账号id
|
||||
.build();
|
||||
|
||||
BillingResult billingResult = billingClient.launchBillingFlow(activity, billingFlowParams);
|
||||
int code = billingResult.getResponseCode();
|
||||
if (code != BillingClient.BillingResponseCode.OK) {
|
||||
String msg = billingResult.getDebugMessage();
|
||||
Log.e(TAG, "购买商品失败 code = " + code + " msg = " + msg);
|
||||
// ToastUtil.show(getString(R.string.pay_suc));
|
||||
return;
|
||||
}
|
||||
Log.e(TAG, "购买商品 " + productDetails.toString());
|
||||
}
|
||||
|
||||
//消耗商品 支付成功之后,调用我们后台下发商品成功之后,调用消耗
|
||||
public void consume(List<Purchase> list) {
|
||||
if (!init()) {
|
||||
return;
|
||||
}
|
||||
for (Purchase purchase : list) {
|
||||
getConsumeGoods(purchase);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 消耗所有商品
|
||||
*/
|
||||
public void consumeAll() {
|
||||
if (!init()) {
|
||||
return;
|
||||
}
|
||||
//以下示例展示了如何提取用户的订阅购买交易。请注意,queryPurchasesAsync() 仅返回有效订阅和非消耗型一次性购买交易。
|
||||
QueryPurchasesParams inAppPurchasesQuery = QueryPurchasesParams.newBuilder().setProductType(BillingClient.ProductType.INAPP).build();
|
||||
billingClient.queryPurchasesAsync(inAppPurchasesQuery, (billingResult, list) -> {
|
||||
if (BillingClient.BillingResponseCode.OK == billingResult.getResponseCode()) {
|
||||
for (Purchase purchase : list) {
|
||||
//0:PurchaseState.UNSPECIFIED_STATE:未知状态
|
||||
//1:PurchaseState.PURCHASED:付款完成
|
||||
//2:PurchaseState.PENDING:购买正在等待付款完成。
|
||||
if (Purchase.PurchaseState.PURCHASED == purchase.getPurchaseState()) {
|
||||
//调用google去消费
|
||||
//如果之后有问题再研究怎么解决掉单的问题
|
||||
CommonHttpUtil.notifyGoogle(purchase.getPurchaseToken(),
|
||||
purchase.getProducts().get(0), new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if (code == 0) {
|
||||
getConsumeGoods(purchase);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 公共消费商品接口
|
||||
*/
|
||||
private void getConsumeGoods(Purchase purchase) {
|
||||
if (purchase != null) {
|
||||
Log.i(TAG, "-----开始消耗商品:" + purchase.toString());
|
||||
ConsumeParams.Builder consumeParams = ConsumeParams.newBuilder();
|
||||
consumeParams.setPurchaseToken(purchase.getPurchaseToken());
|
||||
//调用消耗商品方法
|
||||
consumeAsync(consumeParams.build(), purchase);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 消耗商品
|
||||
* int SERVICE_TIMEOUT = -3; //服务超时
|
||||
* int FEATURE_NOT_SUPPORTED = -2; //不支持功能
|
||||
* int SERVICE_DISCONNECTED = -1; //服务单元已断开
|
||||
* int OK = 0; //成功
|
||||
* int USER_CANCELED = 1; //用户按上一步或取消对话框
|
||||
* int SERVICE_UNAVAILABLE = 2; //网络连接断开
|
||||
* int BILLING_UNAVAILABLE = 3; //所请求的类型不支持 Google Play 结算服务 AIDL 版本
|
||||
* int ITEM_UNAVAILABLE = 4; //请求的商品已不再出售。
|
||||
* int DEVELOPER_ERROR = 5; //提供给 API 的参数无效。此错误也可能说明应用未针对结算服务正确签名或设置,或者在其清单中缺少必要的权限。
|
||||
* int ERROR = 6; //API 操作期间出现严重错误
|
||||
* int ITEM_ALREADY_OWNED = 7; //未能购买,因为已经拥有此商品
|
||||
* int ITEM_NOT_OWNED = 8; //未能消费,因为尚未拥有此商品
|
||||
*/
|
||||
private void consumeAsync(ConsumeParams consumeParams, Purchase purchase) {
|
||||
if (!init()) {
|
||||
return;
|
||||
}
|
||||
billingClient.consumeAsync(consumeParams, (billingResult, purchaseToken) -> {
|
||||
if (billingResult.getResponseCode() == BillingClient.BillingResponseCode.OK) {
|
||||
Log.i(TAG, "-----消耗商品成功");
|
||||
} else {
|
||||
Log.i(TAG, "-----消耗商品失败" + billingResult.toString() + "---" + purchaseToken + "--code:" + billingResult.getResponseCode());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPurchasesUpdated(@NonNull BillingResult billingResult, @Nullable List<Purchase> purchases) {
|
||||
if (billingResult.getResponseCode() == BillingClient.BillingResponseCode.OK
|
||||
&& purchases != null) {
|
||||
//支付成功
|
||||
if (billingListener != null)//消耗掉商品放到外面调用我们服务器成功的时候去消耗 todo 暂时注释掉 这样可以模拟掉单的问题
|
||||
billingListener.onPaySuccess(purchases);
|
||||
/*
|
||||
* 一旦您验证了购买交易,您的应用就可以向用户授予使用权了。若要确认与购买交易相关联的用户账号,
|
||||
* 您可以使用 Purchases.products:get 返回的 ProductPurchase.obfuscatedExternalAccountId(适用于应用内商品的购买交易)
|
||||
* 和 Purchases.subscriptions:get 返回的 SubscriptionPurchase.obfuscatedExternalAccountId(适用于服务器端的订阅),
|
||||
* 或者 Purchase.getAccountIdentifiers() 在客户端返回的 obfuscatedAccountId(如果在交易时已使用 setObfuscatedAccountId 设置该 ID)。
|
||||
* */
|
||||
// purchases.get(0).getAccountIdentifiers()
|
||||
for (Purchase purchase : purchases) {
|
||||
Log.d("mLog", "谷歌支付的回调 " + purchase);
|
||||
}
|
||||
} else if (billingResult.getResponseCode() == BillingClient.BillingResponseCode.USER_CANCELED) {
|
||||
//取消支付了
|
||||
if (billingListener != null)
|
||||
billingListener.onPayFailed(CommonAppContext.sInstance.getString(R.string.pay_cancel));
|
||||
} else {
|
||||
//支付失败
|
||||
if (billingListener != null)
|
||||
billingListener.onPayFailed(CommonAppContext.sInstance.getString(R.string.pay_fail));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 检测GooglePlay服务是否可用(需要导入包api "com.google.android.gms:play-services-location:11.8.0",也可以不检查,跳过这个代码)
|
||||
*/
|
||||
public boolean getGoogleService() {
|
||||
GoogleApiAvailability googleApiAvailability = GoogleApiAvailability.getInstance();
|
||||
if (googleApiAvailability != null) {
|
||||
int resultCode = googleApiAvailability.isGooglePlayServicesAvailable(CommonAppContext.sInstance);
|
||||
return resultCode == ConnectionResult.SUCCESS;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public String getAdId() {
|
||||
try {
|
||||
return AdvertisingIdClient.getAdvertisingIdInfo(CommonAppContext.sInstance).getId();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
Log.e("GooglePlay", "获取谷歌的id错误了");
|
||||
}
|
||||
return "google_default_id";
|
||||
}
|
||||
|
||||
public void setBillingListener(GoogleBillingListener listener) {
|
||||
billingListener = listener;
|
||||
}
|
||||
|
||||
/**
|
||||
* 定义接口返回支付结果
|
||||
*/
|
||||
public interface GoogleBillingListener {
|
||||
void onPaySuccess(List<Purchase> purchases);
|
||||
|
||||
void onPayFailed(String msg);
|
||||
}
|
||||
|
||||
public static class GooglePlayHelper {
|
||||
static GooglePlay googlePlay = new GooglePlay();
|
||||
}
|
||||
|
||||
public static GooglePlay getInstance() {
|
||||
return GooglePlayHelper.googlePlay;
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,7 @@ package com.yunbao.common.pay.samsung;
|
||||
import android.content.Context;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.samsung.android.sdk.iap.lib.helper.HelperDefine;
|
||||
import com.samsung.android.sdk.iap.lib.constants.HelperDefine;
|
||||
import com.samsung.android.sdk.iap.lib.helper.IapHelper;
|
||||
import com.samsung.android.sdk.iap.lib.listener.OnConsumePurchasedItemsListener;
|
||||
import com.samsung.android.sdk.iap.lib.listener.OnGetOwnedListListener;
|
||||
@@ -11,6 +11,8 @@ import com.samsung.android.sdk.iap.lib.listener.OnPaymentListener;
|
||||
import com.samsung.android.sdk.iap.lib.vo.ConsumeVo;
|
||||
import com.samsung.android.sdk.iap.lib.vo.ErrorVo;
|
||||
import com.samsung.android.sdk.iap.lib.vo.OwnedProductVo;
|
||||
import com.samsung.android.sdk.iap.lib.vo.PurchaseVo;
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.utils.L;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -57,9 +59,27 @@ public class SamsungUtil {
|
||||
*/
|
||||
public void buy(String skuId, OnPaymentListener onPaymentListener) {
|
||||
//购买
|
||||
iapHelper.startPayment(skuId, "", onPaymentListener);
|
||||
iapHelper.startPayment(skuId, "", (errorVo, purchaseVo) -> {
|
||||
if (purchaseVo != null) {
|
||||
onPaymentListener.onPaymentSuccess(purchaseVo.getPurchaseId());
|
||||
} else {
|
||||
if (errorVo.getErrorCode() == HelperDefine.IAP_PAYMENT_IS_CANCELED) {
|
||||
onPaymentListener.onPaymentFailed(mContext.getString(R.string.pay_cancel));
|
||||
} else {
|
||||
onPaymentListener.onPaymentFailed(errorVo.getErrorString());
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
public interface OnPaymentListener {
|
||||
void onPaymentSuccess(String purchaseVo);
|
||||
|
||||
void onPaymentFailed(String errorVo);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 消耗指定商品
|
||||
*
|
||||
|
||||
@@ -17,11 +17,13 @@ import com.yunbao.common.sud.decorator.SudFSTAPPDecorator;
|
||||
import com.yunbao.common.sud.model.GameConfigModel;
|
||||
import com.yunbao.common.sud.model.GameViewInfoModel;
|
||||
import com.yunbao.common.sud.state.MGStateResponse;
|
||||
import com.yunbao.common.sud.state.SudMGPMGState;
|
||||
import com.yunbao.common.utils.StringUtil;
|
||||
import com.yunbao.common.utils.SudJsonUtils;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
|
||||
import tech.sud.logger.LogUtils;
|
||||
import tech.sud.mgp.core.ISudFSMStateHandle;
|
||||
import tech.sud.mgp.core.ISudFSTAPP;
|
||||
import tech.sud.mgp.core.ISudListenerInitSDK;
|
||||
@@ -479,4 +481,13 @@ public abstract class BaseGameViewModel implements SudFSMMGListener {
|
||||
return sudFSMMGDecorator.getSudFSMMGCache();
|
||||
}
|
||||
|
||||
/**
|
||||
* 游戏结算状态
|
||||
*/
|
||||
@Override
|
||||
public void onGameMGCommonGameSettle(ISudFSMStateHandle handle, SudMGPMGState.MGCommonGameSettle model) {
|
||||
LogUtils.e("yqw=====>"+model);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -6,8 +6,13 @@ import android.view.View;
|
||||
|
||||
import androidx.lifecycle.MutableLiveData;
|
||||
|
||||
import com.blankj.utilcode.util.LogUtils;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.CommonAppContext;
|
||||
import com.yunbao.common.bean.PrankProgressBean;
|
||||
import com.yunbao.common.bean.SudGameInfoBean;
|
||||
import com.yunbao.common.bean.SudGameScoreBean;
|
||||
import com.yunbao.common.bean.SudSettleBean;
|
||||
import com.yunbao.common.bean.SudgameCodeModel;
|
||||
import com.yunbao.common.http.base.HttpCallback;
|
||||
import com.yunbao.common.http.live.LiveNetManager;
|
||||
@@ -15,9 +20,14 @@ import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.sud.model.GameConfigModel;
|
||||
import com.yunbao.common.sud.model.GameViewInfoModel;
|
||||
import com.yunbao.common.sud.state.SudMGPMGState;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
import tech.sud.mgp.core.ISudFSMMG;
|
||||
import tech.sud.mgp.core.ISudFSMStateHandle;
|
||||
@@ -62,6 +72,22 @@ public class QuickStartGameViewModel extends BaseGameViewModel {
|
||||
public String languageCode = "zh-TW";
|
||||
|
||||
public final MutableLiveData<View> gameViewLiveData = new MutableLiveData<>(); // 游戏View回调
|
||||
private SudGameScoreBean sudGameScoreBean;//房间金豆的门槛和赢家奖励
|
||||
private List<SudGameInfoBean> sudGameInfoBeanList = new ArrayList<>();//玩家信息
|
||||
public final MutableLiveData<List<SudSettleBean>> listMutableLiveData = new MutableLiveData<>();//玩家排名信息
|
||||
|
||||
public void setSudGameInfoBeanList(List<SudGameInfoBean> sudGameInfoBeanList) {
|
||||
this.sudGameInfoBeanList = sudGameInfoBeanList;
|
||||
}
|
||||
|
||||
|
||||
public SudGameScoreBean getSudGameScoreBean() {
|
||||
return sudGameScoreBean;
|
||||
}
|
||||
|
||||
public void setSudGameScoreBean(SudGameScoreBean sudGameScoreBean) {
|
||||
this.sudGameScoreBean = sudGameScoreBean;
|
||||
}
|
||||
|
||||
/**
|
||||
* 向接入方服务器获取code
|
||||
@@ -70,7 +96,7 @@ public class QuickStartGameViewModel extends BaseGameViewModel {
|
||||
protected void getCode(Activity activity, String userId, String appId, GameGetCodeListener listener) {
|
||||
if (IMLoginManager.get(activity).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) {
|
||||
languageCode = "zh-TW";
|
||||
}else {
|
||||
} else {
|
||||
languageCode = "en-US";
|
||||
}
|
||||
// TODO: 2022/6/10 注意,这里是演示使用OkHttpClient请求hello-sud服务
|
||||
@@ -147,6 +173,81 @@ public class QuickStartGameViewModel extends BaseGameViewModel {
|
||||
// });
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取房间的金豆数量和赢家获得的金豆
|
||||
*/
|
||||
public void getScore(String roomId, Activity activity) {
|
||||
LiveNetManager.get(activity).getScore(roomId, new HttpCallback<SudGameScoreBean>() {
|
||||
@Override
|
||||
public void onSuccess(SudGameScoreBean data) {
|
||||
sudGameScoreBean = data;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
ToastUtil.show(error);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 进行排名和结算
|
||||
*/
|
||||
public void sudGameRank(SudMGPMGState.MGCommonGameSettle mgCommonGameSettle) {
|
||||
List<SudSettleBean> settleBeans = new ArrayList<>();
|
||||
int playerNum = mgCommonGameSettle.results.size();//玩家人数
|
||||
int winnerNUm = countWinners(mgCommonGameSettle.results);//第一名人数
|
||||
int winNum;//赢得或者失去的金豆
|
||||
// 构建结算信息
|
||||
for (SudMGPMGState.MGCommonGameSettle.PlayerResult playerResult : mgCommonGameSettle.results) {
|
||||
String uid = playerResult.uid;
|
||||
int rank = playerResult.rank;
|
||||
SudGameInfoBean sudGameInfoBean = findGameInfoBean(uid);
|
||||
if (sudGameInfoBean == null) return;
|
||||
|
||||
if (sudGameScoreBean.getGame_mode() == 1) {
|
||||
//双人游戏
|
||||
if (winnerNUm == 1){
|
||||
winNum = (rank == 1) ? (int) (sudGameScoreBean.getRoom_sill() * 0.8) : -sudGameScoreBean.getRoom_sill();
|
||||
}else {
|
||||
winNum = -sudGameScoreBean.getRoom_ticket();
|
||||
}
|
||||
} else {
|
||||
//多人游戏
|
||||
if (rank == 1){
|
||||
winNum = (playerNum*sudGameScoreBean.getRoom_win_num()-winnerNUm*sudGameScoreBean.getRoom_sill())/winnerNUm;
|
||||
}else {
|
||||
winNum = -sudGameScoreBean.getRoom_sill();
|
||||
}
|
||||
}
|
||||
settleBeans.add(new SudSettleBean(uid,sudGameInfoBean.getNick_name(),sudGameInfoBean.getAvatar_url(),rank,winNum));
|
||||
}
|
||||
// 更新LiveData
|
||||
listMutableLiveData.setValue(settleBeans);
|
||||
}
|
||||
|
||||
// 统计第一名的玩家数量
|
||||
private int countWinners(List<SudMGPMGState.MGCommonGameSettle.PlayerResult> results) {
|
||||
int count = 0;
|
||||
for (SudMGPMGState.MGCommonGameSettle.PlayerResult result : results) {
|
||||
if (result.rank == 1) {
|
||||
count++;
|
||||
}
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
// 根据uid查找对应的游戏信息Bean
|
||||
private SudGameInfoBean findGameInfoBean(String uid) {
|
||||
for (SudGameInfoBean sudGameInfoBean : sudGameInfoBeanList) {
|
||||
if (sudGameInfoBean.getUid().equals(uid)) {
|
||||
return sudGameInfoBean;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 设置当前用户id(接入方定义)
|
||||
*/
|
||||
@@ -255,7 +356,7 @@ public class QuickStartGameViewModel extends BaseGameViewModel {
|
||||
@Override
|
||||
public void onGameMGCommonGameState(ISudFSMStateHandle handle, SudMGPMGState.MGCommonGameState model) {
|
||||
super.onGameMGCommonGameState(handle, model);
|
||||
Log.e("QuickStartGameViewModel",model.toString());
|
||||
Log.e("QuickStartGameViewModel", model.toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ package com.yunbao.common.sud.decorator;
|
||||
|
||||
import android.util.Log;
|
||||
|
||||
import com.blankj.utilcode.util.LogUtils;
|
||||
import com.yunbao.common.event.CheckRemainingBalanceEvent;
|
||||
import com.yunbao.common.sud.state.SudMGPMGState;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
@@ -177,11 +178,11 @@ public class SudFSMMGDecorator implements ISudFSMMG {
|
||||
} else {
|
||||
listener.onGameMGCommonGameSettle(handle, mgCommonGameSettle);
|
||||
}
|
||||
Bus.get().post(new CheckRemainingBalanceEvent().setSudMGPMGState(SudMGPMGState.MG_COMMON_GAME_SETTLE));
|
||||
Bus.get().post(new CheckRemainingBalanceEvent().setSudMGPMGState(SudMGPMGState.MG_COMMON_GAME_SETTLE).setMgCommonGameSettle(mgCommonGameSettle));
|
||||
break;
|
||||
case SudMGPMGState.MG_COMMON_SELF_CLICK_JOIN_BTN: // 4. 加入游戏按钮点击状态
|
||||
SudMGPMGState.MGCommonSelfClickJoinBtn mgCommonSelfClickJoinBtn = SudJsonUtils.fromJson(dataJson, SudMGPMGState.MGCommonSelfClickJoinBtn.class);
|
||||
Bus.get().post(new CheckRemainingBalanceEvent().setSeatIndex(mgCommonSelfClickJoinBtn.seatIndex).setSudMGPMGState(SudMGPMGState.MG_COMMON_SELF_CLICK_JOIN_BTN));
|
||||
Bus.get().post(new CheckRemainingBalanceEvent().setSeatIndex(mgCommonSelfClickJoinBtn.seatIndex).setSudMGPMGState(SudMGPMGState.MG_COMMON_SELF_CLICK_JOIN_BTN).setSubReady(false));
|
||||
// if (listener == null) {
|
||||
// ISudFSMStateHandleUtils.handleSuccess(handle);
|
||||
// } else {
|
||||
@@ -258,7 +259,7 @@ public class SudFSMMGDecorator implements ISudFSMMG {
|
||||
// } else {
|
||||
// listener.onGameMGCommonSelfClickGameSettleAgainBtn(handle, mgCommonSelfClickGameSettleAgainBtn);
|
||||
// }
|
||||
Bus.get().post(new CheckRemainingBalanceEvent().setSudMGPMGState(SudMGPMGState.MG_COMMON_SELF_CLICK_GAME_SETTLE_AGAIN_BTN));
|
||||
Bus.get().post(new CheckRemainingBalanceEvent().setSudMGPMGState(SudMGPMGState.MG_COMMON_SELF_CLICK_GAME_SETTLE_AGAIN_BTN).setSubReady(false));
|
||||
break;
|
||||
case SudMGPMGState.MG_COMMON_GAME_SOUND_LIST: // 13. 游戏上报游戏中的声音列表(2021-12-30新增,现在只支持碰碰我最强)
|
||||
SudMGPMGState.MGCommonGameSoundList mgCommonGameSoundList = SudJsonUtils.fromJson(dataJson, SudMGPMGState.MGCommonGameSoundList.class);
|
||||
|
||||
@@ -170,6 +170,15 @@ public class SudMGPMGState implements Serializable {
|
||||
// 游戏结果玩家列表
|
||||
public List<PlayerResult> results;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "MGCommonGameSettle{" +
|
||||
"gameMode=" + gameMode +
|
||||
", gameRoundId='" + gameRoundId + '\'' +
|
||||
", results=" + results +
|
||||
'}';
|
||||
}
|
||||
|
||||
/**
|
||||
* 游戏结果玩家定义
|
||||
*/
|
||||
@@ -181,6 +190,19 @@ public class SudMGPMGState implements Serializable {
|
||||
public int isEscaped; // 是否逃跑 1:逃跑 0:非逃跑
|
||||
public String killerId; // 杀自己的玩家的id
|
||||
public int isAI; // 是否是AI玩家,1为AI
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "PlayerResult{" +
|
||||
"uid='" + uid + '\'' +
|
||||
", rank=" + rank +
|
||||
", award=" + award +
|
||||
", score=" + score +
|
||||
", isEscaped=" + isEscaped +
|
||||
", killerId='" + killerId + '\'' +
|
||||
", isAI=" + isAI +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ public class UploadBean {
|
||||
public static final int IMG = 0;
|
||||
public static final int VIDEO = 1;
|
||||
public static final int VOICE = 2;
|
||||
public static final int LOG = 3;
|
||||
private File mOriginFile;//要被上传的源文件
|
||||
private File mCompressFile;//压缩后的图片文件
|
||||
private String mRemoteFileName;//上传成功后在云存储上的文件名字
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.yunbao.common.upload;
|
||||
|
||||
import static java.text.DateFormat.DEFAULT;
|
||||
|
||||
import android.content.Context;
|
||||
import android.text.TextUtils;
|
||||
|
||||
@@ -11,6 +13,7 @@ import com.qiniu.android.storage.UpCompletionHandler;
|
||||
import com.qiniu.android.storage.UploadManager;
|
||||
import com.yunbao.common.http.CommonHttpUtil;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.utils.L;
|
||||
import com.yunbao.common.utils.StringUtil;
|
||||
|
||||
@@ -18,7 +21,10 @@ import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.io.File;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import top.zibin.luban.Luban;
|
||||
|
||||
@@ -52,7 +58,9 @@ public class UploadQnImpl implements UploadStrategy {
|
||||
assert response != null;
|
||||
mList.get(mIndex).setRemoteAccessUrl(response.getString("key"));
|
||||
} catch (JSONException e) {
|
||||
throw new RuntimeException(e);
|
||||
// throw new RuntimeException(e);
|
||||
L.e(e);
|
||||
return;
|
||||
}
|
||||
if (mList == null || mList.size() == 0) {
|
||||
if (mUploadCallback != null) {
|
||||
@@ -72,6 +80,8 @@ public class UploadQnImpl implements UploadStrategy {
|
||||
compressedFile.delete();
|
||||
}
|
||||
}
|
||||
} else if (uploadBean.getType() == UploadBean.LOG) {
|
||||
uploadBean.getOriginFile().delete();
|
||||
}
|
||||
mIndex++;
|
||||
if (mIndex < mList.size()) {
|
||||
@@ -90,6 +100,10 @@ public class UploadQnImpl implements UploadStrategy {
|
||||
|
||||
@Override
|
||||
public void upload(List<UploadBean> list, boolean needCompress, UploadCallback callback, boolean isImg) {
|
||||
upload(list, needCompress, callback, isImg, false);
|
||||
}
|
||||
|
||||
public void upload(List<UploadBean> list, boolean needCompress, UploadCallback callback, boolean isImg, boolean isLog) {
|
||||
System.err.println("-------upload------>" + list.size());
|
||||
if (callback == null) {
|
||||
return;
|
||||
@@ -127,7 +141,11 @@ public class UploadQnImpl implements UploadStrategy {
|
||||
}
|
||||
};
|
||||
}
|
||||
CommonHttpUtil.getUploadQiNiuToken(mGetUploadTokenCallback, isImg);
|
||||
if (isLog) {
|
||||
CommonHttpUtil.getUploadQiNiuTokenLog(mGetUploadTokenCallback, list.get(0).getOriginFile().getName());
|
||||
} else {
|
||||
CommonHttpUtil.getUploadQiNiuToken(mGetUploadTokenCallback, isImg);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -159,8 +177,16 @@ public class UploadQnImpl implements UploadStrategy {
|
||||
bean.setRemoteFileName(StringUtil.contact(StringUtil.generateFileName(), ".mp4"));
|
||||
} else if (bean.getType() == UploadBean.VOICE) {
|
||||
bean.setRemoteFileName(StringUtil.contact(StringUtil.generateFileName(), ".m4a"));
|
||||
} else if (bean.getType() == UploadBean.LOG) {
|
||||
bean.setRemoteFileName("logs/"
|
||||
+ IMLoginManager.get(mContext).getUserInfo().getId()
|
||||
+ "/"
|
||||
+ SimpleDateFormat.getDateInstance(DEFAULT, Locale.CHINA).format(new Date())
|
||||
+ "/"
|
||||
+ bean.getOriginFile().getName()
|
||||
);
|
||||
}
|
||||
System.err.println("-------mIndex >= bean.getType() == UploadBean.IMG------>" + bean);
|
||||
System.err.println("-------mIndex >= bean.getType() == " + bean.getType() + "------>" + bean);
|
||||
upload(bean);
|
||||
/*if (bean.getType() == UploadBean.IMG && mNeedCompress) {
|
||||
System.err.println("-------UploadBean.IMG && mNeedCompress------>" + bean + "UploadBean.IMG:" + UploadBean.IMG + "__mNeedCompress" + mNeedCompress);
|
||||
|
||||
@@ -2,8 +2,8 @@ package com.yunbao.common.utils;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.util.Log;
|
||||
|
||||
import com.yunbao.common.BuildConfig;
|
||||
|
||||
import com.yunbao.common.manager.OpenAdManager;
|
||||
|
||||
import java.util.Stack;
|
||||
|
||||
@@ -2,6 +2,13 @@ package com.yunbao.common.utils;
|
||||
|
||||
import android.util.Log;
|
||||
|
||||
import org.json.JSONException;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.Locale;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* Created by cxf on 2017/8/3.
|
||||
*/
|
||||
@@ -24,13 +31,23 @@ public class L {
|
||||
}
|
||||
}
|
||||
|
||||
final static SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.CHINA);
|
||||
|
||||
public static void e(String tag, String s) {
|
||||
if (sDeBug) {
|
||||
Log.e(tag, s);
|
||||
} else {
|
||||
String uuid = UUID.randomUUID().toString();
|
||||
Log.e(tag, uuid);
|
||||
LogUtils.addSafeLog(dateFormat.format(new Date()) + " [" + uuid + "|" + tag + "] " + s);
|
||||
}
|
||||
}
|
||||
|
||||
public static void setDeBug(boolean deBug) {
|
||||
sDeBug = deBug;
|
||||
}
|
||||
|
||||
public static void e(Exception e) {
|
||||
Log.e("Exception", e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,28 +24,25 @@ import com.lzy.okgo.request.PostRequest;
|
||||
import com.lzy.okserver.OkUpload;
|
||||
import com.lzy.okserver.upload.UploadListener;
|
||||
import com.lzy.okserver.upload.UploadTask;
|
||||
import com.yunbao.common.BuildConfig;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.bean.IMLoginModel;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.http.live.LiveNetManager;
|
||||
import com.yunbao.common.upload.UploadBean;
|
||||
import com.yunbao.common.upload.UploadCallback;
|
||||
import com.yunbao.common.upload.UploadQnImpl;
|
||||
|
||||
import java.io.BufferedOutputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.nio.channels.Channels;
|
||||
import java.nio.channels.FileChannel;
|
||||
import java.nio.channels.WritableByteChannel;
|
||||
import java.nio.file.Files;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipOutputStream;
|
||||
|
||||
import okhttp3.Call;
|
||||
import okhttp3.Callback;
|
||||
@@ -149,91 +146,56 @@ public class LogUtil {
|
||||
|
||||
|
||||
public static void shareFile(Context context) {
|
||||
try {
|
||||
IMLoginModel bean = IMLoginManager.get(context).getUserInfo();
|
||||
boolean isAnchor = false;
|
||||
if (bean != null) {
|
||||
isAnchor = bean.anchorUserType();
|
||||
}
|
||||
//有debug文件或主播才允许
|
||||
if (!new File(Environment.getExternalStorageDirectory().getAbsolutePath(), "pdlive.debug").exists() && !isAnchor) {
|
||||
return;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
return;
|
||||
}
|
||||
/* if (PermissionChecker.checkCallingOrSelfPermission(context, Manifest.permission.WRITE_EXTERNAL_STORAGE) != PERMISSION_GRANTED) {
|
||||
ActivityCompat.requestPermissions((Activity) context, new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE}, 100);
|
||||
return;
|
||||
}*/
|
||||
String title = "[PDLIVE]" + CommonAppConfig.getInstance().getUid() + "_";
|
||||
String today = title + SimpleDateFormat.getDateInstance(DEFAULT, Locale.CHINA).format(new Date());
|
||||
File dir = new File(context.getDir("files", Context.MODE_PRIVATE).getAbsolutePath() + File.separator);
|
||||
File dir = new File("/data/data/" + context.getPackageName() + File.separator);
|
||||
File zip = new File(context.getDir("files", Context.MODE_PRIVATE).getAbsolutePath() + File.separator + today + ".zip");
|
||||
|
||||
try {
|
||||
ZipOutputStream zos = new ZipOutputStream(new BufferedOutputStream(new FileOutputStream(zip)));
|
||||
FileInputStream fis = null;
|
||||
WritableByteChannel writableByteChannel = Channels.newChannel(zos);
|
||||
if (dir.listFiles() != null) {
|
||||
for (File file : dir.listFiles()) {
|
||||
if (file.getName().endsWith(".log")) {
|
||||
ZipEntry entry = new ZipEntry(file.getName());
|
||||
zos.putNextEntry(entry);
|
||||
fis = new FileInputStream(file);
|
||||
FileChannel channel = fis.getChannel();
|
||||
channel.transferTo(0, file.length() - 1, writableByteChannel);
|
||||
fis.close();
|
||||
List<String> filters = getFiltersList(context.getPackageName());
|
||||
filters.add(context.getPackageName() + File.separator + "app_files" + File.separator + today + ".zip");
|
||||
List<String> srcList = new ArrayList<>();
|
||||
srcList.add(dir.getAbsolutePath());
|
||||
srcList.add(context.getExternalFilesDir("").getAbsolutePath());
|
||||
LogUtils.endSafeLog();
|
||||
ZipUtils.zipFolder(srcList, zip.getAbsolutePath(), filters, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (BuildConfig.DEBUG) {
|
||||
return;
|
||||
}
|
||||
UploadQnImpl mUploadStrategy = new UploadQnImpl(context);
|
||||
List<UploadBean> list = new ArrayList<>();
|
||||
list.add(new UploadBean(zip, UploadBean.LOG));
|
||||
mUploadStrategy.upload(list, false, new UploadCallback() {
|
||||
@Override
|
||||
public void onFinish(List<UploadBean> list, boolean success) {
|
||||
if (success) {
|
||||
LiveNetManager.get(context).getLogUpdateStatus("3", null);
|
||||
}
|
||||
LogUtils.startSafeLog(context);
|
||||
}
|
||||
}, false, true);
|
||||
}
|
||||
}
|
||||
zos.close();
|
||||
writableByteChannel.close();
|
||||
});
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
if (zip.exists()) {
|
||||
DialogUitl.showSimpleDialog(context, "上报日志", new DialogUitl.SimpleCallback() {
|
||||
@Override
|
||||
public void onConfirmClick(Dialog dialog, String content) {
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
uploadLog(zip);
|
||||
}
|
||||
}).start();
|
||||
dialog.dismiss();
|
||||
ToastUtil.show("OK");
|
||||
Intent share = new Intent(Intent.ACTION_SEND);
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||
Uri contentUri = FileProvider.getUriForFile(context, context.getPackageName() + ".fileprovider", zip);
|
||||
share.putExtra(Intent.EXTRA_STREAM, contentUri);
|
||||
share.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
|
||||
} else {
|
||||
share.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(zip));
|
||||
}
|
||||
share.setType("application/vnd.ms-excel");
|
||||
share.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
share.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
|
||||
context.startActivity(Intent.createChooser(share, "分享文件"));
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R && CommonAppConfig.IS_GOOGLE_PLAY == 0) {
|
||||
if (!Environment.isExternalStorageManager()) {
|
||||
Intent intent = new Intent(ACTION_MANAGE_ALL_FILES_ACCESS_PERMISSION);
|
||||
context.startActivity(intent);
|
||||
}
|
||||
}
|
||||
File out = new File(Environment.getExternalStorageDirectory().getAbsolutePath() + File.separator + zip.getName());
|
||||
try {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
Files.copy(zip.toPath(), out.toPath());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
private static @NonNull List<String> getFiltersList(String packageName) {
|
||||
List<String> filters = new ArrayList<>();
|
||||
filters.add(packageName + File.separator + "files" + File.separator + "gif");
|
||||
filters.add(packageName + File.separator + "app_textures");
|
||||
filters.add(packageName + File.separator + "app_webview");
|
||||
filters.add(packageName + File.separator + "code_cache");
|
||||
filters.add(packageName + File.separator + "databases");
|
||||
filters.add(packageName + File.separator + "cache" + File.separator + "https");
|
||||
filters.add(packageName + File.separator + "cache" + File.separator + "image");
|
||||
filters.add(packageName + File.separator + "cache" + File.separator + "jtechCache");
|
||||
filters.add(packageName + File.separator + "cache" + File.separator + "picasso-cache");
|
||||
filters.add(packageName + File.separator + "cache" + File.separator + "svga");
|
||||
filters.add(packageName + File.separator + "cache" + File.separator + "WebView");
|
||||
return filters;
|
||||
}
|
||||
|
||||
private static String TAG = "Upload";
|
||||
@@ -251,7 +213,9 @@ public class LogUtil {
|
||||
body.put("appVersion", CommonAppConfig.getInstance().getVersion());
|
||||
|
||||
OkHttpClient client = new OkHttpClient.Builder().connectTimeout(3, TimeUnit.SECONDS).build();
|
||||
Request request = new Request.Builder().url("https://newht.yaoulive.com/index.php/api/error_log/report") //无法接受文件
|
||||
Request request = new Request.Builder()
|
||||
.url("https://tools.yutou233.cn/public/file/request.do")//临时上报地址,可接受文件
|
||||
//.url("https://newht.yaoulive.com/index.php/api/error_log/report") //无法接受文件
|
||||
.post(requestBody).build();
|
||||
client.newCall(request).enqueue(new Callback() {
|
||||
@Override
|
||||
@@ -269,5 +233,32 @@ public class LogUtil {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
private static void openShareDialog(Context context, File zip) {
|
||||
Intent share = new Intent(Intent.ACTION_SEND);
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||
Uri contentUri = FileProvider.getUriForFile(context, context.getPackageName() + ".fileprovider", zip);
|
||||
share.putExtra(Intent.EXTRA_STREAM, contentUri);
|
||||
share.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
|
||||
} else {
|
||||
share.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(zip));
|
||||
}
|
||||
share.setType("application/vnd.ms-excel");
|
||||
share.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
share.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
|
||||
context.startActivity(Intent.createChooser(share, "分享文件"));
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R && CommonAppConfig.IS_GOOGLE_PLAY == 0) {
|
||||
if (!Environment.isExternalStorageManager()) {
|
||||
Intent intent = new Intent(ACTION_MANAGE_ALL_FILES_ACCESS_PERMISSION);
|
||||
context.startActivity(intent);
|
||||
}
|
||||
}
|
||||
File out = new File(Environment.getExternalStorageDirectory().getAbsolutePath() + File.separator + zip.getName());
|
||||
try {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
Files.copy(zip.toPath(), out.toPath());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.shayu.phonelive.utils;
|
||||
package com.yunbao.common.utils;
|
||||
|
||||
import static java.text.DateFormat.DEFAULT;
|
||||
|
||||
@@ -17,8 +17,11 @@ import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.Locale;
|
||||
import java.util.Objects;
|
||||
import java.util.concurrent.LinkedBlockingQueue;
|
||||
|
||||
public class LogUtils {
|
||||
private static final LinkedBlockingQueue<String> QUEUE = new LinkedBlockingQueue<>();
|
||||
|
||||
/**
|
||||
* 采集所有日志
|
||||
*/
|
||||
@@ -68,7 +71,55 @@ public class LogUtils {
|
||||
}
|
||||
}
|
||||
}).start();
|
||||
startSafeLog(context);
|
||||
}
|
||||
|
||||
private static Thread safeThread;
|
||||
private static boolean writerSafeLog = true;
|
||||
|
||||
public static void startSafeLog(Context context) {
|
||||
if (safeThread != null && safeThread.isAlive()) {
|
||||
return;
|
||||
}
|
||||
safeThread = new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
String title = CommonAppConfig.getInstance().getUid() + "_";
|
||||
String today = title + SimpleDateFormat.getDateInstance(DEFAULT, Locale.CHINA).format(new Date());
|
||||
File saveFile = new File(context.getDir("files", Context.MODE_PRIVATE).getAbsolutePath() + File.separator + today + ".safe");
|
||||
saveFile.createNewFile();
|
||||
FileOutputStream os = new FileOutputStream(saveFile, true);
|
||||
PrintWriter writer = new PrintWriter(os);
|
||||
while (writerSafeLog) {
|
||||
if (!QUEUE.isEmpty()) {
|
||||
writer.append(QUEUE.poll()).write("\n");
|
||||
writer.flush();
|
||||
} else {
|
||||
Thread.sleep(1000);
|
||||
}
|
||||
}
|
||||
while (!QUEUE.isEmpty()){
|
||||
writer.append(QUEUE.poll()).write("\n");
|
||||
writer.flush();
|
||||
}
|
||||
writer.flush();
|
||||
writer.close();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
});
|
||||
safeThread.setName("safeLog");
|
||||
safeThread.start();
|
||||
}
|
||||
|
||||
public static void addSafeLog(String log) {
|
||||
QUEUE.offer(log);
|
||||
}
|
||||
|
||||
public static void endSafeLog() {
|
||||
writerSafeLog = false;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1,10 +1,8 @@
|
||||
package com.yunbao.common.utils;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.os.Build;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.text.TextUtils;
|
||||
@@ -108,23 +106,6 @@ public class ToastUtil {
|
||||
Log.i("ts", "ll");
|
||||
Toast.makeText(CommonAppContext.sInstance, s, Toast.LENGTH_SHORT).show();
|
||||
Log.i("ts", "22");
|
||||
|
||||
// long curTime = System.currentTimeMillis();
|
||||
// if (curTime - sLastTime > 2000) {
|
||||
// sLastTime = curTime;
|
||||
// sLastString = s;
|
||||
//// sToast.setText(s);
|
||||
//// sToast.show();
|
||||
// } else {
|
||||
// if (!s.equals(sLastString)) {
|
||||
// sLastTime = curTime;
|
||||
// sLastString = s;
|
||||
// sToast = makeToast();
|
||||
// sToast.setText(s);
|
||||
// sToast.show();
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
package com.yunbao.faceunity.utils;
|
||||
package com.yunbao.common.utils;
|
||||
|
||||
import android.util.Log;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -151,16 +152,36 @@ public class ZipUtils {
|
||||
* @param zipFileString 解压完成的Zip路径
|
||||
* @throws Exception
|
||||
*/
|
||||
public static void zipFolder(String srcFileString, String zipFileString) throws Exception {
|
||||
public static void zipFolder(List<String> srcFileString, String zipFileString, List<String> filters, Runnable runnable) throws Exception {
|
||||
if (filters == null) {
|
||||
filters = new ArrayList<>();
|
||||
}
|
||||
filters.add(new File(zipFileString).getAbsolutePath());
|
||||
final List<String> tmp = new ArrayList<>(filters);
|
||||
//创建ZIP
|
||||
ZipOutputStream outZip = new ZipOutputStream(new FileOutputStream(zipFileString));
|
||||
//创建文件
|
||||
File file = new File(srcFileString);
|
||||
//压缩
|
||||
zipFiles(file.getParent() + File.separator, file.getName(), outZip);
|
||||
//完成和关闭
|
||||
outZip.finish();
|
||||
outZip.close();
|
||||
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
for (String src : srcFileString) {
|
||||
File file = new File(src);
|
||||
//压缩
|
||||
zipFiles(file.getParent() + File.separator, file.getName(), outZip, tmp);
|
||||
}
|
||||
//创建文件
|
||||
//完成和关闭
|
||||
outZip.finish();
|
||||
outZip.close();
|
||||
runnable.run();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}).start();
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -171,9 +192,15 @@ public class ZipUtils {
|
||||
* @param zipOutputSteam
|
||||
* @throws Exception
|
||||
*/
|
||||
private static void zipFiles(String folderString, String fileString, ZipOutputStream zipOutputSteam) throws Exception {
|
||||
private static void zipFiles(String folderString, String fileString, ZipOutputStream zipOutputSteam, List<String> filters) throws Exception {
|
||||
if (zipOutputSteam == null)
|
||||
return;
|
||||
for (String filter : filters) {
|
||||
if (fileString.startsWith(filter)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
System.out.println("压缩文件:" + folderString + "|" + fileString);
|
||||
File file = new File(folderString + fileString);
|
||||
if (file.isFile()) {
|
||||
ZipEntry zipEntry = new ZipEntry(fileString);
|
||||
@@ -196,7 +223,7 @@ public class ZipUtils {
|
||||
}
|
||||
//子文件和递归
|
||||
for (int i = 0; i < fileList.length; i++) {
|
||||
zipFiles(folderString, fileString + File.separator + fileList[i], zipOutputSteam);
|
||||
zipFiles(folderString, fileString + File.separator + fileList[i], zipOutputSteam, filters);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,8 @@ package com.yunbao.common.views;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.FrameLayout;
|
||||
@@ -11,6 +13,7 @@ import androidx.annotation.NonNull;
|
||||
import androidx.lifecycle.Observer;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.blankj.utilcode.util.LogUtils;
|
||||
import com.lxj.xpopup.XPopup;
|
||||
import com.lxj.xpopup.core.BottomPopupView;
|
||||
import com.makeramen.roundedimageview.RoundedImageView;
|
||||
@@ -19,7 +22,11 @@ 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.dialog.DebugDialog;
|
||||
import com.yunbao.common.bean.SudGameInfoBean;
|
||||
import com.yunbao.common.bean.SudGameScoreBean;
|
||||
import com.yunbao.common.dialog.SudGameDoubleDialog;
|
||||
import com.yunbao.common.dialog.SudGameMultipleDialog;
|
||||
import com.yunbao.common.dialog.SudLoadDialog;
|
||||
import com.yunbao.common.event.CheckRemainingBalanceEvent;
|
||||
import com.yunbao.common.event.HideShowEvent;
|
||||
import com.yunbao.common.event.LiveSudGamePopupShowOrHideEvent;
|
||||
@@ -31,9 +38,11 @@ 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.model.GameViewInfoModel;
|
||||
import com.yunbao.common.sud.state.SudMGPAPPState;
|
||||
import com.yunbao.common.sud.state.SudMGPMGState;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.utils.DpUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
|
||||
@@ -57,6 +66,9 @@ public class LiveSudGamePopup extends BottomPopupView {
|
||||
private TextView gameTitle, roomName, roomNumber;
|
||||
private RoundedImageView mAvatar;
|
||||
private boolean selfClick = false;
|
||||
private SudGameDoubleDialog sudGameDoubleDialog;//双人游戏弹窗
|
||||
private SudGameMultipleDialog sudGameMultipleDialog;//多人游戏弹窗
|
||||
private SudLoadDialog sudLoadDialog;//加载弹窗
|
||||
|
||||
public LiveSudGamePopup(@NonNull Context context, long interactionID, String liveUid) {
|
||||
super(context);
|
||||
@@ -69,7 +81,22 @@ public class LiveSudGamePopup extends BottomPopupView {
|
||||
mCreateSudRoomModel = createSudRoomModel;
|
||||
mInteractionID = mCreateSudRoomModel.getLongSudGameId();
|
||||
mLiveUid = mCreateSudRoomModel.getSudGameRoomId();
|
||||
//第二次进入时,viewmodel数据丢失,所以初始化时直接获取
|
||||
gameViewModel.getScore(mCreateSudRoomModel.getSudGameRoomId(),getActivity());
|
||||
IMLoginManager.get(context).setSudGame("");
|
||||
|
||||
// 设置游戏安全操作区域
|
||||
GameViewInfoModel.GameViewRectModel gameViewRectModel = new GameViewInfoModel.GameViewRectModel();
|
||||
gameViewRectModel.left = 0;
|
||||
gameViewRectModel.top = DpUtil.dp2px(50); //游戏安全区域
|
||||
gameViewRectModel.right = 0;
|
||||
gameViewRectModel.bottom = DpUtil.dp2px(30);
|
||||
gameViewModel.gameViewRectModel = gameViewRectModel;
|
||||
|
||||
//初始化结算弹窗
|
||||
sudGameDoubleDialog = new SudGameDoubleDialog(context);//双人游戏
|
||||
sudGameMultipleDialog = new SudGameMultipleDialog(context);//多人游戏
|
||||
sudLoadDialog = new SudLoadDialog(context);//加载弹窗
|
||||
}
|
||||
|
||||
// 返回自定义弹窗的布局
|
||||
@@ -166,6 +193,7 @@ public class LiveSudGamePopup extends BottomPopupView {
|
||||
gameConfigModel.ui.ping.hide = true; // 配置不隐藏ping值
|
||||
gameConfigModel.ui.level.hide = true; // 配置不隐藏ping值
|
||||
gameConfigModel.ui.lobby_game_setting.hide = true; // 配置不隐藏ping值
|
||||
gameConfigModel.ui.gameSettle.hide = true;//是否隐藏结算界面(false: 显示; true: 隐藏,默认为 false)
|
||||
|
||||
gameConfigModel.ui.lobby_players.custom = true;
|
||||
gameConfigModel.ui.join_btn.custom = true;
|
||||
@@ -173,6 +201,29 @@ public class LiveSudGamePopup extends BottomPopupView {
|
||||
gameConfigModel.ui.start_btn.custom = true;
|
||||
// SudMGP平台64bit游戏ID
|
||||
gameViewModel.switchGame((Activity) getContext(), mLiveUid, mInteractionID);
|
||||
|
||||
//游戏结算结束
|
||||
gameViewModel.listMutableLiveData.observe(this, sudSettleBeans -> {
|
||||
if (sudLoadDialog.getClickStatus() == 0) {
|
||||
sudLoadDialog.dismiss();
|
||||
if (gameViewModel.getSudGameScoreBean().getGame_mode() == 1) {
|
||||
//双人游戏
|
||||
sudGameDoubleDialog.setSudSettleList(sudSettleBeans);
|
||||
sudGameDoubleDialog.showDialog();
|
||||
} else {
|
||||
//多人游戏
|
||||
sudGameMultipleDialog.setSudSettleList(sudSettleBeans);
|
||||
sudGameMultipleDialog.showDialog();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
//加载弹窗监听
|
||||
sudLoadDialog.setOnDismissListener(() -> {
|
||||
if (sudLoadDialog.getClickStatus() == 2){
|
||||
Bus.get().post(new CheckRemainingBalanceEvent().setSudMGPMGState(SudMGPMGState.MG_COMMON_SELF_CLICK_GAME_SETTLE_AGAIN_BTN).setSubReady(false));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private List<CustomSidebarChildModel> customSidebarChildModels = new ArrayList<>();
|
||||
@@ -225,11 +276,14 @@ public class LiveSudGamePopup extends BottomPopupView {
|
||||
switch (event.getSudMGPMGState()) {
|
||||
case SudMGPMGState.MG_COMMON_SELF_CLICK_JOIN_BTN:
|
||||
case SudMGPMGState.MG_COMMON_SELF_CLICK_GAME_SETTLE_AGAIN_BTN:
|
||||
LiveNetManager.get(getContext()).checkRemainingBalance(mCreateSudRoomModel.getSudGameRoomId(), new HttpCallback<CheckRemainingBalance>() {
|
||||
//获取筹码信息,检查是否足够
|
||||
LiveNetManager.get(getContext()).getScore(mCreateSudRoomModel.getSudGameRoomId(), new HttpCallback<SudGameScoreBean>() {
|
||||
@Override
|
||||
public void onSuccess(CheckRemainingBalance data) {
|
||||
if (data.getGoldenBeanRemainingBalance() == 1) {
|
||||
public void onSuccess(SudGameScoreBean data) {
|
||||
if (data.getGolden_bean_remaining_balance() == 1) {
|
||||
gameViewModel.setSudGameScoreBean(data);
|
||||
gameViewModel.sudFSTAPPDecorator.notifyAPPCommonSelfIn(true, event.getSeatIndex(), true, 1);
|
||||
gameViewModel.sudFSTAPPDecorator.notifyAPPCommonSelfReady(event.getSubReady());
|
||||
} else {
|
||||
if (IMLoginManager.get(getContext()).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) {
|
||||
ToastUtil.show("貨幣数量不足 ");
|
||||
@@ -251,9 +305,31 @@ public class LiveSudGamePopup extends BottomPopupView {
|
||||
});
|
||||
break;
|
||||
case SudMGPMGState.MG_COMMON_GAME_SETTLE:
|
||||
//结算状态
|
||||
gameViewModel.sudFSTAPPDecorator.notifyAPPCommonSelfIn(false, event.getSeatIndex(), true, 1);
|
||||
sudLoadDialog.setClickStatus(0);
|
||||
sudLoadDialog.setDouble(gameViewModel.getSudGameScoreBean().getGame_mode());
|
||||
sudLoadDialog.showDialog();
|
||||
//获取用户信息
|
||||
LiveNetManager.get(getContext()).getSudGameInfo(mCreateSudRoomModel.getSudGameRoomId(), new HttpCallback<List<SudGameInfoBean>>() {
|
||||
@Override
|
||||
public void onSuccess(List<SudGameInfoBean> data) {
|
||||
if (!data.isEmpty()){
|
||||
gameViewModel.setSudGameInfoBeanList(data);
|
||||
gameViewModel.sudGameRank(event.getMgCommonGameSettle());
|
||||
}else {
|
||||
ToastUtil.show(getContext().getString(R.string.net_error));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
ToastUtil.show(error);
|
||||
}
|
||||
});
|
||||
break;
|
||||
case SudMGPMGState.MG_COMMON_SELF_CLICK_START_BTN:
|
||||
//点击开始游戏
|
||||
LiveNetManager.get(getContext()).gameStartCheckRemainingBalance(mCreateSudRoomModel.getSudGameId(),
|
||||
mCreateSudRoomModel.getSudGameRoomId(), new
|
||||
HttpCallback<CheckRemainingBalance>() {
|
||||
@@ -279,9 +355,9 @@ public class LiveSudGamePopup extends BottomPopupView {
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onSudGameStatus(SubGameEvent event) {
|
||||
if (event.getType() == 0) {
|
||||
|
||||
6
common/src/main/res/drawable/anim_loading_double.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<animated-rotate xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:drawable="@mipmap/sud_load_double"
|
||||
android:pivotX="50%"
|
||||
android:pivotY="50%"
|
||||
/>
|
||||
6
common/src/main/res/drawable/anim_loading_multiple.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<animated-rotate xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:drawable="@mipmap/sud_load_multiple"
|
||||
android:pivotX="50%"
|
||||
android:pivotY="50%"
|
||||
/>
|
||||
6
common/src/main/res/drawable/shape_sub_rank.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<corners android:radius="20dp"/>
|
||||
<solid android:color="@color/white"/>
|
||||
<stroke android:width="1dp" android:color="#FF333333"/>
|
||||
</shape>
|
||||
@@ -17,8 +17,9 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="72dp"
|
||||
|
||||
android:background="@color/white"
|
||||
android:paddingTop="24dp"
|
||||
android:background="@color/white">
|
||||
tools:visibility="gone">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
|
||||
@@ -1,12 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="650dp"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="@drawable/bg_live_sud_list"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/game_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
@@ -58,6 +69,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxLines="1"
|
||||
android:visibility="gone"
|
||||
android:ellipsize="end"
|
||||
android:text="@string/interactive_game_create_room_name"
|
||||
android:textColor="@color/white"
|
||||
@@ -128,17 +140,4 @@
|
||||
android:textSize="8sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/game_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
201
common/src/main/res/layout/dialog_sub_double.xml
Normal file
@@ -0,0 +1,201 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@mipmap/sub_bg"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="68dp"
|
||||
android:paddingBottom="16dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:layout_marginTop="45dp">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/sub_win_hat"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/sub_win_hat"
|
||||
android:visibility="gone"
|
||||
android:layout_centerHorizontal="true"/>
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/sub_win_head"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="70dp"
|
||||
android:layout_marginTop="25dp"
|
||||
android:scaleType="centerCrop"
|
||||
app:riv_corner_radius="360dp"
|
||||
app:riv_border_color="#FFFFDCB3"
|
||||
app:riv_border_width="1dp"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/sub_win_name"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:gravity="center"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="13sp"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:text="用户昵称哈哈哈"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/sub_win_score"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:textColor="@color/white_60"
|
||||
android:textSize="11sp"
|
||||
android:singleLine="true"
|
||||
android:text="+10000"/>
|
||||
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:src="@mipmap/sub_vs"/>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<!-- <androidx.appcompat.widget.AppCompatImageView-->
|
||||
<!-- android:id="@+id/sub_loss_hat"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:src="@mipmap/sub_win_hat"-->
|
||||
<!-- android:layout_centerHorizontal="true"/>-->
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/sub_loss_head"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="70dp"
|
||||
android:layout_marginTop="25dp"
|
||||
android:scaleType="centerCrop"
|
||||
app:riv_corner_radius="360dp"
|
||||
app:riv_border_color="#FFFFDCB3"
|
||||
app:riv_border_width="1dp"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/sub_loss_name"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:gravity="center"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:textColor="@color/white"
|
||||
android:ellipsize="end"
|
||||
android:textSize="13sp"
|
||||
android:singleLine="true"
|
||||
android:text="用户昵称"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/sub_loss_score"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:textColor="@color/white_60"
|
||||
android:textSize="11sp"
|
||||
android:singleLine="true"
|
||||
android:text="+10000"/>
|
||||
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginTop="20dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_marginEnd="15dp"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="40dp">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/sub_leave"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="40dp"
|
||||
android:src="@mipmap/sub_leave_zh"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/sub_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:textColor="#FF5B5B5B"
|
||||
android:textSize="13sp"
|
||||
android:text="10"
|
||||
android:layout_marginEnd="30dp"
|
||||
android:layout_marginTop="10dp"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/sub_again"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="40dp"
|
||||
android:src="@mipmap/sub_again_zh"/>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="14dp"
|
||||
android:textSize="11sp"
|
||||
android:textColor="@color/white_60"
|
||||
android:text="@string/sub_admission_fee"
|
||||
android:singleLine="true"/>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/sub_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/sub_win_zh"
|
||||
android:layout_centerHorizontal="true"/>
|
||||
|
||||
</RelativeLayout>
|
||||
82
common/src/main/res/layout/dialog_sub_multiple.xml
Normal file
@@ -0,0 +1,82 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="45dp"
|
||||
android:paddingBottom="22dp"
|
||||
android:background="@mipmap/sub_bg2"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/sub_recycle_rank"
|
||||
android:layout_marginTop="50dp"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="190dp"/>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginTop="10dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_marginEnd="15dp"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="40dp">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/sub_leave"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="40dp"
|
||||
android:src="@mipmap/sub_leave_zh"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/sub_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:textColor="#FF5B5B5B"
|
||||
android:textSize="13sp"
|
||||
android:text="10"
|
||||
android:layout_marginEnd="30dp"
|
||||
android:layout_marginTop="10dp"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/sub_again"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="40dp"
|
||||
android:src="@mipmap/sub_again_zh"/>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="14dp"
|
||||
android:textSize="11sp"
|
||||
android:textColor="#FFAAAAAA"
|
||||
android:text="@string/sub_admission_fee"
|
||||
android:singleLine="true"/>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/sub_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/sub_over_zh"
|
||||
android:layout_centerHorizontal="true"/>
|
||||
|
||||
</RelativeLayout>
|
||||
65
common/src/main/res/layout/dialog_sud_load.xml
Normal file
@@ -0,0 +1,65 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.appcompat.widget.LinearLayoutCompat xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:id="@+id/sud_load_bg"
|
||||
android:gravity="center_horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/sud_load"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/sud_load_zh"
|
||||
android:layout_marginTop="16dp"/>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_marginTop="19dp"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp">
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/sud_load_bar_double"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:visibility="gone"
|
||||
android:indeterminateBehavior="repeat"
|
||||
android:indeterminateDrawable="@drawable/anim_loading_double"
|
||||
android:indeterminateDuration="500"/>
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/sud_load_bar_multiple"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:indeterminateBehavior="repeat"
|
||||
android:indeterminateDrawable="@drawable/anim_loading_multiple"
|
||||
android:indeterminateDuration="500"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/sud_load_skip"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:src="@mipmap/sud_load_skip_zh"/>
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/sud_load_again"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="40dp"
|
||||
android:src="@mipmap/sub_again_zh"/>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
75
common/src/main/res/layout/view_sub_rank.xml
Normal file
@@ -0,0 +1,75 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.appcompat.widget.LinearLayoutCompat xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:orientation="horizontal"
|
||||
android:background="@drawable/shape_sub_rank"
|
||||
android:layout_marginTop="5dp"
|
||||
android:paddingStart="9dp"
|
||||
android:paddingEnd="9dp"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="26dp"
|
||||
android:layout_height="26dp">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/sub_rank_image"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/sub_1"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/sub_rank_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/black2"
|
||||
android:layout_centerInParent="true"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:textSize="13sp"
|
||||
android:text="4"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/sub_head"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
app:riv_corner_radius="360dp"
|
||||
app:riv_border_width="1dp"
|
||||
app:riv_border_color="#FF333333"
|
||||
android:layout_marginStart="9dp"
|
||||
android:scaleType="centerCrop"/>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/sub_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textStyle="bold"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="end"
|
||||
android:textColor="#FF333333"
|
||||
android:textSize="13sp"
|
||||
android:text="用户昵称"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/sub_score"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textStyle="bold"
|
||||
android:singleLine="true"
|
||||
android:layout_marginTop="5dp"
|
||||
android:textColor="#FF777777"
|
||||
android:textSize="11sp"
|
||||
android:text="+10000"/>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
BIN
common/src/main/res/mipmap-xhdpi/sub_1.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
common/src/main/res/mipmap-xhdpi/sub_2.png
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
common/src/main/res/mipmap-xhdpi/sub_3.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
common/src/main/res/mipmap-xhdpi/sub_again_en.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
common/src/main/res/mipmap-xhdpi/sub_again_zh.png
Normal file
|
After Width: | Height: | Size: 21 KiB |
BIN
common/src/main/res/mipmap-xhdpi/sub_bg.png
Normal file
|
After Width: | Height: | Size: 214 KiB |
BIN
common/src/main/res/mipmap-xhdpi/sub_bg2.png
Normal file
|
After Width: | Height: | Size: 214 KiB |
BIN
common/src/main/res/mipmap-xhdpi/sub_draw_en.png
Normal file
|
After Width: | Height: | Size: 57 KiB |
BIN
common/src/main/res/mipmap-xhdpi/sub_draw_zh.png
Normal file
|
After Width: | Height: | Size: 56 KiB |
BIN
common/src/main/res/mipmap-xhdpi/sub_leave_en.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
common/src/main/res/mipmap-xhdpi/sub_leave_zh.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
common/src/main/res/mipmap-xhdpi/sub_loss_en.png
Normal file
|
After Width: | Height: | Size: 42 KiB |
BIN
common/src/main/res/mipmap-xhdpi/sub_loss_zh.png
Normal file
|
After Width: | Height: | Size: 43 KiB |
BIN
common/src/main/res/mipmap-xhdpi/sub_over_en.png
Normal file
|
After Width: | Height: | Size: 75 KiB |
BIN
common/src/main/res/mipmap-xhdpi/sub_over_zh.png
Normal file
|
After Width: | Height: | Size: 77 KiB |
BIN
common/src/main/res/mipmap-xhdpi/sub_vs.png
Normal file
|
After Width: | Height: | Size: 5.9 KiB |
BIN
common/src/main/res/mipmap-xhdpi/sub_win_en.png
Normal file
|
After Width: | Height: | Size: 77 KiB |
BIN
common/src/main/res/mipmap-xhdpi/sub_win_hat.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
common/src/main/res/mipmap-xhdpi/sub_win_zh.png
Normal file
|
After Width: | Height: | Size: 77 KiB |
BIN
common/src/main/res/mipmap-xhdpi/sud_load_bg_double.png
Normal file
|
After Width: | Height: | Size: 168 KiB |
BIN
common/src/main/res/mipmap-xhdpi/sud_load_bg_multiple.png
Normal file
|
After Width: | Height: | Size: 153 KiB |
BIN
common/src/main/res/mipmap-xhdpi/sud_load_double.png
Normal file
|
After Width: | Height: | Size: 6.7 KiB |
BIN
common/src/main/res/mipmap-xhdpi/sud_load_en.png
Normal file
|
After Width: | Height: | Size: 5.3 KiB |
BIN
common/src/main/res/mipmap-xhdpi/sud_load_multiple.png
Normal file
|
After Width: | Height: | Size: 7.9 KiB |
BIN
common/src/main/res/mipmap-xhdpi/sud_load_skip_en.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
common/src/main/res/mipmap-xhdpi/sud_load_skip_zh.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
common/src/main/res/mipmap-xhdpi/sud_load_zh.png
Normal file
|
After Width: | Height: | Size: 4.2 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/sub_1.png
Normal file
|
After Width: | Height: | Size: 4.6 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/sub_2.png
Normal file
|
After Width: | Height: | Size: 4.7 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/sub_3.png
Normal file
|
After Width: | Height: | Size: 5.6 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/sub_again_en.png
Normal file
|
After Width: | Height: | Size: 43 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/sub_again_zh.png
Normal file
|
After Width: | Height: | Size: 41 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/sub_bg.png
Normal file
|
After Width: | Height: | Size: 550 KiB |