Compare commits

..

27 Commits

Author SHA1 Message Date
gongduoxiang
1deb197af6 谷歌支付 2024-08-06 10:26:59 +08:00
gongduoxiang
3a12d848e1 Merge remote-tracking branch 'origin/master' 2024-07-18 18:20:53 +08:00
gongduoxiang
cf245b0df8 有些本地的东西不去提交 2024-07-18 18:19:08 +08:00
余前卫
0ea92c00a2 6.8.0:小游戏结算界面,观众视角修改 2024-07-18 17:31:44 +08:00
18142669586
a0f3f246a6 补充jar 2024-07-17 10:53:43 +08:00
18142669586
a11d7f07e9 开播im未初始化 会在初始化一次。 2024-07-13 11:26:24 +08:00
18142669586
90bc70ebf7 Merge remote-tracking branch 'origin/master' 2024-07-13 10:38:03 +08:00
18142669586
4618c0a4f1 升级34 grd8.0 2024-07-13 10:37:37 +08:00
Martin
15a52aaa62 1、开通守护,im消息优化
2、游戏房安全区域优化
3、举报接口新增字段区分
2024-07-11 13:07:17 +08:00
余前卫
6d6010d023 Merge branch 'master' of https://gitee.com/xxkp/pdlivexp
# Conflicts:
#	app/build.gradle
#	common/src/main/res/values-zh-rHK/strings.xml
#	common/src/main/res/values-zh-rTW/strings.xml
#	common/src/main/res/values/strings.xml
2024-07-10 10:53:01 +08:00
Martin
94156e2984 Merge branch '直播间提示优化'
# Conflicts:
#	config.gradle
2024-07-09 13:49:31 +08:00
Martin
769f527565 1、開通守護-使用優惠券
2、开通贵族,在当前直播间有围观按钮问题
2024-07-09 13:08:33 +08:00
Martin
3dcc801331 1、開通守護-使用優惠券 2024-07-05 13:58:35 +08:00
Martin
963fe2c110 1、好友邀请守护内容修改 2024-07-04 17:59:56 +08:00
Martin
9dd3619049 1、全服通知,新增【围观】按钮显示判断逻辑 2024-07-04 13:16:48 +08:00
Martin
96b80a460b 1、游戏房,游戏操作区域距离顶部问题
2、直播间红包、神龙位置问题
2024-07-03 18:24:14 +08:00
Martin
a68bee94a9 直播间侧边栏美化 2024-07-03 15:21:32 +08:00
Martin
40a2843696 守护榜页面需美化 2024-07-03 11:21:25 +08:00
2cefd50ac3 配合H5调整部分webView页面 2024-07-02 18:06:56 +08:00
Martin
833b58d311 1、游戏房间界面需美化 2024-07-02 14:40:36 +08:00
Martin
f14fb4612b 1、直播间-互动游戏角标优化 2024-07-01 16:55:46 +08:00
3510a565f2 调整HTTP日志输出 2024-07-01 09:57:39 +08:00
e0669e98cf 新增上报日志功能 2024-06-29 10:11:42 +08:00
Martin
8f82c7c785 1.直播间游戏提示优化
2.战令经验值购买优化
2024-06-28 17:52:41 +08:00
f1a1aae787 优化打包脚本,兼容低版本AndroidStudio使用 2024-06-27 14:28:33 +08:00
Martin
b68c7f1c46 1.守护榜页面需美化
2.直播间功能栏美化
3.游戏房间界面需美化
2024-06-26 17:27:29 +08:00
Martin
dd7eb2326a [优化]:
1.直播间游戏提示优化
2.战令经验值购买优化
3.守护榜页面需美化
2024-06-25 16:52:09 +08:00
167 changed files with 2428 additions and 1348 deletions

View File

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

View File

@@ -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());
}
}

View File

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

View File

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

View File

@@ -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,8 +20,15 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
buildFeatures {
buildConfig = true
}
}
repositories {
flatDir {
dirs 'libs', '../libs'
}
}
dependencies {
// api 'com.google.code.gson:gson:2.8.8'
implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
}

Binary file not shown.

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

View File

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

View File

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

View File

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

View File

@@ -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,19 +77,22 @@ android {
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_18
targetCompatibility JavaVersion.VERSION_18
}
buildFeatures {
buildConfig = true
}
applicationVariants.all { variant ->
println "清空build文件夹";
/* for (final def project in rootProject.getAllprojects()) {
def name = variant.name.replace('Debug', '').replace('Release', '').toLowerCase()
delete project.buildDir
delete project.rootDir.absolutePath+File.separator+"app"+File.separator+name
println project.buildDir
}*/
for (final def project in rootProject.getAllprojects()) {
def name = variant.name.replace('Debug', '').replace('Release', '').toLowerCase()
//delete project.buildDir
delete project.rootDir.absolutePath+File.separator+"app"+File.separator+name
//println project.buildDir
}
//delete project.rootDir.absolutePath + File.separator + "outputs"
String variantName = variant.name.capitalize()
def processManifestTask = project.tasks.getByName("process${variantName}Manifest")

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -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,31 +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'
//ExoPlayer,腾讯的播放器不支持无缝切换
api 'com.google.android.exoplayer:exoplayer:2.18.2'
api 'com.google.android.exoplayer:exoplayer-core:2.18.2@aar'
api 'com.xj.marqueeView:marqueeView:0.1.20'
api rootProject.ext.dependencies["blank-utilcode"]
}

Binary file not shown.

View File

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

View File

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

View File

@@ -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();

View File

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

View File

@@ -13,6 +13,7 @@ import com.yunbao.common.R;
import com.yunbao.common.bean.CustomSidebarChildModel;
import com.yunbao.common.event.CustomDrawerPopupEvent;
import com.yunbao.common.utils.Bus;
import com.yunbao.common.utils.SpUtil;
import com.yunbao.common.views.InteractionGamesChildViewHolder;
import java.util.ArrayList;
@@ -36,7 +37,7 @@ public class InteractionGamesAdapter extends RecyclerView.Adapter {
@Override
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View runGamesView = LayoutInflater.from(parent.getContext()).inflate(R.layout.view_live_new_role_fun_games_child_view3, parent, false);
return new InteractionGamesChildViewHolder(runGamesView);
return new InteractionGamesChildViewHolder(runGamesView,mContext);
}
@Override
@@ -51,6 +52,9 @@ public class InteractionGamesAdapter extends RecyclerView.Adapter {
if (activityID != 0) {
Bus.get().post(new CustomDrawerPopupEvent()
.setDisMiss(true).setInteractionID(activityID).setInteraction(true).setChild(srcChild));
if(model.getSudGameIsNew().equals("1")){
SpUtil.getInstance().setLiveGameId(model.getId());
}
}

View File

@@ -31,11 +31,16 @@ public class LiveNewRoleFunGamesAdapter extends RecyclerView.Adapter {
@Override
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View runGamesView = LayoutInflater.from(parent.getContext()).inflate(R.layout.view_live_new_role_fun_games_child_view, parent, false);
return new NewRoleFunGamesChildViewHolder(runGamesView,showRed);
return new NewRoleFunGamesChildViewHolder(runGamesView,showRed,mContext);
}
@Override
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
ViewGroup.LayoutParams layoutParams = new ViewGroup.LayoutParams((int)
(mContext.getResources().getDisplayMetrics().widthPixels / 4.5),
ViewGroup.LayoutParams.WRAP_CONTENT);
holder.itemView.setLayoutParams(layoutParams);
NewRoleFunGamesChildViewHolder childViewHolder = (NewRoleFunGamesChildViewHolder) holder;
childViewHolder.setData(child.get(position), rigts);
}

View File

@@ -11,11 +11,11 @@ import androidx.recyclerview.widget.RecyclerView;
import com.yunbao.common.R;
import com.yunbao.common.bean.CustomSidebarChildModel;
import com.yunbao.common.event.CustomDrawerPopupEvent;
import com.yunbao.common.event.LiveNewRoleEvent;
import com.yunbao.common.event.NewRoleCustomDrawerPopupEvent;
import com.yunbao.common.utils.Bus;
import com.yunbao.common.views.InteractionGamesChildViewHolder;
import com.yunbao.common.utils.SpUtil;
import com.yunbao.common.views.InteractionGamesChildBottomViewHolder;
import java.util.ArrayList;
import java.util.List;
@@ -34,14 +34,14 @@ public class LiveNewRoleInteractionGamesAdapter extends RecyclerView.Adapter {
@Override
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View runGamesView = LayoutInflater.from(parent.getContext()).inflate(R.layout.view_live_new_role_fun_games_child_view3, parent, false);
return new InteractionGamesChildViewHolder(runGamesView);
return new InteractionGamesChildBottomViewHolder(runGamesView,mContext);
}
@Override
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
InteractionGamesChildViewHolder childViewHolder = (InteractionGamesChildViewHolder) holder;
InteractionGamesChildBottomViewHolder childViewHolder = (InteractionGamesChildBottomViewHolder) holder;
childViewHolder.setData(child.get(position), rigts);
childViewHolder.setItemViewClicks(new InteractionGamesChildViewHolder.InteractionGamesCallBack() {
childViewHolder.setItemViewClicks(new InteractionGamesChildBottomViewHolder.InteractionGamesCallBack() {
@Override
public void onItemViewClicks(CustomSidebarChildModel model, boolean rigts) {
@@ -52,6 +52,9 @@ public class LiveNewRoleInteractionGamesAdapter extends RecyclerView.Adapter {
.setInteractionID(activityID)
.setChild(child)
.setInteraction(true));
if(model.getSudGameIsNew().equals("1")){
SpUtil.getInstance().setLiveGameId(model.getId());
}
}
@@ -60,12 +63,14 @@ public class LiveNewRoleInteractionGamesAdapter extends RecyclerView.Adapter {
});
}
@Override
public int getItemCount() {
return child.size();
}
public void updateData(List<CustomSidebarChildModel> mChild) {
child.clear();
/* if (mChild.size() > 8) {
for (int i = 0; i < 8; i++) {

View File

@@ -39,13 +39,14 @@ public class LiveNewRolerPopupAdapter extends RecyclerView.Adapter {
switch (viewType) {
case FUN_GAMES:
View runGamesView = LayoutInflater.from(parent.getContext()).inflate(R.layout.view_new_roler_fun_games_view, parent, false);
return new LiveNewRoleFunGamesViewHolder(runGamesView);
return new LiveNewRoleFunGamesViewHolder(runGamesView,mContext);
case RIGHTS_INTERESTS:
//特权
View rightsInterestsView = LayoutInflater.from(parent.getContext()).inflate(R.layout.view_live_new_roler_ights_interests, parent, false);
return new LiveNewRoleRigtsInterestsViewHolder(rightsInterestsView,showRed);
return new LiveNewRoleRigtsInterestsViewHolder(rightsInterestsView,showRed,mContext);
default:
View gamesView = LayoutInflater.from(parent.getContext()).inflate(R.layout.view_live_new_role_interaction_games_view, parent, false);
return new LiveNewRoleInteractionGamesViewHolder(gamesView);
return new LiveNewRoleInteractionGamesViewHolder(gamesView,mContext);
}
}

View File

@@ -30,11 +30,15 @@ public class NewRoleFunGamesAdapter extends RecyclerView.Adapter {
@Override
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View runGamesView = LayoutInflater.from(parent.getContext()).inflate(R.layout.view_live_new_role_fun_games_child_view2, parent, false);
return new NewRoleFunGamesChildViewHolder(runGamesView,false);
return new NewRoleFunGamesChildViewHolder(runGamesView,false,mContext);
}
@Override
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
ViewGroup.LayoutParams layoutParams = new ViewGroup.LayoutParams((int)
(mContext.getResources().getDisplayMetrics().widthPixels / 4.5),
ViewGroup.LayoutParams.WRAP_CONTENT);
holder.itemView.setLayoutParams(layoutParams);
NewRoleFunGamesChildViewHolder childViewHolder = (NewRoleFunGamesChildViewHolder) holder;
childViewHolder.setData(child.get(position), rigts);
}

View File

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

View File

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

View File

@@ -22,6 +22,30 @@ public class GuardPriceModel extends BaseModel {
private String discount;
@SerializedName("price_key")
private int priceKey;
@SerializedName("coupon_discount")
private String couponDiscount;
@SerializedName("coupon_discount_en")
private String couponDiscountEn;
@SerializedName("coupon_discount_price")
private String couponDiscountPrice;
@SerializedName("coupon_id")
private String couponId;
public String getCouponDiscount() {
return couponDiscount;
}
public String getCouponId() {
return couponId;
}
public String getCouponDiscountEn() {
return couponDiscountEn;
}
public String getCouponDiscountPrice() {
return couponDiscountPrice;
}
public String getOpeningTime() {
return openingTime;

View 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;
}
}

View File

@@ -0,0 +1,80 @@
package com.yunbao.common.dialog;
import android.app.Activity;
import android.app.Dialog;
import android.content.Context;
import android.text.Html;
import android.text.Spanned;
import android.view.View;
import android.widget.TextView;
import com.yunbao.common.R;
import com.yunbao.common.utils.DialogUitl;
import com.yunbao.common.utils.WordUtil;
public class GuardBuyCouponTipsDialog {
/**
* @param context
* @param coin 钻石
* @param content 购买类型名称
* @param simpleCallback
*/
public static void showBuyOrRenewDialog(Context context, String coupon, String coin, String content,
DialogUitl.SimpleCallback3 simpleCallback) {
if (context instanceof Activity) {
if (((Activity) context).isDestroyed() || ((Activity) context).isFinishing()) {
return;
}
}
final Dialog dialog = new Dialog(context, R.style.dialog2);
dialog.setContentView(R.layout.dialog_guard_buy_coupon_tips);
dialog.setCancelable(true);
dialog.setCanceledOnTouchOutside(true);
TextView btn_confirm = dialog.findViewById(R.id.btn_confirm);
TextView content2 = dialog.findViewById(R.id.content2);
Spanned tips;
if (WordUtil.isNewZh()) {
tips = Html.fromHtml("<font color='#FFE0BF'>您有一張</font>"
+ "<font color='#FF9937'>" + content + "優惠券</font><br>"
+ "<font color='#FFE0BF'>開通/續費" + content + "(1個月)時,</font><br><font color='#FFE0BF'>可享</font>"
+ "<strong><font color='#FF9937'>" + coupon + "折</font></strong>"
+ "<font color='#FFE0BF'>優惠 (折後:</font>"
+ "<font color='#FF9937'>" + coin + "鑽</font>)<br>"
+ "<font color='#FFE0BF'>是否使用優惠券?</font>");
} else {
tips = Html.fromHtml("<font color='#FFE0BF'>You have a </font>"
+ "<font color='#FF9937'>" + content + " coupon</font>"
+ "<font color='#FFE0BF'> When activating/renewing " + content + "(1 month), you can enjoy a</font>"
+ "<strong><font color='#FF9937'> " + coupon + "% </font></strong>"
+ "<font color='#FFE0BF'>discount (After folding:</font>"
+ "<font color='#FF9937'>" + coin + " diamonds</font>"
+ "<font color='#FFE0BF'>Do you want to use coupons?</font>");
}
content2.setText(tips);
dialog.findViewById(R.id.btn_cancel).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
dialog.dismiss();
}
});
dialog.findViewById(R.id.btn_cancel1).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
simpleCallback.onCancel();
dialog.dismiss();
}
});
btn_confirm.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
simpleCallback.onConfirmClick(dialog);
dialog.dismiss();
}
});
dialog.show();
}
}

View File

@@ -0,0 +1,44 @@
package com.yunbao.common.dialog;
import android.app.Activity;
import android.app.Dialog;
import android.content.Context;
import android.view.View;
import android.widget.TextView;
import com.yunbao.common.R;
import com.yunbao.common.utils.WordUtil;
public class GuardBuyTipsNewDialog {
/**
* @param context
*/
public static void showBuyOrRenewDialog(Context context) {
if (context instanceof Activity) {
if (((Activity) context).isDestroyed() || ((Activity) context).isFinishing()) {
return;
}
}
final Dialog dialog = new Dialog(context, R.style.dialog2);
dialog.setContentView(R.layout.dialog_guard_buy_tips);
dialog.setCancelable(true);
dialog.setCanceledOnTouchOutside(true);
TextView btn_confirm = dialog.findViewById(R.id.btn_confirm);
btn_confirm.setText(WordUtil.isNewZh() ? "確認" : "Confirm");
dialog.findViewById(R.id.btn_cancel).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
dialog.dismiss();
}
});
dialog.findViewById(R.id.btn_confirm).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
dialog.dismiss();
}
});
dialog.show();
}
}

View File

@@ -1,7 +1,10 @@
package com.yunbao.common.dialog;
import android.content.Context;
import android.text.Editable;
import android.text.TextWatcher;
import android.view.View;
import android.widget.EditText;
import android.widget.ProgressBar;
import android.widget.TextView;
@@ -16,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;
@@ -26,18 +30,19 @@ import java.math.BigDecimal;
* 战令等级 经验
*/
public class OrderLevelPopupWindow extends CenterPopupView {
private TextView orderLevel, orderLevelDiamond, balanceDiamond, current, expText;
private TextView orderLevelDiamond, balanceDiamond, current, expText;
private int currentExperience, totalExperience;//当前经验,全部经验
private String buyExp = "100", currentLevel, balance;
private String buyExp = "1", currentLevel, balance;
private ProgressBar progressBar;
private OrderLevelCallback orderLevelCallback;
private long maxExp;
private BattlePassUserInfoBean userInfoBean;
private Context mContext;
private EditText orderLevel;
public OrderLevelPopupWindow(@NonNull Context context, BattlePassUserInfoBean userInfoBean,
int mCurrentExperience, int mTotalExperience,
String mCurrentLevel, String mBalance, long maxExp, OrderLevelCallback mOrderLevelCallback) {
public OrderLevelPopupWindow(@NonNull Context context, BattlePassUserInfoBean userInfoBean, int mCurrentExperience, int mTotalExperience, String mCurrentLevel, String mBalance, long maxExp, OrderLevelCallback mOrderLevelCallback) {
super(context);
this.mContext = context;
this.userInfoBean = userInfoBean;
currentExperience = mCurrentExperience;
totalExperience = mTotalExperience;
@@ -67,15 +72,15 @@ public class OrderLevelPopupWindow extends CenterPopupView {
progressBar.setProgress(currentExperience);
expText.setText(String.format("%s/%s", userInfoBean.getBattlePassExp(), userInfoBean.getNextLevelExp()));
current.setText(String.format("Lv%s", currentLevel));
balanceDiamond.setText(balance);
balanceDiamond.setText((WordUtil.isNewZh() ? "剩餘:" : "Balance") + balance);
findViewById(R.id.sub).setOnClickListener(new OnClickListener() {
@Override
public void onClick(View view) {
float exp = new BigDecimal(buyExp).floatValue();
if (exp > 100) {
BigDecimal buyExpBigDecimal = new BigDecimal(buyExp).subtract(new BigDecimal("100"));
if (exp > 1) {
BigDecimal buyExpBigDecimal = new BigDecimal(buyExp).subtract(new BigDecimal("1"));
buyExp = String.valueOf(buyExpBigDecimal.intValue());
orderLevelDiamond.setText(String.valueOf(buyExpBigDecimal.floatValue()));
orderLevelDiamond.setText("00 = " + buyExp + "00");
orderLevel.setText(buyExp);
}
}
@@ -84,15 +89,14 @@ public class OrderLevelPopupWindow extends CenterPopupView {
@Override
public void onClick(View view) {
float exp = new BigDecimal(buyExp).floatValue();
if (exp < maxExp && exp < 10000) {
BigDecimal buyExpBigDecimal = new BigDecimal(buyExp).add(new BigDecimal("100"));
if (exp < maxExp && (exp + 1) < 10000) {
BigDecimal buyExpBigDecimal = new BigDecimal(buyExp).add(new BigDecimal("1"));
buyExp = String.valueOf(buyExpBigDecimal.intValue());
orderLevelDiamond.setText(String.valueOf(buyExpBigDecimal.floatValue()));
orderLevelDiamond.setText("00 = " + buyExp + "00");
orderLevel.setText(buyExp);
} else if (exp >= maxExp) {
ToastUtil.show(WordUtil.isNewZh() ? "经验已滿" : "Experience full");
ToastUtil.show(WordUtil.isNewZh() ? "經驗超出,僅需" + maxExp + "經驗可達滿级" : "Exp exceeds.Only " + maxExp + " exp is needed to reach the max level.");
}
}
});
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.war_order_close), new ViewClicksAntiShake.ViewClicksCallBack() {
@@ -101,40 +105,62 @@ public class OrderLevelPopupWindow extends CenterPopupView {
dialog.dismiss();
}
});
orderLevel.addTextChangedListener(new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {
}
@Override
public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
buyExp = charSequence.toString();
orderLevelDiamond.setText("00 = " + charSequence.toString() + "00");
}
@Override
public void afterTextChanged(Editable editable) {
}
});
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.buying_experience), new ViewClicksAntiShake.ViewClicksCallBack() {
@Override
public void onViewClicks() {
LiveNetManager.get(getContext())
.buyingExperiencePoint(buyExp, new HttpCallback<ResponseModel<Object>>() {
@Override
public void onSuccess(ResponseModel<Object> data) {
if (orderLevelCallback != null) {
orderLevelCallback.onCallback(data.getData().getCode(), data.getMsg());
}
dialog.dismiss();
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
public void onSuccess(ResponseModel<Object> data) {
if (orderLevelCallback != null) {
orderLevelCallback.onCallback(data.getData().getCode(), data.getMsg());
}
dialog.dismiss();
}
@Override
public void onError(String error) {
if (orderLevelCallback != null) {
orderLevelCallback.onCallback(102, error);
}
dialog.dismiss();
@Override
public void onError(String error) {
if (orderLevelCallback != null) {
orderLevelCallback.onCallback(102, error);
}
});
dialog.dismiss();
}
});
} else {
ToastUtil.show(WordUtil.isNewZh() ? "經驗超出,僅需" + maxExp + "經驗可達滿级" : "Exp exceeds.Only " + maxExp + " exp is needed to reach the max level.");
}
}
});
IMLoginManager.get(getContext()).updateUserCoin(new OnItemClickListener<JSONObject>() {
@Override
public void onItemClick(JSONObject bean, int position) {
if (bean != null) {
balance = bean.getString("coin");
balanceDiamond.setText((WordUtil.isNewZh() ? "剩餘:" : "Balance") + balance);
}
}
});
IMLoginManager.get(getContext())
.updateUserCoin(new OnItemClickListener<JSONObject>() {
@Override
public void onItemClick(JSONObject bean, int position) {
if (bean != null) {
balance = bean.getString("coin");
balanceDiamond.setText(balance);
}
}
});
}
public interface OrderLevelCallback {

View File

@@ -43,6 +43,7 @@ public class SudGameDoubleDialog extends AbsDialogCenterPopupWindow{
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) {
@@ -89,48 +90,62 @@ public class SudGameDoubleDialog extends AbsDialogCenterPopupWindow{
sortByWinNum(settleBeans);
SudSettleBean sudSettleBean1 = settleBeans.get(0); // 第一名
SudSettleBean sudSettleBean2 = settleBeans.get(1); // 第二名
checkMe(sudSettleBean1.getUid(),sudSettleBean2.getUid());//判断这场对局是不是包含自己
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());
if (sudSettleBean1.getWin_num()>0){
sub_win_score.setText("+"+sudSettleBean1.getWin_num());
}else {
sub_win_score.setText(String.valueOf(sudSettleBean1.getWin_num()));
}
sub_loss_score.setText(String.valueOf(sudSettleBean2.getWin_num()));
// 检查是否是当前用户
boolean isFirstMe = CommonAppConfig.getInstance().getUid().equals(sudSettleBean1.getUid());
boolean isDraw = sudSettleBean1.getWin_num() == sudSettleBean2.getWin_num();
boolean isZh = WordUtil.isNewZh();
if (sudSettleBean1.getWin_num() == sudSettleBean2.getWin_num()){
//平局
if (WordUtil.isNewZh()){
sub_title.setImageResource(R.mipmap.sub_draw_zh);
}else {
sub_title.setImageResource(R.mipmap.sub_draw_en);
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);
}
sub_win_hat.setVisibility(View.GONE);
}else {
//有胜负
sub_win_hat.setVisibility(View.VISIBLE);
if (CommonAppConfig.getInstance().getUid().equals(sudSettleBean1.getUid())){
//本人胜利
if (WordUtil.isNewZh()){
sub_title.setImageResource(R.mipmap.sub_win_zh);
}else {
sub_title.setImageResource(R.mipmap.sub_win_en);
}
}else {
//本人失败
if (WordUtil.isNewZh()){
sub_title.setImageResource(R.mipmap.sub_loss_zh);
}else {
sub_title.setImageResource(R.mipmap.sub_loss_en);
}
} 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();

View File

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

View File

@@ -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);
}
//
// //埋点唯一性

View File

@@ -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();

View File

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

View File

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

View File

@@ -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;
@@ -1212,7 +1213,7 @@ public interface PDLiveApi {
Observable<ResponseModel<GuardGetGuardOpenInfoModel>> getGuardOpenInfo(@Query("liveuid") String liveUid);
@GET("/api/public/?service=Guard.openGuard")
Observable<ResponseModel<Object>> openGuard(@Query("liveuid") String liveUid, @Query("guard_type") String guardType, @Query("price_key") String priceKey, @Query("stream") String stream);
Observable<ResponseModel<Object>> openGuard(@Query("liveuid") String liveUid, @Query("guard_type") String guardType, @Query("price_key") String priceKey, @Query("stream") String stream,@Query("coupon_type") String coupon_type,@Query("coupon_id") String coupon_id);
@GET("/api/public/?service=Guard.sendMoneyLong")
Observable<ResponseModel<Object>> sendMoneyLong(@Query("liveuid") String liveUid, @Query("gold_num") String goldNum);
@@ -1279,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
);
}

View File

@@ -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;
@@ -3058,9 +3059,9 @@ public class LiveNetManager {
}
public void openGuard(String liveUid, String guardType, String priceKey, String stream, HttpCallback<String> callback) {
public void openGuard(String liveUid, String guardType, String priceKey, String stream,String coupon_type,String couponId, HttpCallback<String> callback) {
API.get().pdLiveApi(mContext)
.openGuard(liveUid, guardType, priceKey, stream)
.openGuard(liveUid, guardType, priceKey, stream,coupon_type,couponId)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<ResponseModel<Object>>() {
@@ -3281,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);

View 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;
}
}

View File

@@ -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);
}
/**
* 消耗指定商品
*

View File

@@ -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;//上传成功后在云存储上的文件名字

View File

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

View File

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

View File

@@ -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);
}
}

View File

@@ -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();
}
}
}

View File

@@ -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;
}
/**

View File

@@ -4,8 +4,13 @@ import android.content.Context;
import android.content.SharedPreferences;
import android.text.TextUtils;
import com.alibaba.fastjson.JSONArray;
import com.google.gson.Gson;
import com.yunbao.common.CommonAppContext;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
@@ -37,9 +42,8 @@ public class SpUtil {
public static final String ANCHOR_PK_TIME = "anchorPkTime";
//播放短视频上下滑动引导页
public static final String READ_VIDEO_GUIDE = "readVideoGuide";
public static final String MESSAGE_SYS_DEL = "FIRST_DEL";
public static final String LIVE_GAME_NEWED_LIST = "LIVE_GAME_NEWED_LIST";
public SpUtil() {
mSharedPreferences = CommonAppContext.sInstance.getSharedPreferences("SharedPreferences", Context.MODE_PRIVATE);
@@ -56,6 +60,41 @@ public class SpUtil {
return sInstance;
}
public static void setLiveGameId(String gameId) {
String gameMap = getStringValue(LIVE_GAME_NEWED_LIST);
List<String> gameNewList;
gameNewList = JSONArray.parseArray(gameMap, String.class);
L.eSw("gameMap:" + gameMap);
if (gameNewList == null) {
gameNewList = new ArrayList<>();
}
for (int i = 0; i < gameNewList.size(); i++) {
if (gameNewList.get(i).equals(gameId)) {
gameNewList.remove(i);
break;
}
}
gameNewList.add(gameId);
setStringValue(LIVE_GAME_NEWED_LIST, new Gson().toJson(gameNewList));
}
public static boolean isLiveGameNew(String gameId) {
String gameMap = getStringValue(LIVE_GAME_NEWED_LIST);
List<String> gameNewList = new ArrayList<>();
gameNewList = JSONArray.parseArray(gameMap, String.class);
if (gameNewList == null) {
gameNewList = new ArrayList<>();
}
boolean isNew = false;
for (int i = 0; i < gameNewList.size(); i++) {
if (gameNewList.get(i).equals(gameId)) {
isNew = true;
}
}
return !isNew;
}
/**
* 保存一个字符串
*/

View File

@@ -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();
// }
// }
}
}

View File

@@ -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);
}
}
}

View File

@@ -0,0 +1,67 @@
package com.yunbao.common.views;
import android.content.Context;
import android.text.TextUtils;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import com.makeramen.roundedimageview.RoundedImageView;
import com.yunbao.common.R;
import com.yunbao.common.bean.CustomSidebarChildModel;
import com.yunbao.common.glide.ImgLoader;
import com.yunbao.common.utils.SpUtil;
import com.yunbao.common.views.weight.ViewClicksAntiShake;
public class InteractionGamesChildBottomViewHolder extends RecyclerView.ViewHolder {
private RoundedImageView funGamePic;
private TextView funGameName;
private Context mContext;
public InteractionGamesChildBottomViewHolder(@NonNull View itemView, Context context) {
super(itemView);
this.mContext = context;
funGamePic = itemView.findViewById(R.id.fun_game_pic);
funGameName = itemView.findViewById(R.id.fun_game_name);
}
public void setData(CustomSidebarChildModel model, boolean rigts) {
ViewGroup.LayoutParams layoutParams = new ViewGroup.LayoutParams((int)
(mContext.getResources().getDisplayMetrics().widthPixels / 4.5),
ViewGroup.LayoutParams.WRAP_CONTENT);
itemView.setLayoutParams(layoutParams);
if (rigts) {
ImgLoader.display(itemView.getContext(), model.getIcon(), funGamePic);
} else {
ImgLoader.display(itemView.getContext(), model.getResIcon(), funGamePic);
}
funGameName.setText(model.getTitle());
if (!TextUtils.isEmpty(model.getSudGameIsNew())&&TextUtils.equals(model.getSudGameIsNew(),"1")&& SpUtil.isLiveGameNew(model.getId())){
itemView.findViewById(R.id.icon_new_game).setVisibility(View.VISIBLE);
}else {
itemView.findViewById(R.id.icon_new_game).setVisibility(View.GONE);
}
ViewClicksAntiShake.clicksAntiShake(itemView, new ViewClicksAntiShake.ViewClicksCallBack() {
@Override
public void onViewClicks() {
if (interactionGamesCallBack != null) {
interactionGamesCallBack.onItemViewClicks(model, rigts);
}
}
});
}
private InteractionGamesCallBack interactionGamesCallBack;
public void setItemViewClicks(InteractionGamesCallBack callBack) {
interactionGamesCallBack = callBack;
}
public interface InteractionGamesCallBack {
void onItemViewClicks(CustomSidebarChildModel model, boolean rigts);
}
}

View File

@@ -1,40 +1,48 @@
package com.yunbao.common.views;
import android.content.Context;
import android.text.TextUtils;
import android.view.View;
import android.widget.ImageView;
import android.view.ViewGroup;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import com.makeramen.roundedimageview.RoundedImageView;
import com.yunbao.common.R;
import com.yunbao.common.bean.CustomSidebarChildModel;
import com.yunbao.common.event.CustomDrawerPopupEvent;
import com.yunbao.common.glide.ImgLoader;
import com.yunbao.common.utils.Bus;
import com.yunbao.common.utils.SpUtil;
import com.yunbao.common.views.weight.ViewClicksAntiShake;
public class InteractionGamesChildViewHolder extends RecyclerView.ViewHolder {
private ImageView funGamePic;
private RoundedImageView funGamePic;
private TextView funGameName;
private Context mContext;
public InteractionGamesChildViewHolder(@NonNull View itemView) {
public InteractionGamesChildViewHolder(@NonNull View itemView,Context mContext) {
super(itemView);
this.mContext = mContext;
funGamePic = itemView.findViewById(R.id.fun_game_pic);
funGameName = itemView.findViewById(R.id.fun_game_name);
}
public void setData(CustomSidebarChildModel model, boolean rigts) {
ViewGroup.LayoutParams layoutParams = new ViewGroup.LayoutParams((int)
(mContext.getResources().getDisplayMetrics().widthPixels / 4.5),
ViewGroup.LayoutParams.WRAP_CONTENT);
itemView.setLayoutParams(layoutParams);
if (rigts) {
ImgLoader.display(itemView.getContext(), model.getIcon(), funGamePic);
} else {
ImgLoader.display(itemView.getContext(), model.getResIcon(), funGamePic);
}
funGameName.setText(model.getTitle());
if (!TextUtils.isEmpty(model.getSudGameIsNew())&&TextUtils.equals(model.getSudGameIsNew(),"1")){
if (!TextUtils.isEmpty(model.getSudGameIsNew())&&TextUtils.equals(model.getSudGameIsNew(),"1")&& SpUtil.isLiveGameNew(model.getId())){
itemView.findViewById(R.id.icon_new_game).setVisibility(View.VISIBLE);
}else {
itemView.findViewById(R.id.icon_new_game).setVisibility(View.GONE);
@@ -45,8 +53,6 @@ public class InteractionGamesChildViewHolder extends RecyclerView.ViewHolder {
if (interactionGamesCallBack != null) {
interactionGamesCallBack.onItemViewClicks(model, rigts);
}
}
});
}

View File

@@ -1,6 +1,8 @@
package com.yunbao.common.views;
import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
@@ -25,21 +27,22 @@ public class LiveNewRoleFunGamesViewHolder extends RecyclerView.ViewHolder {
private RecyclerView childList;
private ImageView selectMoreIcon;
boolean isShowMore = true;
private Context mContext;
public LiveNewRoleFunGamesViewHolder(@NonNull View itemView) {
public LiveNewRoleFunGamesViewHolder(@NonNull View itemView, Context context) {
super(itemView);
this.mContext = context;
sendGoodGift = itemView.findViewById(R.id.send_good_gift);
childList = itemView.findViewById(R.id.child_list);
selectMoreIcon = itemView.findViewById(R.id.select_more_icon);
selectMore = itemView.findViewById(R.id.select_more);
funGamesAdapter = new NewRoleFunGamesAdapter(itemView.getContext(),true);
funGamesAdapter = new NewRoleFunGamesAdapter(itemView.getContext(), true);
childList.setLayoutManager(new LinearLayoutManager(itemView.getContext(), LinearLayoutManager.HORIZONTAL, false));
childList.setAdapter(funGamesAdapter);
}
public void setData(CustomSidebarInfoModel model) {
List<CustomSidebarChildModel> sidebarChildModels = model.getChild();
itemView.findViewById(R.id.select_more_layout).setVisibility(sidebarChildModels.size() >= 8 ? View.VISIBLE : View.GONE);
sendGoodGift.setText(model.getTitle());

View File

@@ -1,11 +1,13 @@
package com.yunbao.common.views;
import android.content.Context;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.yunbao.common.R;
@@ -21,14 +23,14 @@ public class LiveNewRoleInteractionGamesViewHolder extends RecyclerView.ViewHold
private RecyclerView childList;
private ImageView selectMoreIcon;
boolean isShowMore = true;
public LiveNewRoleInteractionGamesViewHolder(@NonNull View itemView) {
public LiveNewRoleInteractionGamesViewHolder(@NonNull View itemView, Context context) {
super(itemView);
sendGoodGift = itemView.findViewById(R.id.send_good_gift);
childList = itemView.findViewById(R.id.child_list);
selectMoreIcon = itemView.findViewById(R.id.select_more_icon);
funGamesAdapter = new LiveNewRoleInteractionGamesAdapter(itemView.getContext(), true);
childList.setLayoutManager(new GridLayoutManager(itemView.getContext(), 4));
LinearLayoutManager layoutManager = new LinearLayoutManager(context, LinearLayoutManager.HORIZONTAL, false);
childList.setLayoutManager(layoutManager);
childList.setAdapter(funGamesAdapter);
}

View File

@@ -1,10 +1,13 @@
package com.yunbao.common.views;
import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.yunbao.common.R;
@@ -21,19 +24,21 @@ public class LiveNewRoleRigtsInterestsViewHolder extends RecyclerView.ViewHolder
private TextView sendGoodGift;
private RecyclerView childList;
private boolean showRed = false;
public LiveNewRoleRigtsInterestsViewHolder(@NonNull View itemView,boolean showRed) {
private Context mContext;
public LiveNewRoleRigtsInterestsViewHolder(@NonNull View itemView, boolean showRed,Context mContext) {
super(itemView);
this.mContext = mContext;
sendGoodGift = itemView.findViewById(R.id.send_good_gift);
childList = itemView.findViewById(R.id.child_list);
sendGoodGift = itemView.findViewById(R.id.send_good_gift);
childList = itemView.findViewById(R.id.child_list);
funGamesAdapter = new LiveNewRoleFunGamesAdapter(itemView.getContext(), false,showRed);
childList.setLayoutManager(new GridLayoutManager(itemView.getContext(), 4));
LinearLayoutManager layoutManager = new LinearLayoutManager(itemView.getContext(), LinearLayoutManager.HORIZONTAL, false);
childList.setLayoutManager(layoutManager);
childList.setAdapter(funGamesAdapter);
}
public void setData(CustomSidebarInfoModel model) {
sendGoodGift.setText(model.getTitle());
funGamesAdapter.updateData(generateData());
}

View File

@@ -38,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;
@@ -82,6 +84,15 @@ public class LiveSudGamePopup extends BottomPopupView {
//第二次进入时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);//多人游戏
@@ -114,7 +125,7 @@ public class LiveSudGamePopup extends BottomPopupView {
gameTitle.setText(mCreateSudRoomModel.getSudGameName());
roomName.setText(mCreateSudRoomModel.getRoomName());
roomNumber.setText(mCreateSudRoomModel.getSudGameRoomId());
ImgLoader.display(getContext(), mCreateSudRoomModel.getAvatar(), mAvatar);
//ImgLoader.display(getContext(), mCreateSudRoomModel.getAvatar(), mAvatar);
}
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.exit), new ViewClicksAntiShake.ViewClicksCallBack() {
@Override

View File

@@ -1,8 +1,10 @@
package com.yunbao.common.views;
import android.content.Context;
import android.text.TextUtils;
import android.util.Log;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
@@ -27,8 +29,10 @@ public class NewRoleFunGamesChildViewHolder extends RecyclerView.ViewHolder {
private View red_point;
private boolean showRed = false;
private View total_image_red_point;
public NewRoleFunGamesChildViewHolder(@NonNull View itemView, boolean showRed) {
private Context mContext;
public NewRoleFunGamesChildViewHolder(@NonNull View itemView, boolean showRed, Context mContext) {
super(itemView);
this.mContext = mContext;
this.showRed = showRed;
funGamePic = itemView.findViewById(R.id.fun_game_pic);
funGameName = itemView.findViewById(R.id.fun_game_name);

View File

@@ -27,7 +27,7 @@ public class RigtsInterestsViewHolder extends RecyclerView.ViewHolder {
sendGoodGift = itemView.findViewById(R.id.send_good_gift);
childList = itemView.findViewById(R.id.child_list);
funGamesAdapter = new FunGamesAdapter(itemView.getContext(), false);
childList.setLayoutManager(new GridLayoutManager(itemView.getContext(), 3));
childList.setLayoutManager(new GridLayoutManager(itemView.getContext(), 4));
childList.setAdapter(funGamesAdapter);
}

View File

@@ -4,6 +4,7 @@ import android.view.View;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
@@ -25,15 +26,19 @@ public class SudGameUserListViewHolder extends RecyclerView.ViewHolder {
private FrameLayout user_layout;
private RoundedImageView sud_game_user;
private LinearLayout layout;
private TextView userName;
private FrameLayout vacancy_sud_gameLayout;
public SudGameUserListViewHolder(@NonNull View itemView) {
super(itemView);
vacancy_sud_game = itemView.findViewById(R.id.vacancy_sud_game);
vacancy_sud_gameLayout = itemView.findViewById(R.id.vacancy_sud_gameLayout);
sud_game_user = itemView.findViewById(R.id.sud_game_user);
user_layout = itemView.findViewById(R.id.user_layout);
mic_status = itemView.findViewById(R.id.mic_status);
layout = itemView.findViewById(R.id.layout);
game_status = itemView.findViewById(R.id.game_status);
userName= itemView.findViewById(R.id.userName);
}
public void upData(SudGameUserModel sudGameUserModel, SudGameUserListAdapter.SudGameSmallCallBack sudGameSmallCallBack, int position) {
@@ -46,7 +51,7 @@ public class SudGameUserListViewHolder extends RecyclerView.ViewHolder {
// }
// });
if (sudGameUserModel.isNullUser()) {
vacancy_sud_game.setVisibility(View.VISIBLE);
vacancy_sud_gameLayout.setVisibility(View.VISIBLE);
user_layout.setVisibility(View.GONE);
ViewClicksAntiShake.clicksAntiShake(vacancy_sud_game, new ViewClicksAntiShake.ViewClicksCallBack() {
@Override
@@ -55,7 +60,7 @@ public class SudGameUserListViewHolder extends RecyclerView.ViewHolder {
}
});
} else {
vacancy_sud_game.setVisibility(View.GONE);
vacancy_sud_gameLayout.setVisibility(View.GONE);
user_layout.setVisibility(View.VISIBLE);
ImgLoader.display2(itemView.getContext(), sudGameUserModel.getAvatar(), sud_game_user);
if (sudGameUserModel.getMicStatus() == 2) {
@@ -71,6 +76,7 @@ public class SudGameUserListViewHolder extends RecyclerView.ViewHolder {
} else {
game_status.setVisibility(View.GONE);
}
userName.setText(sudGameUserModel.getUserNicename());
ViewClicksAntiShake.clicksAntiShake(user_layout, new ViewClicksAntiShake.ViewClicksCallBack() {
@Override
public void onViewClicks() {

View File

@@ -27,6 +27,7 @@ import com.opensource.svgaplayer.SVGAVideoEntity;
import com.yunbao.common.R;
import com.yunbao.common.glide.ImgLoader;
import com.yunbao.common.utils.BitmapUtil;
import com.yunbao.common.utils.L;
import com.yunbao.common.utils.SVGAViewUtils;
import org.jetbrains.annotations.NotNull;
@@ -56,6 +57,8 @@ public class NobleNoticeView extends FrameLayout {
private HorizontalScrollView contextLayout;
private RelativeLayout scrollLayout;
private ImageView nobleIcon;
private String anchorUid;
private String mLiveId;
public NobleNoticeView(@NonNull Context context) {
super(context);
@@ -97,9 +100,11 @@ public class NobleNoticeView extends FrameLayout {
});
}
public NobleNoticeView setRootView(String uHead, String userNameStr, String anchorNicknameStr, String anchorUid) {
public NobleNoticeView setRootView(String uHead, String userNameStr, String anchorNicknameStr, String anchorUid,String mLiveId) {
this.uhead = uHead;
this.anchorNicknameStr = anchorNicknameStr.trim();
this.anchorUid = anchorUid;
this.mLiveId = mLiveId;
userName.setText(userNameStr);
anchorNickname.setText(anchorNicknameStr.trim());
if (TextUtils.isEmpty(anchorNicknameStr.trim())) {
@@ -112,6 +117,10 @@ public class NobleNoticeView extends FrameLayout {
findViewById(R.id.anchor_nickname).setVisibility(VISIBLE);
openNoble.setText(mContext.getString(R.string.open_noble));
}
if(anchorUid.equals(mLiveId)){
L.eSw("showBuyVipMessage:"+anchorUid+"__"+mLiveId);
gotoRoomView.setVisibility(GONE);
}
return this;
}
@@ -352,13 +361,15 @@ public class NobleNoticeView extends FrameLayout {
gotoRoomView.setLayoutParams(layoutParams);
contextLayout.setLayoutParams(contextLayoutParams);
if (!TextUtils.isEmpty(anchorNicknameStr)) {
gotoRoomView.setVisibility(VISIBLE);
if(mLiveId.equals(anchorUid)){
gotoRoomView.setVisibility(GONE);
}else{
gotoRoomView.setVisibility(VISIBLE);
}
findViewById(R.id.in).setVisibility(VISIBLE);
findViewById(R.id.anchor_nickname).setVisibility(VISIBLE);
}
contextLayout.setVisibility(VISIBLE);
});
}

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="360dp" />
<corners android:radius="10dp" />
<solid android:color="#B3414141" />
</shape>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:topLeftRadius="12dp" android:topRightRadius="12dp" />
<solid android:color="#201E1A" />
<solid android:color="#292929" />
</shape>

View File

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

View File

@@ -14,7 +14,7 @@
<clip android:clipOrientation="horizontal">
<shape>
<corners android:radius="3dp" />
<solid android:color="#CE2BFF" />
<solid android:color="#936EFF" />
</shape>
</clip>
</item>

View File

@@ -2,6 +2,8 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="#201E1A"
android:orientation="vertical">
@@ -14,17 +16,25 @@
android:layout_width="match_parent"
android:layout_height="match_parent" />
</RelativeLayout>
<LinearLayout
android:layout_width="150dp"
android:layout_height="50dp"
android:layout_width="138dp"
android:layout_height="38dp"
android:layout_marginStart="23dp"
android:layout_marginTop="48dp"
android:background="@drawable/bg_live_sud_game_top_new"
android:gravity="start|center_vertical">
<com.makeramen.roundedimageview.RoundedImageView
android:id="@+id/avatar"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_marginStart="10dp"
android:scaleType="centerCrop"
android:src="@mipmap/live_dialog_top_game_icon"
android:visibility="visible"
tools:visibility="visible"
app:riv_oval="true" />
<LinearLayout
android:layout_width="wrap_content"
@@ -69,30 +79,27 @@
</LinearLayout>
<LinearLayout
android:layout_width="98dp"
android:layout_width="88dp"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:layout_marginTop="49dp"
android:layout_marginEnd="20dp"
android:layout_marginTop="55dp"
android:gravity="center_vertical">
<ImageView
android:id="@+id/sud_history"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_marginEnd="14dp"
android:src="@mipmap/icon_sud_history_live_new" />
<TextView
<ImageView
android:id="@+id/exit"
android:layout_width="40dp"
android:layout_height="40dp"
android:background="@drawable/bg_live_sud_game_back_new"
android:layout_width="30dp"
android:layout_height="30dp"
android:background="@mipmap/bg_live_sud_game_back_new2"
android:gravity="center"
android:text="@string/video_exit"
android:textColor="#FFFFFF"
android:textSize="12sp" />
android:textSize="8sp" />
</LinearLayout>
<LinearLayout
@@ -131,10 +138,8 @@
android:id="@+id/game_seat"
android:layout_width="34dp"
android:layout_height="34dp"
android:src="@mipmap/icon_game_seat" />
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
@@ -146,13 +151,13 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="70dp"
android:layout_marginTop="98dp">
android:layout_height="50dp"
android:layout_marginTop="93dp">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/user_list"
android:layout_marginStart="11dp"
android:layout_marginEnd="20dp"
android:layout_marginEnd="12dp"
android:layout_width="wrap_content"
android:layout_height="match_parent" />
</LinearLayout>

View File

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

View File

@@ -0,0 +1,88 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="310dp"
android:layout_height="260dp"
android:gravity="center_horizontal"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="243dp"
android:background="@drawable/guard_buy_tips_bg">
<ImageView
android:id="@+id/btn_cancel"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_alignParentEnd="true"
android:layout_marginTop="10dp"
android:layout_marginEnd="10dp"
android:src="@mipmap/icon_guard_buy_tips_close" />
<com.flyjingfish.gradienttextviewlib.GradientTextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="20dp"
android:letterSpacing="0.1"
android:text="@string/dialog_tip"
android:textSize="22dp"
app:gradient_angle="45"
app:gradient_endColor="#F9E1AE"
app:gradient_startColor="#C28413" />
<TextView
android:id="@+id/content2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:layout_marginStart="20dp"
android:layout_marginTop="5dp"
android:layout_marginEnd="20dp"
android:gravity="center"
android:letterSpacing="0.1"
android:text="@string/current_guard_expires"
android:textColor="#FFE0BF"
android:textSize="14dp" />
</RelativeLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_alignParentBottom="true"
android:gravity="center"
android:layout_centerHorizontal="true"
android:layout_height="wrap_content">
<TextView
android:id="@+id/btn_cancel1"
android:layout_width="100dp"
android:gravity="center"
android:layout_height="38dp"
android:textColor="#F7F7F7"
android:textSize="15sp"
android:textStyle="bold"
android:background="@mipmap/guard_buy_tips_cancel_bg"
android:letterSpacing="0.1"
android:text="@string/live_guard_buy_coupon_tips_cancel" />
<TextView
android:layout_marginLeft="40dp"
android:id="@+id/btn_confirm"
android:layout_width="100dp"
android:gravity="center"
android:layout_height="38dp"
android:textColor="#893D0D"
android:textSize="15sp"
android:textStyle="bold"
android:background="@drawable/guard_buy_tips_sure_bg"
android:letterSpacing="0.1"
android:text="@string/live_guard_buy_coupon_tips_use" />
</LinearLayout>
</RelativeLayout>

View File

@@ -1,19 +1,32 @@
<?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"
android:layout_marginTop="14dp"
android:layout_marginTop="10dp"
android:gravity="center_vertical">
<TextView
android:id="@+id/game_title"
android:visibility="gone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
@@ -22,6 +35,80 @@
android:textSize="16sp"
android:textStyle="bold" />
<LinearLayout
android:layout_marginLeft="10dp"
android:layout_width="121dp"
android:layout_height="39dp"
android:padding="2dp"
android:background="@drawable/dialog_live_sud_game_name_bg"
android:gravity="center_vertical">
<com.makeramen.roundedimageview.RoundedImageView
android:id="@+id/avatar"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_marginStart="6dp"
android:scaleType="centerCrop"
android:src="@mipmap/live_dialog_top_game_icon"
android:visibility="visible"
tools:visibility="visible"
app:riv_oval="true" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginStart="10dp"
android:orientation="vertical">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="1dp">
<TextView
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"
android:textSize="12sp" />
<TextView
android:id="@+id/room_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxWidth="98dp"
android:singleLine="true"
android:textColor="@color/white"
android:textSize="12sp" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="2dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/interactive_game_create_room_number"
android:textColor="@color/white"
android:textSize="12sp" />
<TextView
android:id="@+id/room_number"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/white"
android:textSize="12sp" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
<View
android:layout_width="0dp"
android:layout_height="1dp"
@@ -42,94 +129,15 @@
android:src="@mipmap/icon_min_game_new"
android:visibility="visible" />
<TextView
<ImageView
android:id="@+id/exit"
android:layout_width="30dp"
android:layout_marginEnd="12dp"
android:layout_height="30dp"
android:background="@drawable/bg_live_sud_game_back_new2"
android:background="@mipmap/bg_live_sud_game_back_new2"
android:gravity="center"
android:text="@string/video_exit"
android:textColor="#FFFFFF"
android:textSize="8sp" />
</LinearLayout>
<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" />
<LinearLayout
android:layout_width="175dp"
android:layout_height="50dp"
android:layout_marginStart="15dp"
android:layout_marginTop="16dp"
android:background="@drawable/bg_live_sud_game_top"
android:gravity="center_vertical">
<com.makeramen.roundedimageview.RoundedImageView
android:id="@+id/avatar"
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_marginStart="6dp"
android:scaleType="centerCrop"
android:visibility="gone"
app:riv_oval="true" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginStart="4dp"
android:orientation="vertical">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="4dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/interactive_game_create_room_name"
android:textColor="@color/white"
android:textSize="12sp" />
<TextView
android:id="@+id/room_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxWidth="98dp"
android:singleLine="true"
android:textColor="@color/white"
android:textSize="12sp" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="4dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/interactive_game_create_room_number"
android:textColor="@color/white"
android:textSize="12sp" />
<TextView
android:id="@+id/room_number"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/white"
android:textSize="12sp" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</RelativeLayout>
</LinearLayout>
</FrameLayout>

View File

@@ -3,7 +3,8 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="218dp"
android:layout_height="240dp"
android:id="@+id/root"
android:layout_marginStart="17dp"
android:layout_marginEnd="17dp"
android:background="@drawable/background_order_dialog"
@@ -39,7 +40,7 @@
android:layout_height="wrap_content"
android:layout_marginStart="46dp"
android:text="Lv7"
android:textColor="#CE2BFF"
android:textColor="#2439B9"
android:textSize="14sp" />
<androidx.constraintlayout.widget.ConstraintLayout
@@ -66,6 +67,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:textColor="#000"
android:layout_marginRight="7dp"
android:textSize="12sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
@@ -75,23 +77,23 @@
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
<TextView
android:layout_width="match_parent"
android:gravity="center"
android:layout_marginTop="10dp"
android:layout_height="wrap_content"
android:text="@string/buying_experience_point"
android:textColor="#0D21B2"
android:textSize="14sp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginStart="15dp"
android:layout_marginTop="20dp"
android:layout_marginTop="10dp"
android:layout_marginEnd="15dp"
android:gravity="center">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/buying_experience_point"
android:textColor="#0D21B2"
android:textSize="14sp" />
<LinearLayout
android:layout_width="90dp"
android:layout_height="25dp"
@@ -103,7 +105,7 @@
android:layout_height="match_parent"
android:layout_weight="1" />
<TextView
<EditText
android:id="@+id/tickets_plus_minus"
android:layout_width="0dp"
android:layout_height="match_parent"
@@ -111,6 +113,8 @@
android:background="@null"
android:gravity="center"
android:imeOptions="actionSend"
android:maxEms="4"
android:maxLength="4"
android:inputType="number"
android:singleLine="true"
android:text="0"
@@ -129,8 +133,8 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:text="100"
android:textColor="#0D21B2"
android:text="00 = 100"
android:textColor="#000000"
android:textSize="11sp" />
<ImageView

View File

@@ -38,7 +38,9 @@
<ImageView
android:id="@+id/btn_close"
android:layout_width="50dp"
android:layout_marginLeft="-35dp"
android:layout_height="50dp"
android:layout_toRightOf="@+id/layout"
android:paddingBottom="30dp"
android:src="@mipmap/icon_live_close_3" />

View File

@@ -1,16 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:gravity="center"
android:paddingEnd="7dp"
android:gravity="start"
android:orientation="vertical">
<!--身份特权-->
<RelativeLayout
android:layout_width="40dp"
android:layout_width="55dp"
android:layout_height="40dp">
<!--普通工具合集-->
<ImageView
@@ -27,7 +27,6 @@
android:layout_height="6dp"
android:layout_alignParentEnd="true"
android:layout_marginTop="3dp"
android:layout_marginEnd="5dp"
android:background="@drawable/bg_red_point"
tools:visibility="visible" />
@@ -35,10 +34,11 @@
<TextView
android:id="@+id/fun_game_name"
android:layout_width="wrap_content"
android:layout_width="55dp"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:text="@string/guard_guard"
android:gravity="center"
android:textColor="#9A9A9A"
android:textSize="10sp" />

View File

@@ -39,9 +39,10 @@
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/child_list"
android:layout_marginTop="10dp"
android:layout_marginLeft="10dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp" />
<LinearLayout

View File

@@ -23,16 +23,13 @@
android:textColor="#F6F7FB"
android:textSize="14sp" />
</FrameLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/child_list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginBottom="16dp" />
<LinearLayout

View File

@@ -16,13 +16,12 @@
<RelativeLayout
android:layout_width="50dp"
android:layout_height="50dp">
<!--普通工具合集-->
<ImageView
android:id="@+id/fun_game_pic"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_width="38dp"
android:layout_height="38dp"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:src="@mipmap/live_more_icon_guard" />
@@ -63,6 +62,6 @@
android:maxLines="1"
android:text="@string/guard_guard"
android:textColor="#9A9A9A"
android:textSize="14sp" />
android:textSize="10sp" />
</LinearLayout>

View File

@@ -1,17 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_width="50dp"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:paddingEnd="30dp"
android:clickable="true"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:id="@+id/fun_game_pic"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_width="38dp"
android:layout_height="38dp"
android:src="@mipmap/live_more_icon_guard" />
<TextView
@@ -21,6 +20,6 @@
android:layout_marginTop="2dp"
android:text="@string/guard_guard"
android:textColor="#9A9A9A"
android:textSize="14sp" />
android:textSize="10sp" />
</LinearLayout>

View File

@@ -4,63 +4,70 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginEnd="7dp"
android:gravity="center"
android:gravity="start"
android:orientation="vertical">
<FrameLayout
android:layout_width="60dp"
<LinearLayout
android:layout_marginTop="15dp"
android:layout_width="wrap_content"
android:orientation="vertical"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/fun_game_pic"
android:layout_width="48dp"
android:layout_height="48dp"
android:src="@mipmap/live_more_icon_guard" />
<RelativeLayout
android:layout_width="55dp"
android:layout_height="wrap_content">
<View
android:id="@+id/red_point"
android:layout_width="10dp"
android:layout_height="10dp"
android:layout_gravity="end"
android:layout_marginTop="5dp"
android:layout_marginEnd="5dp"
android:background="@drawable/bg_red_point"
android:visibility="gone"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:visibility="gone" />
<com.makeramen.roundedimageview.RoundedImageView
android:id="@+id/fun_game_pic"
android:layout_width="38dp"
android:layout_height="38dp"
android:layout_centerInParent="true"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:scaleType="centerCrop"
android:src="@mipmap/live_more_icon_guard"
android:visibility="visible"
app:riv_oval="true" />
<ImageView
android:id="@+id/icon_new_game"
android:layout_width="26dp"
android:layout_height="13dp"
android:layout_gravity="end"
<View
android:id="@+id/red_point"
android:layout_width="10dp"
android:layout_height="10dp"
android:layout_gravity="end"
android:layout_alignParentEnd="true"
android:background="@drawable/bg_red_point"
android:visibility="gone"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:visibility="visible" />
<ImageView
android:id="@+id/icon_new_game"
android:layout_width="23dp"
android:layout_height="10dp"
android:layout_gravity="end"
android:layout_alignParentEnd="true"
android:visibility="gone"
tools:visibility="visible"
android:src="@mipmap/icon_new_game" />
</RelativeLayout>
<TextView
android:id="@+id/fun_game_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:visibility="gone"
android:layout_marginEnd="5dp"
android:src="@mipmap/icon_new_game" />
</FrameLayout>
android:gravity="center"
android:maxLines="1"
android:text="@string/guard_guard"
android:textColor="#9A9A9A"
app:autoSizeMaxTextSize="14sp"
app:autoSizeMinTextSize="5sp"
app:autoSizeStepGranularity="1sp"
app:autoSizeTextType="uniform"
android:textSize="10sp" />
</LinearLayout>
<TextView
android:id="@+id/fun_game_name"
android:layout_width="match_parent"
android:gravity="center"
android:layout_marginStart="1dp"
android:layout_marginEnd="1dp"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:maxLines="1"
android:text="@string/guard_guard"
android:textColor="#9A9A9A"
app:autoSizeMaxTextSize="14sp"
app:autoSizeMinTextSize="5sp"
app:autoSizeStepGranularity="1sp"
app:autoSizeTextType="uniform"
android:textSize="14sp" />
</LinearLayout>

View File

@@ -2,7 +2,7 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
android:layout_marginStart="15dp"
android:orientation="vertical">
<FrameLayout

View File

@@ -2,12 +2,12 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
android:orientation="vertical">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_marginTop="14dp">
<TextView
@@ -23,5 +23,7 @@
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/child_list"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginTop="10dp" />
</LinearLayout>

View File

@@ -2,12 +2,12 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
android:orientation="vertical">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_marginTop="14dp">
<TextView
@@ -23,7 +23,10 @@
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/child_list"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
android:layout_marginTop="15dp"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:overScrollMode="never" />
<LinearLayout
android:id="@+id/select_more_layout"

View File

@@ -26,6 +26,7 @@
</FrameLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/child_list"
android:layout_marginLeft="10dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp" />

View File

@@ -3,50 +3,73 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/layout"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="vertical">
<ImageView
android:id="@+id/vacancy_sud_game"
android:layout_width="45dp"
android:layout_height="45dp"
android:layout_marginStart="12dp"
android:src="@mipmap/icon_vacancy_sud_game"
android:visibility="visible" />
<FrameLayout
android:id="@+id/vacancy_sud_gameLayout"
android:layout_width="wrap_content"
android:layout_height="50dp"
android:visibility="visible">
<ImageView
android:id="@+id/vacancy_sud_game"
android:layout_width="34dp"
android:layout_height="50dp"
android:paddingBottom="5dp"
android:layout_marginStart="15dp"
android:src="@mipmap/icon_vacancy_sud_game" />
</FrameLayout>
<FrameLayout
android:id="@+id/user_layout"
android:layout_width="wrap_content"
android:layout_height="60dp"
android:layout_height="50dp"
android:visibility="visible">
<com.makeramen.roundedimageview.RoundedImageView
android:id="@+id/sud_game_user"
android:layout_width="45dp"
android:layout_height="45dp"
android:layout_gravity="center_vertical"
android:layout_marginStart="12dp"
android:layout_width="34dp"
android:layout_height="34dp"
android:layout_marginTop="5dp"
android:layout_marginStart="15dp"
android:scaleType="centerCrop"
android:src="@mipmap/icon_vacancy_sud_game"
app:riv_oval="true" />
<ImageView
android:id="@+id/mic_status"
android:layout_width="15dp"
android:layout_height="15dp"
android:layout_marginStart="5dp"
android:layout_marginTop="5dp"
android:layout_width="9dp"
android:layout_height="9dp"
android:layout_marginTop="3dp"
android:layout_marginStart="15dp"
android:src="@mipmap/icon_game_close_wheat_mute" />
<ImageView
android:id="@+id/game_status"
android:layout_width="18dp"
android:layout_height="14dp"
android:layout_marginStart="5dp"
android:layout_gravity="bottom|center_horizontal"
android:layout_width="17dp"
android:layout_height="11dp"
android:layout_marginTop="31dp"
android:layout_marginStart="8dp"
android:layout_gravity="center_horizontal"
android:src="@mipmap/icon_game_status" />
<TextView
android:id="@+id/userName"
android:text="用户名"
android:layout_marginTop="40dp"
android:ellipsize="end"
android:visibility="gone"
android:maxLines="1"
android:gravity="center"
android:textColor="#333333"
android:layout_marginStart="8dp"
android:textSize="8dp"
android:layout_gravity="center_horizontal"
android:layout_width="34dp"
android:layout_height="wrap_content"/>
</FrameLayout>
</LinearLayout>

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.9 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@@ -1332,7 +1332,7 @@ Limited ride And limited avatar frame</string>
<string name="interactive_game_room_all">All Game</string>
<string name="interactive_game_create_room">Create a room</string>
<string name="interactive_game_create_room_name">"Room Name: "</string>
<string name="interactive_game_create_room_number">Room ID:</string>
<string name="interactive_game_create_room_number">ID:</string>
<string name="interactive_game_create_room_name_input">Please enter a room name</string>
<string name="interactive_game_create_game_type">Game type:</string>
<string name="interactive_game_create_game_sill">Game threshold:</string>

View File

@@ -1329,7 +1329,7 @@
<string name="interactive_game_room_all">所有遊戲</string>
<string name="interactive_game_create_room">創建房間</string>
<string name="interactive_game_create_room_name">房間名稱:</string>
<string name="interactive_game_create_room_number">房間號</string>
<string name="interactive_game_create_room_number">ID</string>
<string name="interactive_game_create_room_name_input">請輸入房間名</string>
<string name="interactive_game_create_game_type">游戲類型:</string>
<string name="interactive_game_create_game_sill">游戲門檻:</string>
@@ -1501,6 +1501,8 @@
<string name="main_type_theater">短劇</string>
<string name="prank_complete">完成*1</string>
<string name="pking_over">主播正在PK稍後再試</string>
<string name="live_guard_buy_coupon_tips_use">使用</string>
<string name="live_guard_buy_coupon_tips_cancel">不使用</string>
<string name="sub_admission_fee">*將收取門檻的10%作為門票</string>
</resources>

View File

@@ -1328,7 +1328,7 @@
<string name="interactive_game_room_all">所有遊戲</string>
<string name="interactive_game_create_room">創建房間</string>
<string name="interactive_game_create_room_name">房間名稱:</string>
<string name="interactive_game_create_room_number">房間號</string>
<string name="interactive_game_create_room_number">ID</string>
<string name="interactive_game_create_room_name_input">請輸入房間名</string>
<string name="interactive_game_create_game_type">游戲類型:</string>
<string name="interactive_game_create_game_sill">游戲門檻:</string>
@@ -1500,6 +1500,8 @@
<string name="main_type_theater">短劇</string>
<string name="prank_complete">完成*1</string>
<string name="pking_over">主播正在PK稍後再試</string>
<string name="live_guard_buy_coupon_tips_use">使用</string>
<string name="live_guard_buy_coupon_tips_cancel">不使用</string>
<string name="sub_admission_fee">*將收取門檻的10%作為門票</string>
</resources>

View File

@@ -1327,7 +1327,7 @@
<string name="interactive_game_room_all">所有遊戲</string>
<string name="interactive_game_create_room">創建房間</string>
<string name="interactive_game_create_room_name">房間名稱:</string>
<string name="interactive_game_create_room_number">房間號</string>
<string name="interactive_game_create_room_number">ID</string>
<string name="interactive_game_create_room_name_input">請輸入房間名</string>
<string name="interactive_game_create_game_type">游戲類型:</string>
<string name="interactive_game_create_game_sill">游戲門檻:</string>
@@ -1497,6 +1497,8 @@
<string name="main_type_theater">短劇</string>
<string name="prank_complete">完成*1</string>
<string name="pking_over">主播正在PK稍後再試</string>
<string name="live_guard_buy_coupon_tips_use">使用</string>
<string name="live_guard_buy_coupon_tips_cancel">不使用</string>
<string name="sub_admission_fee">*將收取門檻的10%作為門票</string>
</resources>

View File

@@ -1335,7 +1335,7 @@ Limited ride And limited avatar frame</string>
<string name="interactive_game_room_all">All Game</string>
<string name="interactive_game_create_room">Create a room</string>
<string name="interactive_game_create_room_name">"Room Name: "</string>
<string name="interactive_game_create_room_number">Room ID:</string>
<string name="interactive_game_create_room_number">ID:</string>
<string name="interactive_game_create_room_name_input">Please enter a room name</string>
<string name="interactive_game_create_game_type">Game type:</string>
<string name="interactive_game_create_game_sill">Game threshold:</string>
@@ -1506,6 +1506,8 @@ Limited ride And limited avatar frame</string>
<string name="main_type_theater" >Theater</string>
<string name="pking_over">The anchor is in PK, please try again later</string>
<string name="prank_complete">once</string>
<string name="live_guard_buy_coupon_tips_use">Use</string>
<string name="live_guard_buy_coupon_tips_cancel">Not use</string>
<string name="sub_admission_fee">*10% of the threshold will be charged as ticket</string>

View File

@@ -1,19 +1,19 @@
ext {
android = [
compileSdkVersion: 33,
compileSdkVersion: 34,
buildToolsVersion: "29.0.2",
minSdkVersion : 21,
targetSdkVersion : 33,
versionCode : 678,
versionName : "6.7.0"
minSdkVersion : 23,
targetSdkVersion : 34,
versionCode : 690,
versionName : "6.7.1"
]
manifestPlaceholders = [
//正式、
// serverHost : "https://napi.yaoulive.com",
serverHost : "https://napi.yaoulive.com",
// 测试
testServerHost : "https://ceshi.yaoulive.com",
buildTime : new Date().format("MM-dd HH:mm", TimeZone.getTimeZone("GMT+8")),
testServerHost : "https://ceshi.yaoulive.com",
//百度语音识别

View File

@@ -27,8 +27,8 @@ ext {
"magicIndicator" : 'com.github.hackware1993:MagicIndicator:1.6.0',//ViewPager指示器
"banner" : 'com.ms:banner:1.0.0',//轮播图
"Luban" : 'top.zibin:Luban:1.1.8',//鲁班压缩图片
"arouter" : 'com.alibaba:arouter-api:1.5.2',//ARouter
"arouter-compiler" : 'com.alibaba:arouter-compiler:1.2.2',
"arouter" : 'com.github.jadepeakpoet.ARouter:arouter-api:1.0.3',//ARouter
"arouter-compiler" : 'com.github.jadepeakpoet.ARouter:arouter-compiler:1.0.3',
"leakcanary" : 'com.squareup.leakcanary:leakcanary-android:2.9.1',
"blank-utilcode" : 'com.blankj:utilcode:1.30.0',

View File

@@ -13,18 +13,17 @@
#Thu Feb 04 00:05:45 CST 2021
android.injected.testOnly=false
org.gradle.daemon=true
org.gradle.jvmargs=-Xmx4096m -XX:MaxPermSize=4096m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
org.gradle.jvmargs=-Xmx4096m -XX:MaxMetaspaceSize=4096m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
org.gradle.parallel=true
org.gradle.configureondemand=true
android.useAndroidX=true
android.enableJetifier=true
android.nonTransitiveRClass=false
systemProp.http.proxyHost=127.0.0.1
systemProp.https.proxyHost=127.0.0.1
systemProp.https.proxyPort=7890
systemProp.http.proxyPort=7890
#android.enableR8.fullMode=true
android.enableR8.fullMode=true

View File

@@ -3,5 +3,5 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-all.zip

View File

@@ -3,6 +3,7 @@ apply plugin: 'img-optimizer'
apply from: "../package_config.gradle"
android {
namespace "com.sahooz.library"
compileSdkVersion rootProject.ext.android.compileSdkVersion
buildToolsVersion rootProject.ext.android.buildToolsVersion
packagingOptions {

View File

@@ -1,5 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.sahooz.library">
>
</manifest>

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