Compare commits
14 Commits
branch_new
...
dev-lxj
| Author | SHA1 | Date | |
|---|---|---|---|
| d3bd838753 | |||
| 02715f1346 | |||
| c1d77850f1 | |||
| 773c3fc8b4 | |||
| d0337a723c | |||
| 96c679528e | |||
| 6b9490cceb | |||
| 877ef5ea05 | |||
| 771138d34c | |||
| 520bc8e1bb | |||
| f5377127ce | |||
| f4f04b59a8 | |||
| a993a7710f | |||
| a5ebc83dea |
20
.gitignore
vendored
@@ -1,15 +1,9 @@
|
|||||||
|
.idea/
|
||||||
*.iml
|
*.iml
|
||||||
.gradle
|
build/
|
||||||
/local.properties
|
|
||||||
/.idea/caches
|
|
||||||
/.idea/libraries
|
|
||||||
/.idea/modules.xml
|
|
||||||
/.idea/workspace.xml
|
|
||||||
/.idea/navEditor.xml
|
|
||||||
/.idea/assetWizardSettings.xml
|
|
||||||
.DS_Store
|
|
||||||
/build
|
|
||||||
/captures
|
|
||||||
.externalNativeBuild
|
|
||||||
.cxx
|
|
||||||
local.properties
|
local.properties
|
||||||
|
.gradle/
|
||||||
|
.externalNativeBuild/
|
||||||
|
.DS_Store
|
||||||
|
*.dm
|
||||||
|
*.log
|
||||||
3
.idea/.gitignore
generated
vendored
@@ -1,3 +0,0 @@
|
|||||||
# Default ignored files
|
|
||||||
/shelf/
|
|
||||||
/workspace.xml
|
|
||||||
2
.idea/.name
generated
@@ -1 +1 @@
|
|||||||
秘地
|
羽声语音
|
||||||
6
.idea/AndroidProjectSystem.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="AndroidProjectSystem">
|
||||||
|
<option name="providerId" value="com.android.tools.idea.GradleProjectSystem" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
6
.idea/compiler.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="CompilerConfiguration">
|
||||||
|
<bytecodeTargetLevel target="17" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
18
.idea/deploymentTargetSelector.xml
generated
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="deploymentTargetSelector">
|
||||||
|
<selectionStates>
|
||||||
|
<SelectionState runConfigName="app">
|
||||||
|
<option name="selectionMode" value="DROPDOWN" />
|
||||||
|
<DropdownSelection timestamp="2025-11-06T06:22:54.522558600Z">
|
||||||
|
<Target type="DEFAULT_BOOT">
|
||||||
|
<handle>
|
||||||
|
<DeviceId pluginId="Default" identifier="serial=emulator-5554;connection=1b58820a" />
|
||||||
|
</handle>
|
||||||
|
</Target>
|
||||||
|
</DropdownSelection>
|
||||||
|
<DialogSelection />
|
||||||
|
</SelectionState>
|
||||||
|
</selectionStates>
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
33
.idea/gradle.xml
generated
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="GradleMigrationSettings" migrationVersion="1" />
|
||||||
|
<component name="GradleSettings">
|
||||||
|
<option name="linkedExternalProjectsSettings">
|
||||||
|
<GradleProjectSettings>
|
||||||
|
<option name="testRunner" value="CHOOSE_PER_TEST" />
|
||||||
|
<option name="externalProjectPath" value="$PROJECT_DIR$/yusheng-android" />
|
||||||
|
<option name="gradleJvm" value="#JAVA_HOME" />
|
||||||
|
<option name="modules">
|
||||||
|
<set>
|
||||||
|
<option value="$PROJECT_DIR$/yusheng-android" />
|
||||||
|
<option value="$PROJECT_DIR$/yusheng-android/Loadinglibrary" />
|
||||||
|
<option value="$PROJECT_DIR$/yusheng-android/app" />
|
||||||
|
<option value="$PROJECT_DIR$/yusheng-android/moduleLogin" />
|
||||||
|
<option value="$PROJECT_DIR$/yusheng-android/moduleUtil" />
|
||||||
|
<option value="$PROJECT_DIR$/yusheng-android/modulecircle" />
|
||||||
|
<option value="$PROJECT_DIR$/yusheng-android/modulemain" />
|
||||||
|
<option value="$PROJECT_DIR$/yusheng-android/modulenews" />
|
||||||
|
<option value="$PROJECT_DIR$/yusheng-android/moduleroom" />
|
||||||
|
<option value="$PROJECT_DIR$/yusheng-android/moduletablayout" />
|
||||||
|
<option value="$PROJECT_DIR$/yusheng-android/modulevocal" />
|
||||||
|
<option value="$PROJECT_DIR$/yusheng-android/modulevoice" />
|
||||||
|
<option value="$PROJECT_DIR$/yusheng-android/timcommon" />
|
||||||
|
<option value="$PROJECT_DIR$/yusheng-android/tuichat" />
|
||||||
|
<option value="$PROJECT_DIR$/yusheng-android/tuiconversation" />
|
||||||
|
<option value="$PROJECT_DIR$/yusheng-android/tuicore" />
|
||||||
|
</set>
|
||||||
|
</option>
|
||||||
|
</GradleProjectSettings>
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
9
.idea/misc.xml
generated
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<project version="4">
|
||||||
|
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||||
|
<component name="FrameworkDetectionExcludesConfiguration">
|
||||||
|
<file type="web" url="file://$PROJECT_DIR$/yusheng-android" />
|
||||||
|
</component>
|
||||||
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="ms-17" project-jdk-type="JavaSDK">
|
||||||
|
<output url="file://$PROJECT_DIR$/out" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
17
.idea/runConfigurations.xml
generated
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="RunConfigurationProducerService">
|
||||||
|
<option name="ignoredProducers">
|
||||||
|
<set>
|
||||||
|
<option value="com.intellij.execution.junit.AbstractAllInDirectoryConfigurationProducer" />
|
||||||
|
<option value="com.intellij.execution.junit.AllInPackageConfigurationProducer" />
|
||||||
|
<option value="com.intellij.execution.junit.PatternConfigurationProducer" />
|
||||||
|
<option value="com.intellij.execution.junit.TestInClassConfigurationProducer" />
|
||||||
|
<option value="com.intellij.execution.junit.UniqueIdConfigurationProducer" />
|
||||||
|
<option value="com.intellij.execution.junit.testDiscovery.JUnitTestDiscoveryConfigurationProducer" />
|
||||||
|
<option value="org.jetbrains.kotlin.idea.junit.KotlinJUnitRunConfigurationProducer" />
|
||||||
|
<option value="org.jetbrains.kotlin.idea.junit.KotlinPatternConfigurationProducer" />
|
||||||
|
</set>
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
6
.idea/vcs.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="$PROJECT_DIR$/yusheng-android" vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
@@ -1,45 +0,0 @@
|
|||||||
<component name="ProjectRunConfigurationManager">
|
|
||||||
<configuration default="false" name="app" type="AndroidRunConfigurationType" factoryName="Android App" activateToolWindowBeforeRun="false">
|
|
||||||
<module name="羽声.app" />
|
|
||||||
<option name="ANDROID_RUN_CONFIGURATION_SCHEMA_VERSION" value="1" />
|
|
||||||
<option name="DEPLOY" value="true" />
|
|
||||||
<option name="DEPLOY_APK_FROM_BUNDLE" value="true" />
|
|
||||||
<option name="DEPLOY_AS_INSTANT" value="false" />
|
|
||||||
<option name="ARTIFACT_NAME" value="" />
|
|
||||||
<option name="PM_INSTALL_OPTIONS" value="" />
|
|
||||||
<option name="ALL_USERS" value="false" />
|
|
||||||
<option name="ALWAYS_INSTALL_WITH_PM" value="false" />
|
|
||||||
<option name="ALLOW_ASSUME_VERIFIED" value="false" />
|
|
||||||
<option name="CLEAR_APP_STORAGE" value="false" />
|
|
||||||
<option name="DYNAMIC_FEATURES_DISABLED_LIST" value="" />
|
|
||||||
<option name="ACTIVITY_EXTRA_FLAGS" value="" />
|
|
||||||
<option name="MODE" value="default_activity" />
|
|
||||||
<option name="RESTORE_ENABLED" value="false" />
|
|
||||||
<option name="RESTORE_FILE" value="" />
|
|
||||||
<option name="RESTORE_FRESH_INSTALL_ONLY" value="true" />
|
|
||||||
<option name="CLEAR_LOGCAT" value="true" />
|
|
||||||
<option name="SHOW_LOGCAT_AUTOMATICALLY" value="true" />
|
|
||||||
<option name="TARGET_SELECTION_MODE" value="DEVICE_AND_SNAPSHOT_COMBO_BOX" />
|
|
||||||
<option name="DEBUGGER_TYPE" value="Java" />
|
|
||||||
<Java>
|
|
||||||
<option name="ATTACH_ON_WAIT_FOR_DEBUGGER" value="false" />
|
|
||||||
<option name="DEBUG_SANDBOX_SDK" value="false" />
|
|
||||||
</Java>
|
|
||||||
<Profilers>
|
|
||||||
<option name="ADVANCED_PROFILING_ENABLED" value="false" />
|
|
||||||
<option name="STARTUP_PROFILING_ENABLED" value="false" />
|
|
||||||
<option name="STARTUP_CPU_PROFILING_ENABLED" value="false" />
|
|
||||||
<option name="STARTUP_CPU_PROFILING_CONFIGURATION_NAME" value="Java/Kotlin Method Sample (legacy)" />
|
|
||||||
<option name="STARTUP_NATIVE_MEMORY_PROFILING_ENABLED" value="false" />
|
|
||||||
<option name="NATIVE_MEMORY_SAMPLE_RATE_BYTES" value="2048" />
|
|
||||||
</Profilers>
|
|
||||||
<option name="DEEP_LINK" value="" />
|
|
||||||
<option name="ACTIVITY" value="" />
|
|
||||||
<option name="ACTIVITY_CLASS" value="" />
|
|
||||||
<option name="SEARCH_ACTIVITY_IN_GLOBAL_SCOPE" value="false" />
|
|
||||||
<option name="SKIP_ACTIVITY_VALIDATION" value="false" />
|
|
||||||
<method v="2">
|
|
||||||
<option name="Android.Gradle.BeforeRunTask" enabled="true" />
|
|
||||||
</method>
|
|
||||||
</configuration>
|
|
||||||
</component>
|
|
||||||
37
app/releas/releas/release/output-metadata.json
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
{
|
||||||
|
"version": 3,
|
||||||
|
"artifactType": {
|
||||||
|
"type": "APK",
|
||||||
|
"kind": "Directory"
|
||||||
|
},
|
||||||
|
"applicationId": "com.qxcm.qxlive",
|
||||||
|
"variantName": "releasRelease",
|
||||||
|
"elements": [
|
||||||
|
{
|
||||||
|
"type": "SINGLE",
|
||||||
|
"filters": [],
|
||||||
|
"attributes": [],
|
||||||
|
"versionCode": 52,
|
||||||
|
"versionName": "1.0.6.2",
|
||||||
|
"outputFile": "羽声_1.0.6.2_52.apk"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"elementType": "File",
|
||||||
|
"baselineProfiles": [
|
||||||
|
{
|
||||||
|
"minApi": 28,
|
||||||
|
"maxApi": 30,
|
||||||
|
"baselineProfiles": [
|
||||||
|
"baselineProfiles/1/羽声_1.0.6.2_52.dm"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"minApi": 31,
|
||||||
|
"maxApi": 2147483647,
|
||||||
|
"baselineProfiles": [
|
||||||
|
"baselineProfiles/0/羽声_1.0.6.2_52.dm"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"minSdkVersionForDexing": 24
|
||||||
|
}
|
||||||
@@ -11,9 +11,9 @@
|
|||||||
"type": "SINGLE",
|
"type": "SINGLE",
|
||||||
"filters": [],
|
"filters": [],
|
||||||
"attributes": [],
|
"attributes": [],
|
||||||
"versionCode": 43,
|
"versionCode": 51,
|
||||||
"versionName": "1.0.5.3",
|
"versionName": "1.0.6.1",
|
||||||
"outputFile": "羽声_1.0.5.3_43.apk"
|
"outputFile": "羽声_1.0.6.1_51.apk"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"elementType": "File",
|
"elementType": "File",
|
||||||
@@ -22,14 +22,14 @@
|
|||||||
"minApi": 28,
|
"minApi": 28,
|
||||||
"maxApi": 30,
|
"maxApi": 30,
|
||||||
"baselineProfiles": [
|
"baselineProfiles": [
|
||||||
"baselineProfiles/1/羽声_1.0.5.3_43.dm"
|
"baselineProfiles/1/羽声_1.0.6.1_51.dm"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"minApi": 31,
|
"minApi": 31,
|
||||||
"maxApi": 2147483647,
|
"maxApi": 2147483647,
|
||||||
"baselineProfiles": [
|
"baselineProfiles": [
|
||||||
"baselineProfiles/0/羽声_1.0.5.3_43.dm"
|
"baselineProfiles/0/羽声_1.0.6.1_51.dm"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -406,7 +406,7 @@ public class PasswordLoginActivity extends BaseMvpActivity<LoginPresenter, Activ
|
|||||||
.setPrivacyTextSize(11)
|
.setPrivacyTextSize(11)
|
||||||
.setPrivacyAlertContentVerticalMargin(20)
|
.setPrivacyAlertContentVerticalMargin(20)
|
||||||
.setPrivacyMargin(39)
|
.setPrivacyMargin(39)
|
||||||
.setPrivacyState(true)
|
.setPrivacyState(false)
|
||||||
.setCheckboxHidden(false)
|
.setCheckboxHidden(false)
|
||||||
.setCheckedImgPath("ic_agreement_selected")
|
.setCheckedImgPath("ic_agreement_selected")
|
||||||
.setUncheckedImgPath("ic_agreement_unselect")
|
.setUncheckedImgPath("ic_agreement_unselect")
|
||||||
@@ -485,20 +485,20 @@ public class PasswordLoginActivity extends BaseMvpActivity<LoginPresenter, Activ
|
|||||||
}
|
}
|
||||||
String phone = mBinding.edPhone.getText().toString().trim();
|
String phone = mBinding.edPhone.getText().toString().trim();
|
||||||
if (TextUtils.isEmpty(phone)) {
|
if (TextUtils.isEmpty(phone)) {
|
||||||
com.blankj.utilcode.util.ToastUtils.showShort("请输入手机号");
|
ToastUtils.show("请输入手机号");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (type==1) {
|
if (type==1) {
|
||||||
String code = mBinding.edPassword.getText().toString().trim();
|
String code = mBinding.edPassword.getText().toString().trim();
|
||||||
if (TextUtils.isEmpty(code)) {
|
if (TextUtils.isEmpty(code)) {
|
||||||
com.blankj.utilcode.util.ToastUtils.showShort("请输入验证码");
|
ToastUtils.show("请输入验证码");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
MvpPre.login(phone, "", code, 1);
|
MvpPre.login(phone, "", code, 1);
|
||||||
}else if (type==2) {
|
}else if (type==2) {
|
||||||
String password = mBinding.edPasswordCode.getText().toString().trim();
|
String password = mBinding.edPasswordCode.getText().toString().trim();
|
||||||
if (TextUtils.isEmpty(password)) {
|
if (TextUtils.isEmpty(password)) {
|
||||||
com.blankj.utilcode.util.ToastUtils.showShort("请输入密码");
|
ToastUtils.show("请输入密码");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
MvpPre.login(phone, password, "", 2);
|
MvpPre.login(phone, password, "", 2);
|
||||||
@@ -525,10 +525,10 @@ public class PasswordLoginActivity extends BaseMvpActivity<LoginPresenter, Activ
|
|||||||
} else if (id == R.id.tv_send_code) {
|
} else if (id == R.id.tv_send_code) {
|
||||||
String phone = mBinding.edPhone.getText().toString().trim();
|
String phone = mBinding.edPhone.getText().toString().trim();
|
||||||
if (TextUtils.isEmpty(phone)) {
|
if (TextUtils.isEmpty(phone)) {
|
||||||
com.blankj.utilcode.util.ToastUtils.showShort("请输入手机号");
|
ToastUtils.show("请输入手机号");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
sendCodeSuccess(phone);
|
|
||||||
MvpPre.sendCode(phone, 1);
|
MvpPre.sendCode(phone, 1);
|
||||||
}else if (id == R.id.iv_eye) {
|
}else if (id == R.id.iv_eye) {
|
||||||
|
|
||||||
@@ -575,7 +575,7 @@ public class PasswordLoginActivity extends BaseMvpActivity<LoginPresenter, Activ
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void sendCodeSuccess(String phoneNumber) {
|
public void sendCodeSuccess() {
|
||||||
com.blankj.utilcode.util.ToastUtils.showShort("短信验证码发送成功请注意查收");
|
com.blankj.utilcode.util.ToastUtils.showShort("短信验证码发送成功请注意查收");
|
||||||
mBinding.tvSendCode.setEnabled(false);
|
mBinding.tvSendCode.setEnabled(false);
|
||||||
mBinding.tvSendCode.setAlpha(0.5f);
|
mBinding.tvSendCode.setAlpha(0.5f);
|
||||||
@@ -604,6 +604,7 @@ public class PasswordLoginActivity extends BaseMvpActivity<LoginPresenter, Activ
|
|||||||
@Override
|
@Override
|
||||||
public void sendCodeSuccess1(String s) {
|
public void sendCodeSuccess1(String s) {
|
||||||
LogUtils.e(s);
|
LogUtils.e(s);
|
||||||
|
sendCodeSuccess();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -28,8 +28,8 @@ isBuildModule=false
|
|||||||
#org.gradle.deamon=false
|
#org.gradle.deamon=false
|
||||||
android.injected.testOnly=false
|
android.injected.testOnly=false
|
||||||
|
|
||||||
APP_VERSION_NAME=1.0.5.3
|
APP_VERSION_NAME=1.0.6.2
|
||||||
APP_VERSION_CODE=43
|
APP_VERSION_CODE=52
|
||||||
|
|
||||||
org.gradle.jvm.toolchain.useLegacyAdapters=false
|
org.gradle.jvm.toolchain.useLegacyAdapters=false
|
||||||
#org.gradle.java.home=C\:\\Users\\qx\\.jdks\\ms-17.0.15
|
#org.gradle.java.home=C\:\\Users\\qx\\.jdks\\ms-17.0.15
|
||||||
|
|||||||
@@ -3,15 +3,9 @@ agp = "8.4.0"
|
|||||||
alipayAlipaysdkAndroid = "15.8.33"
|
alipayAlipaysdkAndroid = "15.8.33"
|
||||||
arouterApiVersion = "1.5.2"
|
arouterApiVersion = "1.5.2"
|
||||||
comJacktuotuoCustomviewVerificationcodeview2 = "1.0.5"
|
comJacktuotuoCustomviewVerificationcodeview2 = "1.0.5"
|
||||||
comLiulishuoOkdownloadOkdownload4 = "1.0.7"
|
|
||||||
comLiulishuoOkdownloadSqlite3 = "1.0.7"
|
|
||||||
comLiulishuoOkdownloadOkhttp3 = "1.0.7"
|
|
||||||
comLiulishuoOkdownloadFiledownloader3 = "1.0.7"
|
|
||||||
custompopwindow = "2.1.1"
|
|
||||||
databindingRuntimeVersion = "7.0.2"
|
databindingRuntimeVersion = "7.0.2"
|
||||||
easypermissions = "3.0.0"
|
easypermissions = "3.0.0"
|
||||||
easyProtectorRelease = "1.1.2"
|
easyProtectorRelease = "1.1.2"
|
||||||
egameAnimplayer = "2.0.8"
|
|
||||||
flexboxVersion = "1.0.0"
|
flexboxVersion = "1.0.0"
|
||||||
githubBannerviewpagerVersion = "3.5.12"
|
githubBannerviewpagerVersion = "3.5.12"
|
||||||
githubGlide = "4.12.0"
|
githubGlide = "4.12.0"
|
||||||
@@ -20,28 +14,23 @@ githubPhotoview = "2.3.0"
|
|||||||
githubRealtimeblurviewVersion = "1.2.1"
|
githubRealtimeblurviewVersion = "1.2.1"
|
||||||
githubShadowlayout = "3.3.1"
|
githubShadowlayout = "3.3.1"
|
||||||
gradle = "8.8.0"
|
gradle = "8.8.0"
|
||||||
#gradle = "8.5.0-alpha04"
|
|
||||||
greendaoGradlePlugin = "3.3.0"
|
greendaoGradlePlugin = "3.3.0"
|
||||||
junit = "4.13.2"
|
junit = "4.13.2"
|
||||||
junitVersion = "1.1.5"
|
junitVersion = "1.1.5"
|
||||||
espressoCore = "3.5.1"
|
espressoCore = "3.5.1"
|
||||||
appcompat = "1.6.1"
|
appcompat = "1.6.1"
|
||||||
libraryVersion = "1.4"
|
|
||||||
lombok = "1.18.32"
|
lombok = "1.18.32"
|
||||||
marqueeview = "1.1.0"
|
marqueeview = "1.1.0"
|
||||||
material = "1.10.0"
|
material = "1.10.0"
|
||||||
activity = "1.8.0"
|
activity = "1.8.0"
|
||||||
constraintlayout = "2.1.4"
|
constraintlayout = "2.1.4"
|
||||||
arouter = "1.0.2"
|
|
||||||
|
|
||||||
arouterAnnotation = "1.0.6"
|
arouterAnnotation = "1.0.6"
|
||||||
arouterCompiler = "1.5.2"
|
arouterCompiler = "1.5.2"
|
||||||
arouterApi = "1.5.2"
|
|
||||||
comSquareupRetrofit2Retrofit3 = "2.9.0"
|
comSquareupRetrofit2Retrofit3 = "2.9.0"
|
||||||
fastjson = "1.2.60"
|
fastjson = "1.2.60"
|
||||||
githubBaserecyclerviewadapterhelper = "2.9.30"
|
githubBaserecyclerviewadapterhelper = "2.9.30"
|
||||||
gsonVersion = "2.10.1"
|
gsonVersion = "2.10.1"
|
||||||
eventbusAnnotationProcessorVersion = "3.3.1"
|
|
||||||
eventbusVersion = "3.3.1"
|
eventbusVersion = "3.3.1"
|
||||||
logger = "2.2.0"
|
logger = "2.2.0"
|
||||||
loggingInterceptorVersion = "3.10.0"
|
loggingInterceptorVersion = "3.10.0"
|
||||||
@@ -49,35 +38,24 @@ multidex = "2.0.1"
|
|||||||
ossAndroidSdkVersion = "2.9.21"
|
ossAndroidSdkVersion = "2.9.21"
|
||||||
permissionx = "1.7.1"
|
permissionx = "1.7.1"
|
||||||
persistentcookiejar = "v1.0.1"
|
persistentcookiejar = "v1.0.1"
|
||||||
picture_libraryVersion = "v2.6.0"
|
|
||||||
reactivexRxjava = "2.2.21"
|
reactivexRxjava = "2.2.21"
|
||||||
retrofit2KotlinCoroutinesAdapterVersion = "0.9.2"
|
retrofit2KotlinCoroutinesAdapterVersion = "0.9.2"
|
||||||
roundedimageview = "2.3.0"
|
roundedimageview = "2.3.0"
|
||||||
rxandroid = "2.1.1"
|
rxandroid = "2.1.1"
|
||||||
scwangSmartrefreshlayout = "1.1.0-alpha-20"
|
scwangSmartrefreshlayout = "1.1.0-alpha-20"
|
||||||
scwangSmartrefreshheader = "1.1.0-alpha-20"
|
scwangSmartrefreshheader = "1.1.0-alpha-20"
|
||||||
singledateandtimepicker = "2.2.7"
|
|
||||||
svgaplayerAndroid = "2.5.13"
|
svgaplayerAndroid = "2.5.13"
|
||||||
toastVersion = "8.2"
|
toastVersion = "8.2"
|
||||||
togglebuttonLibraryVersion = "1.0.0"
|
togglebuttonLibraryVersion = "1.0.0"
|
||||||
utilcode = "1.30.6"
|
utilcode = "1.30.6"
|
||||||
databindingRuntime = "8.8.0"
|
|
||||||
datastoreCoreAndroid = "1.1.5"
|
|
||||||
kotlin = "2.0.0"
|
|
||||||
lifecycleRuntimeKtx = "2.6.1"
|
|
||||||
activityCompose = "1.8.0"
|
|
||||||
composeBom = "2024.04.01"
|
|
||||||
kotlinVersion = "1.9.24"
|
kotlinVersion = "1.9.24"
|
||||||
coreKtx = "1.10.1"
|
coreKtx = "1.10.1"
|
||||||
lifecycleLivedataKtx = "2.6.1"
|
lifecycleLivedataKtx = "2.6.1"
|
||||||
lifecycleViewmodelKtx = "2.6.1"
|
lifecycleViewmodelKtx = "2.6.1"
|
||||||
webpdecoder = "1.6.4.9.0"
|
|
||||||
wechatSdkAndroid = "6.8.30"
|
wechatSdkAndroid = "6.8.30"
|
||||||
xbanner = "1.7.0"
|
xbanner = "1.7.0"
|
||||||
appcompatVersion = "1.3.1"
|
|
||||||
legacySupportV4 = "1.0.0"
|
legacySupportV4 = "1.0.0"
|
||||||
fragmentKtx = "1.5.6"
|
fragmentKtx = "1.5.6"
|
||||||
cosAndroidLite = "5.9.46"
|
|
||||||
interpolator = "1.0.0"
|
interpolator = "1.0.0"
|
||||||
|
|
||||||
[libraries]
|
[libraries]
|
||||||
@@ -89,11 +67,6 @@ com-github-bumptech-glide-glide = { module = "com.github.bumptech.glide:glide",
|
|||||||
com-github-mmin18-realtimeblurview = { module = "com.github.mmin18:realtimeblurview", version.ref = "githubRealtimeblurviewVersion" }
|
com-github-mmin18-realtimeblurview = { module = "com.github.mmin18:realtimeblurview", version.ref = "githubRealtimeblurviewVersion" }
|
||||||
com-github-zhpanvip-bannerviewpager = { module = "com.github.zhpanvip:bannerviewpager", version.ref = "githubBannerviewpagerVersion" }
|
com-github-zhpanvip-bannerviewpager = { module = "com.github.zhpanvip:bannerviewpager", version.ref = "githubBannerviewpagerVersion" }
|
||||||
com-jacktuotuo-customview-verificationcodeview3 = { module = "com.jacktuotuo.customview:verificationcodeview", version.ref = "comJacktuotuoCustomviewVerificationcodeview2" }
|
com-jacktuotuo-customview-verificationcodeview3 = { module = "com.jacktuotuo.customview:verificationcodeview", version.ref = "comJacktuotuoCustomviewVerificationcodeview2" }
|
||||||
#com-liulishuo-okdownload-filedownloader4 = { module = "com.liulishuo.okdownload:filedownloader", version.ref = "comLiulishuoOkdownloadFiledownloader3" }
|
|
||||||
#com-liulishuo-okdownload-okhttp4 = { module = "com.liulishuo.okdownload:okhttp", version.ref = "comLiulishuoOkdownloadOkhttp3" }
|
|
||||||
#com-liulishuo-okdownload-sqlite4 = { module = "com.liulishuo.okdownload:sqlite", version.ref = "comLiulishuoOkdownloadSqlite3" }
|
|
||||||
#com-liulishuo-okdownload-okdownload6 = { module = "com.liulishuo.okdownload:okdownload", version.ref = "comLiulishuoOkdownloadOkdownload4" }
|
|
||||||
#custompopwindow = { module = "com.github.pinguo-zhouwei:CustomPopwindow", version.ref = "custompopwindow" }
|
|
||||||
databinding-runtime-v702 = { module = "androidx.databinding:databinding-runtime", version.ref = "databindingRuntimeVersion" }
|
databinding-runtime-v702 = { module = "androidx.databinding:databinding-runtime", version.ref = "databindingRuntimeVersion" }
|
||||||
dpa-oss-android-sdk = { module = "com.aliyun.dpa:oss-android-sdk", version.ref = "ossAndroidSdkVersion" }
|
dpa-oss-android-sdk = { module = "com.aliyun.dpa:oss-android-sdk", version.ref = "ossAndroidSdkVersion" }
|
||||||
easy-protector-release = { module = "com.lahm.library:easy-protector-release", version.ref = "easyProtectorRelease" }
|
easy-protector-release = { module = "com.lahm.library:easy-protector-release", version.ref = "easyProtectorRelease" }
|
||||||
@@ -101,7 +74,6 @@ easypermissions = { module = "pub.devrel:easypermissions", version.ref = "easype
|
|||||||
#egame-animplayer = { module = "com.egame.vap:animplayer", version.ref = "egameAnimplayer" }
|
#egame-animplayer = { module = "com.egame.vap:animplayer", version.ref = "egameAnimplayer" }
|
||||||
github-photoview = { module = "com.github.chrisbanes:PhotoView", version.ref = "githubPhotoview" }
|
github-photoview = { module = "com.github.chrisbanes:PhotoView", version.ref = "githubPhotoview" }
|
||||||
github-shadowlayout = { module = "com.github.lihangleo2:ShadowLayout", version.ref = "githubShadowlayout" }
|
github-shadowlayout = { module = "com.github.lihangleo2:ShadowLayout", version.ref = "githubShadowlayout" }
|
||||||
#glide-compiler = { module = "com.github.bumptech.glide:compiler", version.ref = "githubGlide" }
|
|
||||||
gradle = { module = "com.android.tools.build:gradle", version.ref = "gradle" }
|
gradle = { module = "com.android.tools.build:gradle", version.ref = "gradle" }
|
||||||
greendao-gradle-plugin = { module = "org.greenrobot:greendao-gradle-plugin", version.ref = "greendaoGradlePlugin" }
|
greendao-gradle-plugin = { module = "org.greenrobot:greendao-gradle-plugin", version.ref = "greendaoGradlePlugin" }
|
||||||
junit = { group = "junit", name = "junit", version.ref = "junit" }
|
junit = { group = "junit", name = "junit", version.ref = "junit" }
|
||||||
@@ -124,43 +96,25 @@ github-baserecyclerviewadapterhelper = { module = "com.github.CymChad:BaseRecycl
|
|||||||
hjq-toast = { module = "com.hjq:toast", version.ref = "toastVersion" }
|
hjq-toast = { module = "com.hjq:toast", version.ref = "toastVersion" }
|
||||||
jakewharton-retrofit2-kotlin-coroutines-adapter = { module = "com.jakewharton.retrofit:retrofit2-kotlin-coroutines-adapter", version.ref = "retrofit2KotlinCoroutinesAdapterVersion" }
|
jakewharton-retrofit2-kotlin-coroutines-adapter = { module = "com.jakewharton.retrofit:retrofit2-kotlin-coroutines-adapter", version.ref = "retrofit2KotlinCoroutinesAdapterVersion" }
|
||||||
greenrobot-eventbus = { module = "org.greenrobot:eventbus", version.ref = "eventbusVersion" }
|
greenrobot-eventbus = { module = "org.greenrobot:eventbus", version.ref = "eventbusVersion" }
|
||||||
#greenrobot-eventbus-annotation-processor = { module = "org.greenrobot:eventbus-annotation-processor", version.ref = "eventbusAnnotationProcessorVersion" }
|
|
||||||
google-gson = { module = "com.google.code.gson:gson", version.ref = "gsonVersion" }
|
google-gson = { module = "com.google.code.gson:gson", version.ref = "gsonVersion" }
|
||||||
logger = { module = "com.orhanobut:logger", version.ref = "logger" }
|
logger = { module = "com.orhanobut:logger", version.ref = "logger" }
|
||||||
multidex = { module = "androidx.multidex:multidex", version.ref = "multidex" }
|
multidex = { module = "androidx.multidex:multidex", version.ref = "multidex" }
|
||||||
#numberprogressbar-library = { module = "com.daimajia.numberprogressbar:library", version.ref = "libraryVersion" }
|
|
||||||
okhttp3-logging-interceptor = { module = "com.squareup.okhttp3:logging-interceptor", version.ref = "loggingInterceptorVersion" }
|
okhttp3-logging-interceptor = { module = "com.squareup.okhttp3:logging-interceptor", version.ref = "loggingInterceptorVersion" }
|
||||||
permissionx = { module = "com.guolindev.permissionx:permissionx", version.ref = "permissionx" }
|
permissionx = { module = "com.guolindev.permissionx:permissionx", version.ref = "permissionx" }
|
||||||
persistentcookiejar = { module = "com.github.franmontiel:PersistentCookieJar", version.ref = "persistentcookiejar" }
|
persistentcookiejar = { module = "com.github.franmontiel:PersistentCookieJar", version.ref = "persistentcookiejar" }
|
||||||
#pictureselector-picture_library = { module = "com.github.LuckSiege.PictureSelector:picture_library", version.ref = "picture_libraryVersion" }
|
|
||||||
reactivex-rxjava = { module = "io.reactivex.rxjava2:rxjava", version.ref = "reactivexRxjava" }
|
reactivex-rxjava = { module = "io.reactivex.rxjava2:rxjava", version.ref = "reactivexRxjava" }
|
||||||
roundedimageview = { module = "com.makeramen:roundedimageview", version.ref = "roundedimageview" }
|
roundedimageview = { module = "com.makeramen:roundedimageview", version.ref = "roundedimageview" }
|
||||||
rxandroid = { module = "io.reactivex.rxjava2:rxandroid", version.ref = "rxandroid" }
|
rxandroid = { module = "io.reactivex.rxjava2:rxandroid", version.ref = "rxandroid" }
|
||||||
#singledateandtimepicker = { module = "com.github.florent37:singledateandtimepicker", version.ref = "singledateandtimepicker" }
|
|
||||||
squareup-converter-gson = { module = "com.squareup.retrofit2:converter-gson", version.ref = "comSquareupRetrofit2Retrofit3" }
|
squareup-converter-gson = { module = "com.squareup.retrofit2:converter-gson", version.ref = "comSquareupRetrofit2Retrofit3" }
|
||||||
retrofit2-adapter-rxjava2 = { module = "com.squareup.retrofit2:adapter-rxjava2", version.ref = "comSquareupRetrofit2Retrofit3" }
|
retrofit2-adapter-rxjava2 = { module = "com.squareup.retrofit2:adapter-rxjava2", version.ref = "comSquareupRetrofit2Retrofit3" }
|
||||||
svgaplayer-android = { module = "com.github.yyued:SVGAPlayer-Android", version.ref = "svgaplayerAndroid" }
|
svgaplayer-android = { module = "com.github.yyued:SVGAPlayer-Android", version.ref = "svgaplayerAndroid" }
|
||||||
utilcode = { module = "com.blankj:utilcode", version.ref = "utilcode" }
|
utilcode = { module = "com.blankj:utilcode", version.ref = "utilcode" }
|
||||||
#databinding-runtime = { group = "androidx.databinding", name = "databinding-runtime", version.ref = "databindingRuntime" }
|
|
||||||
#datastore-core-android = { group = "androidx.datastore", name = "datastore-core-android", version.ref = "datastoreCoreAndroid" }
|
|
||||||
#lifecycle-runtime-ktx = { group = "androidx.lifecycle", name = "lifecycle-runtime-ktx", version.ref = "lifecycleRuntimeKtx" }
|
|
||||||
#activity-compose = { group = "androidx.activity", name = "activity-compose", version.ref = "activityCompose" }
|
|
||||||
#compose-bom = { group = "androidx.compose", name = "compose-bom", version.ref = "composeBom" }
|
|
||||||
#ui = { group = "androidx.compose.ui", name = "ui" }
|
|
||||||
#ui-graphics = { group = "androidx.compose.ui", name = "ui-graphics" }
|
|
||||||
#ui-tooling = { group = "androidx.compose.ui", name = "ui-tooling" }
|
|
||||||
#ui-tooling-preview = { group = "androidx.compose.ui", name = "ui-tooling-preview" }
|
|
||||||
#ui-test-manifest = { group = "androidx.compose.ui", name = "ui-test-manifest" }
|
|
||||||
#ui-test-junit4 = { group = "androidx.compose.ui", name = "ui-test-junit4" }
|
|
||||||
#material3 = { group = "androidx.compose.material3", name = "material3" }
|
|
||||||
core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
|
core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
|
||||||
lifecycle-livedata-ktx = { group = "androidx.lifecycle", name = "lifecycle-livedata-ktx", version.ref = "lifecycleLivedataKtx" }
|
lifecycle-livedata-ktx = { group = "androidx.lifecycle", name = "lifecycle-livedata-ktx", version.ref = "lifecycleLivedataKtx" }
|
||||||
lifecycle-viewmodel-ktx = { group = "androidx.lifecycle", name = "lifecycle-viewmodel-ktx", version.ref = "lifecycleViewmodelKtx" }
|
lifecycle-viewmodel-ktx = { group = "androidx.lifecycle", name = "lifecycle-viewmodel-ktx", version.ref = "lifecycleViewmodelKtx" }
|
||||||
#webpdecoder = { module = "com.zlc.glide:webpdecoder", version.ref = "webpdecoder" }
|
|
||||||
wechat-sdk-android = { module = "com.tencent.mm.opensdk:wechat-sdk-android", version.ref = "wechatSdkAndroid" }
|
wechat-sdk-android = { module = "com.tencent.mm.opensdk:wechat-sdk-android", version.ref = "wechatSdkAndroid" }
|
||||||
xbanner = { module = "com.github.xiaohaibin:XBanner", version.ref = "xbanner" }
|
xbanner = { module = "com.github.xiaohaibin:XBanner", version.ref = "xbanner" }
|
||||||
zcw-togglebutton-library = { module = "com.zcw:togglebutton-library", version.ref = "togglebuttonLibraryVersion" }
|
zcw-togglebutton-library = { module = "com.zcw:togglebutton-library", version.ref = "togglebuttonLibraryVersion" }
|
||||||
androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompatVersion" }
|
|
||||||
androidx-legacy-support-v4 = { group = "androidx.legacy", name = "legacy-support-v4", version.ref = "legacySupportV4" }
|
androidx-legacy-support-v4 = { group = "androidx.legacy", name = "legacy-support-v4", version.ref = "legacySupportV4" }
|
||||||
androidx-fragment-ktx = { group = "androidx.fragment", name = "fragment-ktx", version.ref = "fragmentKtx" }
|
androidx-fragment-ktx = { group = "androidx.fragment", name = "fragment-ktx", version.ref = "fragmentKtx" }
|
||||||
androidx-interpolator = { group = "androidx.interpolator", name = "interpolator", version.ref = "interpolator" }
|
androidx-interpolator = { group = "androidx.interpolator", name = "interpolator", version.ref = "interpolator" }
|
||||||
|
|||||||
@@ -18,11 +18,7 @@ import com.xscm.modulelogin.present.ImproveInfoPresenter;
|
|||||||
import com.xscm.modulemain.activity.MainActivity;
|
import com.xscm.modulemain.activity.MainActivity;
|
||||||
import com.xscm.moduleutil.activity.BaseMvpActivity;
|
import com.xscm.moduleutil.activity.BaseMvpActivity;
|
||||||
import com.xscm.moduleutil.bean.UserBean;
|
import com.xscm.moduleutil.bean.UserBean;
|
||||||
import com.xscm.moduleutil.utils.DateSelectDialog;
|
import com.xscm.moduleutil.utils.*;
|
||||||
import com.xscm.moduleutil.utils.GlideEngine;
|
|
||||||
import com.xscm.moduleutil.utils.ImageLoader;
|
|
||||||
import com.xscm.moduleutil.utils.ImageUtils;
|
|
||||||
import com.xscm.moduleutil.utils.SpUtil;
|
|
||||||
import com.xscm.moduleutil.widget.Constants;
|
import com.xscm.moduleutil.widget.Constants;
|
||||||
|
|
||||||
|
|
||||||
@@ -201,6 +197,7 @@ public class ImproveInfoActivity extends BaseMvpActivity<ImproveInfoPresenter, A
|
|||||||
.setSelectorUIStyle(new PictureSelectorStyle())
|
.setSelectorUIStyle(new PictureSelectorStyle())
|
||||||
.isGif(false)
|
.isGif(false)
|
||||||
.setImageEngine(GlideEngine.createGlideEngine())
|
.setImageEngine(GlideEngine.createGlideEngine())
|
||||||
|
.setPermissionDescriptionListener(PermissionDescriptionHelper.createListener())
|
||||||
.setMaxSelectNum(1)
|
.setMaxSelectNum(1)
|
||||||
.isPreviewImage(true)
|
.isPreviewImage(true)
|
||||||
.isDisplayCamera(false)
|
.isDisplayCamera(false)
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tool="http://schemas.android.com/tools">
|
||||||
|
|
||||||
<data>
|
<data>
|
||||||
|
|
||||||
@@ -216,7 +217,7 @@
|
|||||||
android:background="@drawable/bg_r100_hui"
|
android:background="@drawable/bg_r100_hui"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:text="2001"
|
tool:text="2001"
|
||||||
android:textColor="@color/black"
|
android:textColor="@color/black"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
@@ -241,7 +242,7 @@
|
|||||||
android:background="@drawable/bg_r100_hui"
|
android:background="@drawable/bg_r100_hui"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:text="12"
|
tool:text="12"
|
||||||
android:textColor="@color/black"
|
android:textColor="@color/black"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
@@ -266,7 +267,7 @@
|
|||||||
android:background="@drawable/bg_r100_hui"
|
android:background="@drawable/bg_r100_hui"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:text="1"
|
tool:text="1"
|
||||||
android:textColor="@color/black"
|
android:textColor="@color/black"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
@@ -285,7 +286,29 @@
|
|||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="@dimen/dp_40"
|
||||||
|
android:layout_marginTop="@dimen/dp_24"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="邀请码"
|
||||||
|
android:textColor="#73000000"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text=" (非必填)"
|
||||||
|
android:textColor="#33000000"
|
||||||
|
android:textSize="12sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
|||||||
@@ -67,8 +67,6 @@ dependencies {
|
|||||||
implementation project(':moduletablayout')
|
implementation project(':moduletablayout')
|
||||||
implementation libs.activity
|
implementation libs.activity
|
||||||
implementation libs.constraintlayout
|
implementation libs.constraintlayout
|
||||||
implementation libs.androidx.appcompat
|
|
||||||
implementation libs.androidx.appcompat
|
|
||||||
testImplementation libs.junit
|
testImplementation libs.junit
|
||||||
androidTestImplementation libs.ext.junit
|
androidTestImplementation libs.ext.junit
|
||||||
androidTestImplementation libs.espresso.core
|
androidTestImplementation libs.espresso.core
|
||||||
@@ -169,14 +167,15 @@ dependencies {
|
|||||||
|
|
||||||
//播放器
|
//播放器
|
||||||
//腾讯直播sdk
|
//腾讯直播sdk
|
||||||
api('com.tencent.liteav:LiteAVSDK_Professional:10.9.0.13102')
|
// api('com.tencent.liteav:LiteAVSDK_Professional:10.9.0.13102')
|
||||||
api('com.google.android.exoplayer:exoplayer-core:2.19.1')
|
// api('com.google.android.exoplayer:exoplayer-core:2.19.1')
|
||||||
api('com.google.android.exoplayer:exoplayer-ui:2.19.1')
|
// api('com.google.android.exoplayer:exoplayer-ui:2.19.1')
|
||||||
api("com.egame.vap:animplayer:2.0.8")
|
api("com.egame.vap:animplayer:2.0.8")
|
||||||
api("com.liulishuo.okdownload:okdownload:1.0.7")
|
api("com.liulishuo.okdownload:okdownload:1.0.7")
|
||||||
|
|
||||||
api('com.zlc.glide:webpdecoder:1.6.4.9.0')
|
api('com.zlc.glide:webpdecoder:1.6.4.9.0')
|
||||||
api('com.jungly:gridPasswordView:0.3')
|
api('com.jungly:gridPasswordView:0.3')
|
||||||
|
// 带有气泡的提示框,目前没有使用,暂不使用,使用位置是在RoomTipsView
|
||||||
api('com.cpiz.bubbleview:bubbleview:1.0.2')
|
api('com.cpiz.bubbleview:bubbleview:1.0.2')
|
||||||
|
|
||||||
// 集成音频 SDK声网
|
// 集成音频 SDK声网
|
||||||
|
|||||||
@@ -220,85 +220,4 @@ public abstract class BaseMvpActivity<P extends IPresenter, VDB extends ViewData
|
|||||||
return resources;
|
return resources;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 显示全局飘屏消息(支持任意位置飘过)
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
// @Subscribe(threadMode = ThreadMode.MAIN)
|
|
||||||
// public void showPiaoPingMessage(MqttBean mqttBean) {
|
|
||||||
// WindowManager windowManager = (WindowManager) getSystemService(WINDOW_SERVICE);
|
|
||||||
// if (windowManager == null) return;
|
|
||||||
//
|
|
||||||
// int screenWidth = getResources().getDisplayMetrics().widthPixels;
|
|
||||||
// int screenHeight = getResources().getDisplayMetrics().heightPixels;
|
|
||||||
//
|
|
||||||
// WindowManager.LayoutParams layoutParams = new WindowManager.LayoutParams(
|
|
||||||
// WindowManager.LayoutParams.MATCH_PARENT,
|
|
||||||
// WindowManager.LayoutParams.WRAP_CONTENT,
|
|
||||||
// Build.VERSION.SDK_INT >= Build.VERSION_CODES.O ?
|
|
||||||
// WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY :
|
|
||||||
// WindowManager.LayoutParams.TYPE_SYSTEM_OVERLAY,
|
|
||||||
// WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE |
|
|
||||||
// WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN |
|
|
||||||
// WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED,
|
|
||||||
// PixelFormat.TRANSLUCENT);
|
|
||||||
//
|
|
||||||
// // 设置 Gravity 为左上角
|
|
||||||
// layoutParams.gravity = Gravity.TOP | Gravity.START;
|
|
||||||
//
|
|
||||||
// // Y 轴随机位置
|
|
||||||
//// layoutParams.y = (int) ((Math.random() * (screenHeight - 200)));
|
|
||||||
//
|
|
||||||
// // 初始 X 设为负值,确保 View 在屏幕左侧外
|
|
||||||
// layoutParams.x = -screenWidth;
|
|
||||||
//
|
|
||||||
// View piaoPingView = LayoutInflater.from(this).inflate(R.layout.item_piaoping, null);
|
|
||||||
// TextView textView = piaoPingView.findViewById(R.id.tv_name);
|
|
||||||
// TextView textView2 = piaoPingView.findViewById(R.id.tv_to_name);
|
|
||||||
// textView2.setText("送给"+mqttBean.getList().getToUserName());
|
|
||||||
// textView.setText(mqttBean.getList().getFromUserName());
|
|
||||||
// ImageUtils.loadHeadCC(mqttBean.getList().getGift_picture(), piaoPingView.findViewById(R.id.iv_piaoping));
|
|
||||||
// TextView tv_time = piaoPingView.findViewById(R.id.tv_num);
|
|
||||||
// tv_time.setText(mqttBean.getList().getNumber());
|
|
||||||
// windowManager.addView(piaoPingView, layoutParams);
|
|
||||||
//
|
|
||||||
// piaoPingView.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
|
|
||||||
// @Override
|
|
||||||
// public void onGlobalLayout() {
|
|
||||||
// piaoPingView.getViewTreeObserver().removeOnGlobalLayoutListener(this);
|
|
||||||
//
|
|
||||||
// // 设置锚点为左上角,避免偏移干扰
|
|
||||||
// piaoPingView.setPivotX(0);
|
|
||||||
// piaoPingView.setPivotY(0);
|
|
||||||
//
|
|
||||||
// // 启动动画:从左外滑入 -> 右外滑出
|
|
||||||
// ObjectAnimator animator = ObjectAnimator.ofFloat(
|
|
||||||
// piaoPingView,
|
|
||||||
// "translationX",
|
|
||||||
// 0f, // 初始偏移为 0(此时 View 在左侧外)
|
|
||||||
// screenWidth // 向右移动整个屏幕宽度
|
|
||||||
// );
|
|
||||||
// animator.setDuration(2000); // 整个动画的时长为2秒
|
|
||||||
//
|
|
||||||
// // 强制 GPU 渲染
|
|
||||||
// piaoPingView.setLayerType(View.LAYER_TYPE_HARDWARE, null);
|
|
||||||
//
|
|
||||||
// // 延迟显示2秒后开始滑出屏幕的动画
|
|
||||||
// piaoPingView.postDelayed(new Runnable() {
|
|
||||||
// @Override
|
|
||||||
// public void run() {
|
|
||||||
// animator.start();
|
|
||||||
// }
|
|
||||||
// }, 3000);
|
|
||||||
//
|
|
||||||
// animator.addListener(new AnimatorListenerAdapter() {
|
|
||||||
// @Override
|
|
||||||
// public void onAnimationEnd(Animator animation) {
|
|
||||||
// windowManager.removeView(piaoPingView);
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -165,6 +165,11 @@ public class CommonAppContext extends MultiDexApplication implements Applicatio
|
|||||||
adjustFontScale(getResources().getConfiguration());
|
adjustFontScale(getResources().getConfiguration());
|
||||||
CrashHandler.init(this);
|
CrashHandler.init(this);
|
||||||
|
|
||||||
|
// if (currentEnvironment.getShelf()==1){
|
||||||
|
if (SpUtil.getShelf()!=0) {
|
||||||
|
SpUtil.setShelf(1);
|
||||||
|
}
|
||||||
|
// }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -438,7 +443,7 @@ public class CommonAppContext extends MultiDexApplication implements Applicatio
|
|||||||
initARouter();
|
initARouter();
|
||||||
if (SpUtil.isAgreePolicy()) {
|
if (SpUtil.isAgreePolicy()) {
|
||||||
checkInEmulator();
|
checkInEmulator();
|
||||||
UtilConfig.checkInEmulator();
|
// UtilConfig.checkInEmulator();
|
||||||
AgoraManager.getInstance(this);
|
AgoraManager.getInstance(this);
|
||||||
AgoraManager.init(currentEnvironment.getSwSdkAppId());
|
AgoraManager.init(currentEnvironment.getSwSdkAppId());
|
||||||
MessageListenerSingleton.getInstance();
|
MessageListenerSingleton.getInstance();
|
||||||
@@ -452,8 +457,8 @@ public class CommonAppContext extends MultiDexApplication implements Applicatio
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
// mqttConnect=MqttConnect.getInstance(this,"tcp://1.13.181.248","android-"+ MqttClient.generateClientId());
|
// mqttConnect=MqttConnect.getInstance(this,"tcp://1.13.181.248","android-"+ MqttClient.generateClientId());
|
||||||
mqttConnect=MqttConnect.getInstance(this,"tcp://1.13.101.98","android-"+ MqttClient.generateClientId());
|
// mqttConnect=MqttConnect.getInstance(this,"tcp://1.13.101.98","android-"+ MqttClient.generateClientId());
|
||||||
mqttConnect.mqttClient();
|
// mqttConnect.mqttClient();
|
||||||
|
|
||||||
// 每次启动应用时重置状态
|
// 每次启动应用时重置状态
|
||||||
SpUtil.getInstance().setBooleanValue("youth_model_shown", false);
|
SpUtil.getInstance().setBooleanValue("youth_model_shown", false);
|
||||||
|
|||||||
@@ -246,24 +246,28 @@ public class RoomManager {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onNext(RoomInfoResp resp) {
|
public void onNext(RoomInfoResp resp) {
|
||||||
String appId = CommonAppContext.getInstance().getCurrentEnvironment().getSwSdkAppId();
|
if (resp!=null) {
|
||||||
String token = resp.getUser_info().getAgora_token(); // 如果启用了鉴权才需要
|
String appId = CommonAppContext.getInstance().getCurrentEnvironment().getSwSdkAppId();
|
||||||
String roomId = resp.getRoom_info().getRoom_id(); // 房间 ID
|
String token = resp.getUser_info().getAgora_token(); // 如果启用了鉴权才需要
|
||||||
String rtm_token = resp.getUser_info().getAgora_rtm_token();
|
String roomId = resp.getRoom_info().getRoom_id(); // 房间 ID
|
||||||
SpUtil.setRtmToken(rtm_token);
|
String rtm_token = resp.getUser_info().getAgora_rtm_token();
|
||||||
int uid = SpUtil.getUserId(); // 0 表示由 Agora 自动生成 UID
|
SpUtil.setRtmToken(rtm_token);
|
||||||
boolean enableMic = false; // 是否开启麦克风
|
int uid = SpUtil.getUserId(); // 0 表示由 Agora 自动生成 UID
|
||||||
boolean enableJs = false; // 是否开启角色
|
boolean enableMic = false; // 是否开启麦克风
|
||||||
if (resp.getUser_info().getPit_number() != 0) {
|
boolean enableJs = false; // 是否开启角色
|
||||||
enableJs = true;
|
if (resp.getUser_info().getPit_number() != 0) {
|
||||||
}
|
enableJs = true;
|
||||||
LogUtils.e("token", token);
|
}
|
||||||
LogUtils.e("roomId:", roomId);
|
LogUtils.e("token", token);
|
||||||
|
LogUtils.e("roomId:", roomId);
|
||||||
// 初始化 Agora 并加入房间
|
// 初始化 Agora 并加入房间
|
||||||
AgoraManager.getInstance(context)
|
AgoraManager.getInstance(context)
|
||||||
.joinRoom(token, roomId, uid, enableMic, enableJs);
|
.joinRoom(token, roomId, uid, enableMic, enableJs);
|
||||||
cacheRoomData(roomId, resp);
|
cacheRoomData(roomId, resp);
|
||||||
navigateToRoom(context, roomId, password, resp, false,taskId);
|
navigateToRoom(context, roomId, password, resp, false, taskId);
|
||||||
|
}else {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -328,6 +332,7 @@ public class RoomManager {
|
|||||||
ARouter.getInstance()
|
ARouter.getInstance()
|
||||||
.build(ARouteConstants.ROOM_DETAILS)
|
.build(ARouteConstants.ROOM_DETAILS)
|
||||||
.with(bundle)
|
.with(bundle)
|
||||||
|
.withFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT)
|
||||||
.navigation(context);
|
.navigation(context);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Logger.e(TAG, "跳转房间页面失败: " + e.getMessage());
|
Logger.e(TAG, "跳转房间页面失败: " + e.getMessage());
|
||||||
|
|||||||
@@ -96,6 +96,7 @@ public class RoomMessageEvent {
|
|||||||
private String redpacket_id;
|
private String redpacket_id;
|
||||||
|
|
||||||
private EmotionDeatils emoji;
|
private EmotionDeatils emoji;
|
||||||
|
private String is_pk;//是否是pk
|
||||||
}
|
}
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
|
|||||||
@@ -18,4 +18,5 @@ public class PkRoomInfo implements Serializable {
|
|||||||
private String pk_room_value;//对方房间的pk值
|
private String pk_room_value;//对方房间的pk值
|
||||||
private String pk_part;;//2:等待开始、3:进行中、4:惩罚阶段
|
private String pk_part;;//2:等待开始、3:进行中、4:惩罚阶段
|
||||||
private String pk_end_times;
|
private String pk_end_times;
|
||||||
|
private String receive_pk_user_id;//接受pk的用户id
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,7 +18,10 @@ public class RoomSettingBean implements MultiItemEntity {
|
|||||||
public static final int QXRoomSettingTypeRoomTypeGirl = 13;
|
public static final int QXRoomSettingTypeRoomTypeGirl = 13;
|
||||||
///交友 房
|
///交友 房
|
||||||
public static final int QXRoomSettingTypeRoomTypeJiaoy = 27;
|
public static final int QXRoomSettingTypeRoomTypeJiaoy = 27;
|
||||||
|
//互娱
|
||||||
public static final int QXRoomSettingTypeRoomTypeHUYU = 28;
|
public static final int QXRoomSettingTypeRoomTypeHUYU = 28;
|
||||||
|
//练歌房
|
||||||
|
public static final int QXRoomSettingTypeRoomTypeLianG = 31;
|
||||||
|
|
||||||
/// 常用工具
|
/// 常用工具
|
||||||
/// 房间补贴
|
/// 房间补贴
|
||||||
|
|||||||
@@ -2246,8 +2246,7 @@ public class RetrofitClient {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void getRoomUserInfo(String room_id, String
|
public void getRoomUserInfo(String room_id, String user_id, BaseObserver<UserInfo> observer) {
|
||||||
user_id, BaseObserver<UserInfo> observer) {
|
|
||||||
sApiServer.getRoomUserInfo(room_id, user_id).enqueue(new Callback<BaseModel<UserInfo>>() {
|
sApiServer.getRoomUserInfo(room_id, user_id).enqueue(new Callback<BaseModel<UserInfo>>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(Call<BaseModel<UserInfo>> call, Response<BaseModel<UserInfo>> response) {
|
public void onResponse(Call<BaseModel<UserInfo>> call, Response<BaseModel<UserInfo>> response) {
|
||||||
|
|||||||
@@ -72,18 +72,67 @@ public class MessageListenerSingleton {
|
|||||||
|
|
||||||
private List<PublicScreenMessageListener> publicScreenListeners = new ArrayList<>();
|
private List<PublicScreenMessageListener> publicScreenListeners = new ArrayList<>();
|
||||||
|
|
||||||
// 添加监听器
|
|
||||||
|
// 替换原有的 addPublicScreenMessageListener 方法
|
||||||
public void addPublicScreenMessageListener(PublicScreenMessageListener listener) {
|
public void addPublicScreenMessageListener(PublicScreenMessageListener listener) {
|
||||||
if (!publicScreenListeners.contains(listener)) {
|
if (listener == null) {
|
||||||
publicScreenListeners.add(listener);
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
synchronized (publicScreenListeners) {
|
||||||
|
if (!publicScreenListeners.contains(listener)) {
|
||||||
|
try {
|
||||||
|
publicScreenListeners.add(listener);
|
||||||
|
} catch (Exception e) {
|
||||||
|
LogUtils.e("MessageListener", "添加 PublicScreenMessageListener 失败: " + e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 移除监听器
|
// 同时修改 removePublicScreenMessageListener 方法
|
||||||
public void removePublicScreenMessageListener(PublicScreenMessageListener listener) {
|
public void removePublicScreenMessageListener(PublicScreenMessageListener listener) {
|
||||||
publicScreenListeners.remove(listener);
|
if (listener == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
synchronized (publicScreenListeners) {
|
||||||
|
try {
|
||||||
|
publicScreenListeners.remove(listener);
|
||||||
|
} catch (Exception e) {
|
||||||
|
LogUtils.e("MessageListener", "移除 PublicScreenMessageListener 失败: " + e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 修改 notify 方法以增加保护
|
||||||
|
private void notifyPublicScreenListeners(RoomMessageEvent message) {
|
||||||
|
synchronized (publicScreenListeners) {
|
||||||
|
// 创建副本以避免并发修改异常
|
||||||
|
List<PublicScreenMessageListener> listenersCopy = new ArrayList<>(publicScreenListeners);
|
||||||
|
for (PublicScreenMessageListener listener : listenersCopy) {
|
||||||
|
try {
|
||||||
|
listener.onPublicScreenMessageReceived(message);
|
||||||
|
} catch (Exception e) {
|
||||||
|
LogUtils.e("MessageListener", "通知 PublicScreenMessageListener 失败: " + e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 添加监听器
|
||||||
|
// public void addPublicScreenMessageListener(PublicScreenMessageListener listener) {
|
||||||
|
// if (!publicScreenListeners.contains(listener)) {
|
||||||
|
// publicScreenListeners.add(listener);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// // 移除监听器
|
||||||
|
// public void removePublicScreenMessageListener(PublicScreenMessageListener listener) {
|
||||||
|
// publicScreenListeners.remove(listener);
|
||||||
|
// }
|
||||||
|
|
||||||
private MessageListenerSingleton() {
|
private MessageListenerSingleton() {
|
||||||
if (!isInitialized) {
|
if (!isInitialized) {
|
||||||
isInitialized = true;
|
isInitialized = true;
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ import io.agora.rtc2.video.VideoEncoderConfiguration;
|
|||||||
public class AgoraManager {
|
public class AgoraManager {
|
||||||
|
|
||||||
private static volatile AgoraManager instance;
|
private static volatile AgoraManager instance;
|
||||||
private static RtcEngineEx rtcEngine;
|
public static RtcEngineEx rtcEngine;
|
||||||
// private RtcEngineEx rtcEngineEx;
|
// private RtcEngineEx rtcEngineEx;
|
||||||
private static Context context;
|
private static Context context;
|
||||||
private boolean isLocalAudioEnabled = true; // 默认开启麦克风
|
private boolean isLocalAudioEnabled = true; // 默认开启麦克风
|
||||||
@@ -102,6 +102,16 @@ public class AgoraManager {
|
|||||||
private String pkRoomId = "";
|
private String pkRoomId = "";
|
||||||
private static String lastRoomId;
|
private static String lastRoomId;
|
||||||
|
|
||||||
|
public int pkUserId;
|
||||||
|
|
||||||
|
public int getPkUserId() {
|
||||||
|
return pkUserId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPkUserId(int pkUserId) {
|
||||||
|
this.pkUserId = pkUserId;
|
||||||
|
}
|
||||||
|
|
||||||
public void setLastRoomId(String value) {
|
public void setLastRoomId(String value) {
|
||||||
lastRoomId = value;
|
lastRoomId = value;
|
||||||
}
|
}
|
||||||
@@ -212,36 +222,8 @@ public class AgoraManager {
|
|||||||
Log.w("AgoraManager", "Failed to set parameters", e);
|
Log.w("AgoraManager", "Failed to set parameters", e);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*Enable video module*/
|
|
||||||
rtcEngine.enableVideo();
|
rtcEngine.enableVideo();
|
||||||
// Setup video encoding configs
|
|
||||||
// rtcEngine.setVideoEncoderConfiguration(new VideoEncoderConfiguration(
|
|
||||||
// VD_640x360,
|
|
||||||
// FRAME_RATE_FPS_30,
|
|
||||||
// STANDARD_BITRATE,
|
|
||||||
// ORIENTATION_MODE_FIXED_PORTRAIT
|
|
||||||
// ));
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*Set up to play remote sound with receiver*/
|
|
||||||
rtcEngine.setDefaultAudioRoutetoSpeakerphone(true);
|
rtcEngine.setDefaultAudioRoutetoSpeakerphone(true);
|
||||||
|
|
||||||
|
|
||||||
// OrientationEventListener orientationListener = new OrientationEventListener(context,
|
|
||||||
// SensorManager.SENSOR_DELAY_NORMAL) {
|
|
||||||
// @Override
|
|
||||||
// public void onOrientationChanged(int orientation) {
|
|
||||||
// int angle = calculateScreenAngle(orientation);
|
|
||||||
// try {
|
|
||||||
// rtcEngine.setVideoOrientation(angle); // 通知声网引擎调整视频方向
|
|
||||||
// } catch (Exception e) {
|
|
||||||
// Log.e("AgoraManager", "Set video orientation failed", e);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// };
|
|
||||||
// orientationListener.enable(); // 启用监听
|
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Log.e("AgoraManager", "Failed to configure RtcEngine", e);
|
Log.e("AgoraManager", "Failed to configure RtcEngine", e);
|
||||||
}
|
}
|
||||||
@@ -349,6 +331,19 @@ public class AgoraManager {
|
|||||||
*/
|
*/
|
||||||
private static IRtcEngineEventHandler getDefaultEventHandler() {
|
private static IRtcEngineEventHandler getDefaultEventHandler() {
|
||||||
return new IRtcEngineEventHandler() {
|
return new IRtcEngineEventHandler() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onRemoteAudioStateChanged(int uid, int state, int reason, int elapsed) {
|
||||||
|
super.onRemoteAudioStateChanged(uid, state, reason, elapsed);
|
||||||
|
LogUtils.e("onRemoteAudioStateChanged", "uid------>" + uid, "state------>" + state, "reason------>" + reason, "elapsed------>" + elapsed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onUserMuteAudio(int uid, boolean muted) {
|
||||||
|
super.onUserMuteAudio(uid, muted);
|
||||||
|
LogUtils.e("onUserMuteAudio", "uid------>" + uid, "muted------>" + muted);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onJoinChannelSuccess(String channel, int uid, int elapsed) {
|
public void onJoinChannelSuccess(String channel, int uid, int elapsed) {
|
||||||
|
|
||||||
@@ -710,7 +705,7 @@ public class AgoraManager {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void joinChannelEx(String token, String channelId, int uid) {
|
public void joinChannelEx(String token, String channelId, int uid,String pkUserIds) {
|
||||||
if (rtcEngine == null) {
|
if (rtcEngine == null) {
|
||||||
init(CommonAppContext.getInstance().getCurrentEnvironment().getSwSdkAppId());
|
init(CommonAppContext.getInstance().getCurrentEnvironment().getSwSdkAppId());
|
||||||
}
|
}
|
||||||
@@ -722,10 +717,12 @@ public class AgoraManager {
|
|||||||
options.autoSubscribeAudio = true;
|
options.autoSubscribeAudio = true;
|
||||||
connection = new RtcConnection();
|
connection = new RtcConnection();
|
||||||
connection.channelId = channelId;
|
connection.channelId = channelId;
|
||||||
connection.localUid = uid;
|
connection.localUid = SpUtil.getUserId();
|
||||||
pkRoomId = channelId;
|
pkRoomId = channelId;
|
||||||
rtcEngine.joinChannelEx(token, connection, options, getDefaultEventHandler());
|
pkUserId = Integer.parseInt(pkUserIds);
|
||||||
|
// rtcEngine.joinChannelEx(token, connection, options, getDefaultEventHandler());
|
||||||
|
// muteAllRemoteAudioStreamsEx(true);
|
||||||
|
// muteAllRemoteAudioStreamsExUserId(false);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -735,7 +732,7 @@ public class AgoraManager {
|
|||||||
RtcConnection connection = new RtcConnection();
|
RtcConnection connection = new RtcConnection();
|
||||||
connection.channelId = mRoomId;
|
connection.channelId = mRoomId;
|
||||||
connection.localUid = uid;
|
connection.localUid = uid;
|
||||||
rtcEngine.leaveChannelEx(connection);
|
// rtcEngine.leaveChannelEx(connection);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -894,7 +891,7 @@ public class AgoraManager {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//关闭对方的所有推流
|
||||||
public void muteAllRemoteAudioStreamsEx(boolean enabled) {
|
public void muteAllRemoteAudioStreamsEx(boolean enabled) {
|
||||||
if (rtcEngine == null) {
|
if (rtcEngine == null) {
|
||||||
init(CommonAppContext.getInstance().getCurrentEnvironment().getSwSdkAppId());
|
init(CommonAppContext.getInstance().getCurrentEnvironment().getSwSdkAppId());
|
||||||
@@ -906,7 +903,13 @@ public class AgoraManager {
|
|||||||
connection = new RtcConnection();
|
connection = new RtcConnection();
|
||||||
connection.channelId = pkRoomId;
|
connection.channelId = pkRoomId;
|
||||||
}
|
}
|
||||||
rtcEngine.muteAllRemoteAudioStreamsEx(enabled, connection);
|
// rtcEngine.muteAllRemoteAudioStreamsEx(enabled, connection);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//打开对方支持的推流
|
||||||
|
public void muteAllRemoteAudioStreamsExUserId(boolean enabled){
|
||||||
|
if (rtcEngine != null){
|
||||||
|
// rtcEngine.muteRemoteAudioStreamEx(pkUserId,enabled,connection);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -924,17 +927,13 @@ public class AgoraManager {
|
|||||||
* 启用或者关闭远端音频流
|
* 启用或者关闭远端音频流
|
||||||
*
|
*
|
||||||
* @param enabled
|
* @param enabled
|
||||||
* @param uid
|
|
||||||
*/
|
*/
|
||||||
public void muteLocalAudioStreamEx(boolean enabled, int uid) {
|
public void muteLocalAudioStreamEx(boolean enabled) {
|
||||||
// RtcConnection connection = new RtcConnection();
|
|
||||||
// connection.channelId = mRoomId;
|
|
||||||
// connection.localUid = uid;
|
|
||||||
if (rtcEngine == null) {
|
if (rtcEngine == null) {
|
||||||
init(CommonAppContext.getInstance().getCurrentEnvironment().getSwSdkAppId());
|
init(CommonAppContext.getInstance().getCurrentEnvironment().getSwSdkAppId());
|
||||||
}
|
}
|
||||||
// 正确做法
|
// 正确做法
|
||||||
rtcEngine.muteLocalAudioStreamEx(enabled, connection);
|
// rtcEngine.muteLocalAudioStreamEx(enabled, connection);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1119,7 +1118,7 @@ public class AgoraManager {
|
|||||||
case PLAYER_STATE_OPEN_COMPLETED:
|
case PLAYER_STATE_OPEN_COMPLETED:
|
||||||
LogUtils.e("lxj", "播放");
|
LogUtils.e("lxj", "播放");
|
||||||
musicPlayer.play();
|
musicPlayer.play();
|
||||||
musicPlayer.selectAudioTrack(0);//播放原生
|
// musicPlayer.selectAudioTrack(0);//播放原生
|
||||||
break;
|
break;
|
||||||
case PLAYER_STATE_PAUSING_INTERNAL:
|
case PLAYER_STATE_PAUSING_INTERNAL:
|
||||||
LogUtils.e("lxj", "关闭");
|
LogUtils.e("lxj", "关闭");
|
||||||
@@ -1258,7 +1257,7 @@ public class AgoraManager {
|
|||||||
case PLAYER_STATE_OPEN_COMPLETED:
|
case PLAYER_STATE_OPEN_COMPLETED:
|
||||||
LogUtils.e("lxj", "播放");
|
LogUtils.e("lxj", "播放");
|
||||||
musicPlayer.play();
|
musicPlayer.play();
|
||||||
musicPlayer.selectAudioTrack(0);
|
// musicPlayer.selectAudioTrack(0);
|
||||||
break;
|
break;
|
||||||
case PLAYER_STATE_PAUSING_INTERNAL:
|
case PLAYER_STATE_PAUSING_INTERNAL:
|
||||||
LogUtils.e("lxj", "关闭");
|
LogUtils.e("lxj", "关闭");
|
||||||
@@ -1355,21 +1354,31 @@ public class AgoraManager {
|
|||||||
*/
|
*/
|
||||||
public void setMusicVolume(int volume) {
|
public void setMusicVolume(int volume) {
|
||||||
if (rtcEngine != null) {
|
if (rtcEngine != null) {
|
||||||
rtcEngine.adjustRecordingSignalVolume(volume);
|
rtcEngine.adjustRecordingSignalVolume(volume);//调整采集信号音量
|
||||||
|
|
||||||
|
// musicPlayer.adjustPublishSignalVolume(volume);//调节远端用户听到的音量。 参数是0-400
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设置伴奏阴凉
|
* 设置伴奏音量
|
||||||
*
|
*
|
||||||
* @param volume
|
* @param volume
|
||||||
*/
|
*/
|
||||||
public void settPlayoutVolume(int volume) {
|
public void setPlayoutVolume(int volume) {
|
||||||
if (musicPlayer != null) {
|
if (musicPlayer != null) {
|
||||||
musicPlayer.adjustPlayoutVolume(volume);
|
musicPlayer.adjustPlayoutVolume(volume);//调节本地播放音量。 参数是0-100
|
||||||
musicPlayer.adjustPublishSignalVolume(volume);
|
musicPlayer.adjustPublishSignalVolume(volume*2);//调节远端用户听到的音量。 参数是0-400
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 伴奏音量
|
||||||
|
* @param volume
|
||||||
|
*/
|
||||||
|
public void setAdjustPublishSignalVolume(int volume){
|
||||||
|
musicPlayer.adjustPublishSignalVolume(volume);//调节远端用户听到的音量。 参数是0-400
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设置音效
|
* 设置音效
|
||||||
|
|||||||
@@ -0,0 +1,354 @@
|
|||||||
|
package com.xscm.moduleutil.rtc;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.util.Log;
|
||||||
|
import android.view.SurfaceView;
|
||||||
|
import com.blankj.utilcode.util.LogUtils;
|
||||||
|
import com.blankj.utilcode.util.ThreadUtils;
|
||||||
|
import com.xscm.moduleutil.base.CommonAppContext;
|
||||||
|
import com.xscm.moduleutil.event.CabinEvent;
|
||||||
|
import com.xscm.moduleutil.event.ColoseCardEvent;
|
||||||
|
import com.xscm.moduleutil.event.SurfaceEvent;
|
||||||
|
import com.xscm.moduleutil.interfaces.SoundLevelUpdateListener;
|
||||||
|
import com.xscm.moduleutil.utils.SpUtil;
|
||||||
|
import io.agora.musiccontentcenter.*;
|
||||||
|
import io.agora.rtc2.*;
|
||||||
|
import io.agora.rtc2.video.VideoCanvas;
|
||||||
|
import org.greenrobot.eventbus.EventBus;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.concurrent.CopyOnWriteArrayList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* com.xscm.moduleutil.rtc
|
||||||
|
* qx
|
||||||
|
* 2025/10/29
|
||||||
|
*/
|
||||||
|
public class AgoraManagerEx {
|
||||||
|
|
||||||
|
private static volatile AgoraManagerEx instance;
|
||||||
|
private static RtcEngineEx rtcEngineEx;
|
||||||
|
// private RtcEngineEx rtcEngineEx;
|
||||||
|
private static Context context;
|
||||||
|
private boolean isLocalAudioEnabled = true; // 默认开启麦克风
|
||||||
|
// private final List<IRtcEngineEventHandler> eventHandlers = new ArrayList<>();
|
||||||
|
private static IAgoraMusicContentCenter musicContentCenter;
|
||||||
|
private static IAgoraMusicPlayer musicPlayer;
|
||||||
|
private static MusicContentCenterConfiguration contentCenterConfiguration;
|
||||||
|
private static String mRoomId = "";
|
||||||
|
private static long mSongCode;
|
||||||
|
|
||||||
|
private static List<Music> musicList;
|
||||||
|
private static boolean isBjMusic = false;
|
||||||
|
private static List<SoundLevelUpdateListener> soundLevelUpdateListeners = new CopyOnWriteArrayList<>();
|
||||||
|
private static ChannelMediaOptions options;
|
||||||
|
private static RtcConnection connection;
|
||||||
|
private String pkRoomId = "";
|
||||||
|
private static String lastRoomId;
|
||||||
|
|
||||||
|
public int pkUserId;
|
||||||
|
|
||||||
|
public int getPkUserId() {
|
||||||
|
return pkUserId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPkUserId(int pkUserId) {
|
||||||
|
this.pkUserId = pkUserId;
|
||||||
|
}
|
||||||
|
private static boolean isOnJoin = false;
|
||||||
|
public void setLastRoomId(String value) {
|
||||||
|
lastRoomId = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLastRoomId() {
|
||||||
|
LogUtils.e("上次的房间id:" + lastRoomId);
|
||||||
|
return lastRoomId;
|
||||||
|
}
|
||||||
|
|
||||||
|
private AgoraManagerEx() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public static AgoraManagerEx getInstance(Context con) {
|
||||||
|
if (instance == null) {
|
||||||
|
synchronized (AgoraManagerEx.class) {
|
||||||
|
if (instance == null) {
|
||||||
|
instance = new AgoraManagerEx();
|
||||||
|
context = con.getApplicationContext(); // 使用ApplicationContext避免内存泄漏
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 确保引擎已初始化
|
||||||
|
if (rtcEngineEx == null) {
|
||||||
|
synchronized (AgoraManagerEx.class) {
|
||||||
|
if (rtcEngineEx == null) {
|
||||||
|
init(CommonAppContext.getInstance().getCurrentEnvironment().getSwSdkAppId());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void init(String appId) {
|
||||||
|
if (rtcEngineEx != null) {
|
||||||
|
return;
|
||||||
|
};
|
||||||
|
|
||||||
|
synchronized (AgoraManager.class) {
|
||||||
|
if (rtcEngineEx != null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
rtcEngineEx =AgoraManager.getInstance( context).rtcEngine;
|
||||||
|
|
||||||
|
// try {
|
||||||
|
// RtcEngineConfig config = new RtcEngineConfig();
|
||||||
|
// config.mContext = context;
|
||||||
|
// config.mAppId = appId;
|
||||||
|
// config.mEventHandler = getDefaultEventHandler();
|
||||||
|
// config.mChannelProfile = Constants.CHANNEL_PROFILE_LIVE_BROADCASTING;
|
||||||
|
// config.mAudioScenario = Constants.AUDIO_SCENARIO_CHORUS;
|
||||||
|
// config.mAreaCode = 1;
|
||||||
|
//
|
||||||
|
// rtcEngineEx = (RtcEngineEx) RtcEngineEx.create(config);
|
||||||
|
// } catch (Exception e) {
|
||||||
|
// Log.e("AgoraManager", "Failed to create RtcEngine", e);
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// if (rtcEngineEx != null) {
|
||||||
|
// try {
|
||||||
|
// rtcEngineEx.setAudioProfile(Constants.AUDIO_PROFILE_MUSIC_HIGH_QUALITY_STEREO,
|
||||||
|
// Constants.AUDIO_SCENARIO_GAME_STREAMING);
|
||||||
|
// rtcEngineEx.enableAudioVolumeIndication(200, 3, true);
|
||||||
|
// rtcEngineEx.setClientRole(Constants.CLIENT_ROLE_BROADCASTER);
|
||||||
|
// rtcEngineEx.muteLocalAudioStream(true); // 默认静音
|
||||||
|
// rtcEngineEx.muteAllRemoteAudioStreams(false); // 监听远端的音频
|
||||||
|
//
|
||||||
|
// // 设置参数时添加异常处理
|
||||||
|
// try {
|
||||||
|
// rtcEngineEx.setParameters("{\"che.audio.custom_payload_type\":73}");
|
||||||
|
// rtcEngineEx.setParameters("{\"che.audio.custom_bitrate\":128000}");
|
||||||
|
// rtcEngineEx.setParameters("{\"rtc.enable_nasa2\": true}");
|
||||||
|
// rtcEngineEx.setParameters("{\"rtc.use_audio4\": true}");
|
||||||
|
// rtcEngineEx.setParameters("{" +
|
||||||
|
// "\"rtc.report_app_scenario\":" +
|
||||||
|
// "{" +
|
||||||
|
// "\"appScenario\":" + 100 + "," +
|
||||||
|
// "\"serviceType\":" + 11 + "," +
|
||||||
|
// "\"appVersion\":\"" + rtcEngineEx.getSdkVersion() + "\"" +
|
||||||
|
// "}" +
|
||||||
|
// "}");
|
||||||
|
// rtcEngineEx.setParameters("{\"che.video.mobile_1080p\":true}");
|
||||||
|
// } catch (Exception e) {
|
||||||
|
// Log.w("AgoraManager", "Failed to set parameters", e);
|
||||||
|
// }
|
||||||
|
// /*Enable video module*/
|
||||||
|
// rtcEngineEx.enableVideo();
|
||||||
|
// /*Set up to play remote sound with receiver*/
|
||||||
|
// rtcEngineEx.setDefaultAudioRoutetoSpeakerphone(true);
|
||||||
|
//
|
||||||
|
// } catch (Exception e) {
|
||||||
|
// Log.e("AgoraManager", "Failed to configure rtcEngineEx", e);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static IRtcEngineEventHandler getDefaultEventHandler() {
|
||||||
|
return new IRtcEngineEventHandler() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onRemoteAudioStateChanged(int uid, int state, int reason, int elapsed) {
|
||||||
|
super.onRemoteAudioStateChanged(uid, state, reason, elapsed);
|
||||||
|
LogUtils.e("onRemoteAudioStateChanged", "uid------>" + uid, "state------>" + state, "reason------>" + reason, "elapsed------>" + elapsed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onUserMuteAudio(int uid, boolean muted) {
|
||||||
|
super.onUserMuteAudio(uid, muted);
|
||||||
|
LogUtils.e("onUserMuteAudio", "uid------>" + uid, "muted------>" + muted);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onJoinChannelSuccess(String channel, int uid, int elapsed) {
|
||||||
|
LogUtils.e("onJoinChannelSuccess", "channel------>" + channel, "uid------>" + uid, "elapsed------>" + elapsed);
|
||||||
|
if (!isOnJoin) {
|
||||||
|
AgoraIsOPen isOPen = new AgoraIsOPen();
|
||||||
|
isOPen.setOpen(true);
|
||||||
|
EventBus.getDefault().post(isOPen);
|
||||||
|
isOnJoin = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onUserJoined(int uid, int elapsed) {//远端用户加入频道
|
||||||
|
|
||||||
|
for (SoundLevelUpdateListener listener : soundLevelUpdateListeners) {
|
||||||
|
if (listener != null) {
|
||||||
|
ThreadUtils.runOnUiThread(() -> {
|
||||||
|
// 远程用户音量变化
|
||||||
|
listener.userJoined(uid, elapsed);
|
||||||
|
// }
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onUserOffline(int uid, int reason) {//远端用户离开频道
|
||||||
|
for (SoundLevelUpdateListener listener : soundLevelUpdateListeners) {
|
||||||
|
if (listener != null) {
|
||||||
|
ThreadUtils.runOnUiThread(() -> {
|
||||||
|
// 远程用户音量变化
|
||||||
|
listener.userOffline(uid, reason);
|
||||||
|
// }
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onAudioVolumeIndication(AudioVolumeInfo[] speakers, int totalVolume) {
|
||||||
|
super.onAudioVolumeIndication(speakers, totalVolume);
|
||||||
|
|
||||||
|
if (speakers == null || speakers.length == 0) return;
|
||||||
|
|
||||||
|
for (final AudioVolumeInfo info : speakers) {
|
||||||
|
final int uid = info.uid;
|
||||||
|
final int volume = info.volume;
|
||||||
|
|
||||||
|
// 回调所有监听器
|
||||||
|
for (SoundLevelUpdateListener listener : soundLevelUpdateListeners) {
|
||||||
|
if (listener != null) {
|
||||||
|
ThreadUtils.runOnUiThread(() -> {
|
||||||
|
// 远程用户音量变化
|
||||||
|
listener.onRemoteSoundLevelUpdate(uid > 0 ? String.valueOf(uid) : SpUtil.getUserId() + "", volume);
|
||||||
|
// }
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onLocalVideoStateChanged(Constants.VideoSourceType source, int state, int reason) {
|
||||||
|
super.onLocalVideoStateChanged(source, state, reason);
|
||||||
|
if (state == Constants.LOCAL_VIDEO_STREAM_STATE_CAPTURING && source.getValue() == Constants.VIDEO_SOURCE_SCREEN_PRIMARY) {
|
||||||
|
options.publishScreenCaptureAudio = true;
|
||||||
|
options.publishScreenCaptureVideo = true;
|
||||||
|
options.publishCameraTrack = false;
|
||||||
|
rtcEngineEx.updateChannelMediaOptions(options);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFirstRemoteAudioFrame(int uid, int elapsed) {
|
||||||
|
super.onFirstRemoteAudioFrame(uid, elapsed);
|
||||||
|
Log.i("RoomCabinFragment", "onFirstRemoteAudioFrame: uid->" + uid);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
// 可继续扩展其他回调...
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFirstRemoteVideoFrame(int uid, int width, int height, int elapsed) {
|
||||||
|
super.onFirstRemoteVideoFrame(uid, width, height, elapsed);
|
||||||
|
SurfaceView renderView = new SurfaceView(context);
|
||||||
|
SurfaceEvent surfaceEvent = new SurfaceEvent();
|
||||||
|
surfaceEvent.setSurfaceView(renderView);
|
||||||
|
surfaceEvent.setType(2);
|
||||||
|
rtcEngineEx.setupRemoteVideo(new VideoCanvas(renderView, Constants.RENDER_MODE_FIT, uid));
|
||||||
|
EventBus.getDefault().post(surfaceEvent);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onRemoteVideoStateChanged(int uid, int state, int reason, int elapsed) {
|
||||||
|
super.onRemoteVideoStateChanged(uid, state, reason, elapsed);
|
||||||
|
Log.i("RoomCabinFragment", "onRemoteVideoStateChanged:uid->" + uid + ", state->" + state);
|
||||||
|
if (state == Constants.REMOTE_AUDIO_STATE_STOPPED) {
|
||||||
|
ColoseCardEvent renderView = new ColoseCardEvent();
|
||||||
|
EventBus.getDefault().post(renderView);
|
||||||
|
} else if (state == Constants.REMOTE_AUDIO_STATE_STARTING) {
|
||||||
|
|
||||||
|
SurfaceView renderView = new SurfaceView(context);
|
||||||
|
rtcEngineEx.setupRemoteVideo(new VideoCanvas(renderView, Constants.RENDER_MODE_FIT, uid));
|
||||||
|
SurfaceEvent surfaceEvent = new SurfaceEvent();
|
||||||
|
surfaceEvent.setSurfaceView(renderView);
|
||||||
|
surfaceEvent.setType(2);
|
||||||
|
EventBus.getDefault().post(surfaceEvent);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onError(int err) {
|
||||||
|
super.onError(err);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
public void joinChannelEx(String token, String channelId, String pkUserIds) {
|
||||||
|
// if (rtcEngineEx == null) {
|
||||||
|
// init(CommonAppContext.getInstance().getCurrentEnvironment().getSwSdkAppId());
|
||||||
|
// }00602f7339ec98947deaeab173599891932IAAe1VwQOurJj57ZCxEJ3SO8VCK6MPKfAjdo5v/oOHPd5BTK+bCVBxwwIgDobHEAn5cDaQQAAQCflwNpAwCflwNpAgCflwNpBACflwNp
|
||||||
|
if (rtcEngineEx != null) {
|
||||||
|
options = new ChannelMediaOptions();
|
||||||
|
options.clientRoleType = Constants.CLIENT_ROLE_BROADCASTER;
|
||||||
|
options.channelProfile = Constants.CHANNEL_PROFILE_LIVE_BROADCASTING;
|
||||||
|
options.publishMicrophoneTrack = true; // 是否发布麦克风音频
|
||||||
|
options.enableAudioRecordingOrPlayout = true;
|
||||||
|
options.autoSubscribeAudio = true;
|
||||||
|
connection = new RtcConnection();
|
||||||
|
connection.channelId = channelId;
|
||||||
|
connection.localUid = SpUtil.getUserId();
|
||||||
|
pkRoomId = channelId;
|
||||||
|
pkUserId = Integer.parseInt(pkUserIds);
|
||||||
|
rtcEngineEx.joinChannelEx(token, connection, options, getDefaultEventHandler());
|
||||||
|
muteAllRemoteAudioStreamsEx(true);
|
||||||
|
muteAllRemoteAudioStreamsExUserId(false);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void muteAllRemoteAudioStreamsEx(boolean enabled) {
|
||||||
|
if (rtcEngineEx == null) {
|
||||||
|
init(CommonAppContext.getInstance().getCurrentEnvironment().getSwSdkAppId());
|
||||||
|
}
|
||||||
|
if (rtcEngineEx != null) {
|
||||||
|
// RtcConnection connection = new RtcConnection();
|
||||||
|
// connection.channelId = mRoomId;
|
||||||
|
// if (connection == null) {
|
||||||
|
// connection = new RtcConnection();
|
||||||
|
// connection.channelId = pkRoomId;
|
||||||
|
// }
|
||||||
|
rtcEngineEx.muteAllRemoteAudioStreamsEx(enabled, connection);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void muteLocalAudioStreamEx(boolean enabled) {
|
||||||
|
if (rtcEngineEx == null) {
|
||||||
|
init(CommonAppContext.getInstance().getCurrentEnvironment().getSwSdkAppId());
|
||||||
|
}
|
||||||
|
// 正确做法
|
||||||
|
rtcEngineEx.muteLocalAudioStreamEx(enabled, connection);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void muteAllRemoteAudioStreamsExUserId(boolean enabled){
|
||||||
|
if (rtcEngineEx != null){
|
||||||
|
rtcEngineEx.muteRemoteAudioStreamEx(pkUserId,enabled,connection);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void leaveChannelEx(String mRoomId, int uid) {
|
||||||
|
if (rtcEngineEx != null) {
|
||||||
|
RtcConnection connection = new RtcConnection();
|
||||||
|
connection.channelId = mRoomId;
|
||||||
|
connection.localUid = uid;
|
||||||
|
rtcEngineEx.leaveChannelEx(connection);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,77 @@
|
|||||||
|
package com.xscm.moduleutil.rtc;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* com.xscm.moduleutil.rtc
|
||||||
|
* qx
|
||||||
|
* 2025/11/3
|
||||||
|
* 声网声音管理类
|
||||||
|
*/
|
||||||
|
public class VolumeManager {
|
||||||
|
private static VolumeManager instance;
|
||||||
|
private Map<String, Integer> userMusicVolumeMap = new HashMap<>();
|
||||||
|
private Map<String, Integer> userPlayoutVolumeMap = new HashMap<>();
|
||||||
|
private Map<String, Boolean> userPlayoutBzMap = new HashMap<>();
|
||||||
|
private String currentUserId;
|
||||||
|
|
||||||
|
private VolumeManager() {}
|
||||||
|
|
||||||
|
public static VolumeManager getInstance() {
|
||||||
|
if (instance == null) {
|
||||||
|
synchronized (VolumeManager.class) {
|
||||||
|
if (instance == null) {
|
||||||
|
instance = new VolumeManager();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCurrentUserId(String userId) {
|
||||||
|
this.currentUserId = userId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void saveCurrentVolumes(int musicVolume, int playoutVolume) {
|
||||||
|
if (currentUserId != null) {
|
||||||
|
userMusicVolumeMap.put(currentUserId, musicVolume);
|
||||||
|
userPlayoutVolumeMap.put(currentUserId, playoutVolume);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public void clearCurrentVolumes() {
|
||||||
|
if (currentUserId != null) {
|
||||||
|
userMusicVolumeMap.remove(currentUserId);
|
||||||
|
userPlayoutVolumeMap.remove(currentUserId);
|
||||||
|
}
|
||||||
|
userPlayoutBzMap.clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void saveBz(String userId, boolean bz){
|
||||||
|
userPlayoutBzMap.clear();
|
||||||
|
userPlayoutBzMap.put(userId, bz);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean getBz(String userId){
|
||||||
|
Boolean bz = userPlayoutBzMap.get(userId);
|
||||||
|
if (bz == null) {
|
||||||
|
bz = true; // 默认值原唱 false 伴奏
|
||||||
|
}
|
||||||
|
return bz;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int[] getUserVolumes(String userId) {
|
||||||
|
Integer musicVolume = userMusicVolumeMap.get(userId);
|
||||||
|
Integer playoutVolume = userPlayoutVolumeMap.get(userId);
|
||||||
|
|
||||||
|
if (musicVolume == null) {
|
||||||
|
musicVolume = 100; // 默认值
|
||||||
|
}
|
||||||
|
if (playoutVolume == null) {
|
||||||
|
playoutVolume = 50; // 默认值
|
||||||
|
}
|
||||||
|
|
||||||
|
return new int[]{musicVolume, playoutVolume};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -1,10 +1,13 @@
|
|||||||
package com.xscm.moduleutil.utils;
|
package com.xscm.moduleutil.utils;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import android.content.Intent;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
import com.alibaba.android.arouter.launcher.ARouter;
|
import com.alibaba.android.arouter.launcher.ARouter;
|
||||||
|
|
||||||
|
import static com.blankj.utilcode.util.ActivityUtils.startActivity;
|
||||||
|
|
||||||
public class CrashHandler implements Thread.UncaughtExceptionHandler {
|
public class CrashHandler implements Thread.UncaughtExceptionHandler {
|
||||||
private static CrashHandler instance;
|
private static CrashHandler instance;
|
||||||
private Thread.UncaughtExceptionHandler defaultHandler;
|
private Thread.UncaughtExceptionHandler defaultHandler;
|
||||||
@@ -36,6 +39,10 @@ public class CrashHandler implements Thread.UncaughtExceptionHandler {
|
|||||||
|
|
||||||
private void restartApp() {
|
private void restartApp() {
|
||||||
// 实现应用重启逻辑
|
// 实现应用重启逻辑
|
||||||
ARouter.getInstance().build(ARouteConstants.ME).navigation();
|
// ARouter.getInstance().build(ARouteConstants.ME).navigation();
|
||||||
|
|
||||||
|
Intent intent = new Intent("com.qxcm.qxlive.LAUNCH_PAGE");
|
||||||
|
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||||
|
startActivity(intent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,12 +49,24 @@ public class DateSelectDialog extends BaseBottomSheetDialog<MeDialogDateSelectBi
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void initData() {
|
public void initData() {
|
||||||
|
// setYear();
|
||||||
|
// mBinding.pickerViewYear.setSelectedItemPosition(yearList.size());
|
||||||
|
// setMonth(TimeUtils.getYear());
|
||||||
|
// mBinding.pickerViewMonth.setSelectedItemPosition(monthList.size());
|
||||||
|
// setDay(TimeUtils.getYear(), TimeUtils.getMonth());
|
||||||
|
// mBinding.pickerViewDay.setSelectedItemPosition(dayList.size());
|
||||||
|
|
||||||
setYear();
|
setYear();
|
||||||
mBinding.pickerViewYear.setSelectedItemPosition(yearList.size());
|
int defaultYearPos = yearList.size() - 1; // 默认选中最新的年份(16年前)
|
||||||
setMonth(TimeUtils.getYear());
|
mBinding.pickerViewYear.setSelectedItemPosition(defaultYearPos);
|
||||||
mBinding.pickerViewMonth.setSelectedItemPosition(monthList.size());
|
|
||||||
setDay(TimeUtils.getYear(), TimeUtils.getMonth());
|
// 获取默认年份
|
||||||
mBinding.pickerViewDay.setSelectedItemPosition(dayList.size());
|
int defaultYear = yearList.get(defaultYearPos).getDate();
|
||||||
|
setMonth(defaultYear);
|
||||||
|
mBinding.pickerViewMonth.setSelectedItemPosition(0);
|
||||||
|
|
||||||
|
setDay(defaultYear, 1);
|
||||||
|
mBinding.pickerViewDay.setSelectedItemPosition(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setData(String y, String m, String d) {
|
public void setData(String y, String m, String d) {
|
||||||
@@ -124,41 +136,88 @@ public class DateSelectDialog extends BaseBottomSheetDialog<MeDialogDateSelectBi
|
|||||||
|
|
||||||
|
|
||||||
private List<DateBean> getDay(int year, int month) {
|
private List<DateBean> getDay(int year, int month) {
|
||||||
int day = TimeUtils.getDaysByYearMonth(year, month);
|
// int day = TimeUtils.getDaysByYearMonth(year, month);
|
||||||
if (year == TimeUtils.getYear() && month == TimeUtils.getMonth()) {
|
// if (year == TimeUtils.getYear() && month == TimeUtils.getMonth()) {
|
||||||
day = TimeUtils.getDay();
|
// day = TimeUtils.getDay();
|
||||||
|
// }
|
||||||
|
// List<DateBean> dayList = new ArrayList<>();
|
||||||
|
// for (int i = 1; i <= day; i++) {
|
||||||
|
// if (i <= 9) {
|
||||||
|
// dayList.add(new DateBean("0" + i, i));
|
||||||
|
// } else {
|
||||||
|
// dayList.add(new DateBean(String.valueOf(i), i));
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
int dayLimit = TimeUtils.getDaysByYearMonth(year, month);
|
||||||
|
int currentYear = TimeUtils.getYear();
|
||||||
|
int currentMonth = TimeUtils.getMonth();
|
||||||
|
int currentDay = TimeUtils.getDay();
|
||||||
|
|
||||||
|
// 如果是最大年份且是最大月份,则日期不能超过当前日期
|
||||||
|
if (year == currentYear - 16 && month == currentMonth) {
|
||||||
|
dayLimit = currentDay;
|
||||||
}
|
}
|
||||||
|
|
||||||
List<DateBean> dayList = new ArrayList<>();
|
List<DateBean> dayList = new ArrayList<>();
|
||||||
for (int i = 1; i <= day; i++) {
|
for (int i = 1; i <= dayLimit; i++) {
|
||||||
if (i <= 9) {
|
if (i <= 9) {
|
||||||
dayList.add(new DateBean("0" + i, i));
|
dayList.add(new DateBean("0" + i, i));
|
||||||
} else {
|
} else {
|
||||||
dayList.add(new DateBean(String.valueOf(i), i));
|
dayList.add(new DateBean(String.valueOf(i), i));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return dayList;
|
return dayList;
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<DateBean> getMonth(int year) {
|
private List<DateBean> getMonth(int year) {
|
||||||
List<DateBean> mothList = new ArrayList<>();
|
// List<DateBean> mothList = new ArrayList<>();
|
||||||
int month = 12;
|
// int month = 12;
|
||||||
if (year == TimeUtils.getYear()) {
|
// if (year == TimeUtils.getYear()) {
|
||||||
month = TimeUtils.getMonth();
|
// month = TimeUtils.getMonth();
|
||||||
|
// }
|
||||||
|
// for (int i = 1; i <= month; i++) {
|
||||||
|
// if (i <= 9) {
|
||||||
|
// mothList.add(new DateBean("0" + i, i));
|
||||||
|
// } else {
|
||||||
|
// mothList.add(new DateBean(String.valueOf(i), i));
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
List<DateBean> monthList = new ArrayList<>();
|
||||||
|
int currentYear = TimeUtils.getYear();
|
||||||
|
int currentMonth = TimeUtils.getMonth();
|
||||||
|
|
||||||
|
int monthLimit = 12;
|
||||||
|
// 如果是最大年份(16年前),则月份不能超过当前月份
|
||||||
|
if (year == currentYear - 16) {
|
||||||
|
monthLimit = currentMonth;
|
||||||
}
|
}
|
||||||
for (int i = 1; i <= month; i++) {
|
|
||||||
|
for (int i = 1; i <= monthLimit; i++) {
|
||||||
if (i <= 9) {
|
if (i <= 9) {
|
||||||
mothList.add(new DateBean("0" + i, i));
|
monthList.add(new DateBean("0" + i, i));
|
||||||
} else {
|
} else {
|
||||||
mothList.add(new DateBean(String.valueOf(i), i));
|
monthList.add(new DateBean(String.valueOf(i), i));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return mothList;
|
return monthList;
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<DateBean> getYear() {
|
private List<DateBean> getYear() {
|
||||||
int year = TimeUtils.getYear();
|
// int year = TimeUtils.getYear();
|
||||||
|
// List<DateBean> yearList = new ArrayList<>();
|
||||||
|
// for (int i = 1900; i <= year; i++) {
|
||||||
|
// yearList.add(new DateBean(String.valueOf(i), i));
|
||||||
|
// }
|
||||||
|
// return yearList;
|
||||||
|
|
||||||
|
int currentYear = TimeUtils.getYear();
|
||||||
|
int minYear = currentYear - 100; // 最小年份设为100年前
|
||||||
|
int maxYear = currentYear - 16; // 最大年份设为16年前
|
||||||
|
|
||||||
List<DateBean> yearList = new ArrayList<>();
|
List<DateBean> yearList = new ArrayList<>();
|
||||||
for (int i = 1900; i <= year; i++) {
|
for (int i = minYear; i <= maxYear; i++) {
|
||||||
yearList.add(new DateBean(String.valueOf(i), i));
|
yearList.add(new DateBean(String.valueOf(i), i));
|
||||||
}
|
}
|
||||||
return yearList;
|
return yearList;
|
||||||
|
|||||||
@@ -196,6 +196,21 @@ public class ImageUtils {
|
|||||||
}
|
}
|
||||||
Glide.with(mImageView).load(path).error(R.mipmap.default_avatar).placeholder(R.mipmap.default_avatar).centerCrop().diskCacheStrategy(DiskCacheStrategy.ALL).into(mImageView);
|
Glide.with(mImageView).load(path).error(R.mipmap.default_avatar).placeholder(R.mipmap.default_avatar).centerCrop().diskCacheStrategy(DiskCacheStrategy.ALL).into(mImageView);
|
||||||
|
|
||||||
|
}
|
||||||
|
public static void loadHeadCCTask(String path, ImageView mImageView,int errorImage) {
|
||||||
|
if (mImageView == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Context context = mImageView.getContext();
|
||||||
|
if (context instanceof android.app.Activity) {
|
||||||
|
android.app.Activity activity = (android.app.Activity) context;
|
||||||
|
if (activity.isFinishing() || (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1 && activity.isDestroyed())) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Glide.with(mImageView).load(path).error(errorImage).placeholder(errorImage).centerCrop().diskCacheStrategy(DiskCacheStrategy.ALL).into(mImageView);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void loadCompressImg(String path, ImageView mImageView, int width, int height) {
|
public static void loadCompressImg(String path, ImageView mImageView, int width, int height) {
|
||||||
|
|||||||
@@ -0,0 +1,129 @@
|
|||||||
|
package com.xscm.moduleutil.utils;
|
||||||
|
|
||||||
|
import android.Manifest;
|
||||||
|
import android.graphics.Color;
|
||||||
|
import android.text.Spannable;
|
||||||
|
import android.text.SpannableStringBuilder;
|
||||||
|
import android.text.TextUtils;
|
||||||
|
import android.text.style.AbsoluteSizeSpan;
|
||||||
|
import android.text.style.ForegroundColorSpan;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.RelativeLayout;
|
||||||
|
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||||
|
import androidx.constraintlayout.widget.ConstraintSet;
|
||||||
|
import androidx.core.content.ContextCompat;
|
||||||
|
import androidx.fragment.app.Fragment;
|
||||||
|
import com.luck.picture.lib.interfaces.OnPermissionDescriptionListener;
|
||||||
|
import com.luck.picture.lib.permissions.PermissionConfig;
|
||||||
|
import com.luck.picture.lib.utils.DensityUtil;
|
||||||
|
import com.luck.picture.lib.widget.MediumBoldTextView;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* com.xscm.moduleutil.utils
|
||||||
|
* qx
|
||||||
|
* 2025/10/30
|
||||||
|
*/
|
||||||
|
// PermissionDescriptionHelper.java
|
||||||
|
public class PermissionDescriptionHelper {
|
||||||
|
private static final String TAG_EXPLAIN_VIEW = "TAG_EXPLAIN_VIEW";
|
||||||
|
|
||||||
|
public static class PermissionDescriptionListener implements OnPermissionDescriptionListener {
|
||||||
|
@Override
|
||||||
|
public void onPermissionDescription(Fragment fragment, String[] permissionArray) {
|
||||||
|
View rootView = fragment.requireView();
|
||||||
|
if (rootView instanceof ViewGroup) {
|
||||||
|
addPermissionDescription(false, (ViewGroup) rootView, permissionArray);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDismiss(Fragment fragment) {
|
||||||
|
removePermissionDescription((ViewGroup) fragment.requireView());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static OnPermissionDescriptionListener createListener() {
|
||||||
|
return new PermissionDescriptionListener();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void addPermissionDescription(boolean isHasSimpleXCamera, ViewGroup viewGroup, String[] permissionArray) {
|
||||||
|
int dp10 = DensityUtil.dip2px(viewGroup.getContext(), 10);
|
||||||
|
int dp15 = DensityUtil.dip2px(viewGroup.getContext(), 15);
|
||||||
|
MediumBoldTextView view = new MediumBoldTextView(viewGroup.getContext());
|
||||||
|
view.setTag(TAG_EXPLAIN_VIEW);
|
||||||
|
view.setTextSize(14);
|
||||||
|
view.setTextColor(Color.parseColor("#333333"));
|
||||||
|
view.setPadding(dp10, dp15, dp10, dp15);
|
||||||
|
view.setBackgroundColor(Color.WHITE); // 添加背景色确保可见
|
||||||
|
|
||||||
|
String title;
|
||||||
|
String explain;
|
||||||
|
|
||||||
|
if (TextUtils.equals(permissionArray[0], PermissionConfig.CAMERA[0])) {
|
||||||
|
title = "相机权限使用说明";
|
||||||
|
explain = "相机权限使用说明\n用户app用于拍照/录视频";
|
||||||
|
} else if (TextUtils.equals(permissionArray[0], Manifest.permission.RECORD_AUDIO)) {
|
||||||
|
if (isHasSimpleXCamera) {
|
||||||
|
title = "麦克风权限使用说明";
|
||||||
|
explain = "麦克风权限使用说明\n用户app用于录视频时采集声音";
|
||||||
|
} else {
|
||||||
|
title = "录音权限使用说明";
|
||||||
|
explain = "录音权限使用说明\n用户app用于采集声音";
|
||||||
|
}
|
||||||
|
}else if (TextUtils.equals(permissionArray[0], Manifest.permission.ACCESS_FINE_LOCATION)){
|
||||||
|
title = "定位权限";
|
||||||
|
explain = "定位权限使用说明\n用户app获取当前位置,方便更好的推荐附近玩乐";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
title = "存储权限使用说明";
|
||||||
|
explain = "存储权限使用说明\n用户app写入/下载/保存/读取/修改/删除图片、视频、文件等信息";
|
||||||
|
}
|
||||||
|
int startIndex = 0;
|
||||||
|
int endOf = startIndex + title.length();
|
||||||
|
SpannableStringBuilder builder = new SpannableStringBuilder(explain);
|
||||||
|
builder.setSpan(new AbsoluteSizeSpan(DensityUtil.dip2px(viewGroup.getContext(), 16)), startIndex, endOf, Spannable.SPAN_INCLUSIVE_EXCLUSIVE);
|
||||||
|
builder.setSpan(new ForegroundColorSpan(0xFF333333), startIndex, endOf, Spannable.SPAN_INCLUSIVE_EXCLUSIVE);
|
||||||
|
view.setText(builder);
|
||||||
|
view.setBackground(ContextCompat.getDrawable(viewGroup.getContext(), com.xscm.moduleutil.R.drawable.ps_demo_permission_desc_bg));
|
||||||
|
|
||||||
|
// 确保视图可见
|
||||||
|
view.setVisibility(View.VISIBLE);
|
||||||
|
view.setZ(9999); // 提高Z轴确保在最上层
|
||||||
|
|
||||||
|
if (isHasSimpleXCamera) {
|
||||||
|
RelativeLayout.LayoutParams layoutParams =
|
||||||
|
new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.WRAP_CONTENT);
|
||||||
|
layoutParams.topMargin = DensityUtil.getStatusBarHeight(viewGroup.getContext());
|
||||||
|
layoutParams.leftMargin = dp10;
|
||||||
|
layoutParams.rightMargin = dp10;
|
||||||
|
viewGroup.addView(view, layoutParams);
|
||||||
|
} else {
|
||||||
|
ConstraintLayout.LayoutParams layoutParams =
|
||||||
|
new ConstraintLayout.LayoutParams(ConstraintLayout.LayoutParams.MATCH_PARENT, ConstraintLayout.LayoutParams.WRAP_CONTENT);
|
||||||
|
// 修改约束设置,确保视图位置正确
|
||||||
|
layoutParams.topToTop = ConstraintSet.PARENT_ID;
|
||||||
|
layoutParams.leftToLeft = ConstraintSet.PARENT_ID;
|
||||||
|
layoutParams.rightToRight = ConstraintSet.PARENT_ID;
|
||||||
|
layoutParams.leftMargin = dp10;
|
||||||
|
layoutParams.rightMargin = dp10;
|
||||||
|
layoutParams.topMargin = DensityUtil.dip2px(viewGroup.getContext(), 50);
|
||||||
|
viewGroup.addView(view, layoutParams);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 强制刷新布局
|
||||||
|
viewGroup.requestLayout();
|
||||||
|
viewGroup.postInvalidate();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void removePermissionDescription(ViewGroup viewGroup) {
|
||||||
|
if (viewGroup != null) {
|
||||||
|
View tagExplainView = viewGroup.findViewWithTag(TAG_EXPLAIN_VIEW);
|
||||||
|
if (tagExplainView != null) {
|
||||||
|
viewGroup.removeView(tagExplainView);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@@ -32,4 +32,6 @@ public class SPConstants {
|
|||||||
public static final String USER_INFO = "userInfo";
|
public static final String USER_INFO = "userInfo";
|
||||||
|
|
||||||
public static final String FLOATING_SCREEN = "floatingScreen";
|
public static final String FLOATING_SCREEN = "floatingScreen";
|
||||||
|
|
||||||
|
public static final String SHELF="shelf";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -323,6 +323,14 @@ public class SpUtil {
|
|||||||
SPUtils.getInstance(SPConstants.PREFERENCE_NAME).put(SPConstants.EMQTT_CLIENT_ID, clientId);
|
SPUtils.getInstance(SPConstants.PREFERENCE_NAME).put(SPConstants.EMQTT_CLIENT_ID, clientId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void setShelf(int shelf){
|
||||||
|
SPUtils.getInstance(SPConstants.PREFERENCE_NAME).put(SPConstants.SHELF, shelf);
|
||||||
|
}
|
||||||
|
public static int getShelf(){
|
||||||
|
int shelf=SPUtils.getInstance(SPConstants.PREFERENCE_NAME).getInt(SPConstants.SHELF);
|
||||||
|
return shelf;
|
||||||
|
}
|
||||||
|
|
||||||
public static String getEmqttId() {
|
public static String getEmqttId() {
|
||||||
String s = SPUtils.getInstance(SPConstants.PREFERENCE_NAME).getString(SPConstants.EMQTT_CLIENT_ID);
|
String s = SPUtils.getInstance(SPConstants.PREFERENCE_NAME).getString(SPConstants.EMQTT_CLIENT_ID);
|
||||||
return s;
|
return s;
|
||||||
|
|||||||
@@ -14,9 +14,10 @@ public enum EnvironmentEnum {
|
|||||||
1600096860,
|
1600096860,
|
||||||
"3e8f3add448d4692bc1d04c75ffe801b",
|
"3e8f3add448d4692bc1d04c75ffe801b",
|
||||||
"tcp://81.70.45.221",
|
"tcp://81.70.45.221",
|
||||||
"https://vespa.qxyushen.top/h5"),
|
"https://vespa.qxyushen.top/h5",
|
||||||
|
0),
|
||||||
TEST(//测试环境
|
TEST(//测试环境
|
||||||
"http://tmd.xscmmidi.site/",
|
"https://test.vespa.qxyushen.top/",
|
||||||
"6rdWuz058oq5OahdbFiGEybUcdahd12J83L34Uc7MrPIrxtFG+rXiwDvRcqNvjwbClbbmvMrmxKVkIysFByBsl0Qe9kqd2w8T/nhK5G6eXXlk2V9AjYCieIU+jRnjZBB+Cfechr6rCGJ2aeBARIsXcRPW7wm9WFK9euh5T+v6Pyte68yNaNdcYCll3+U4/uCEog7HygCnMIbAU+kqoPdmn2H+51YOHW+VsnsHd4w1+I3f8Tt0xLIXGM4GWnQueZ5GR46GTWiSYMy8dCIh9SPIMRyC91GosVcfGPMJSdcXqc=",
|
"6rdWuz058oq5OahdbFiGEybUcdahd12J83L34Uc7MrPIrxtFG+rXiwDvRcqNvjwbClbbmvMrmxKVkIysFByBsl0Qe9kqd2w8T/nhK5G6eXXlk2V9AjYCieIU+jRnjZBB+Cfechr6rCGJ2aeBARIsXcRPW7wm9WFK9euh5T+v6Pyte68yNaNdcYCll3+U4/uCEog7HygCnMIbAU+kqoPdmn2H+51YOHW+VsnsHd4w1+I3f8Tt0xLIXGM4GWnQueZ5GR46GTWiSYMy8dCIh9SPIMRyC91GosVcfGPMJSdcXqc=",
|
||||||
"https://oss-cn-beijing.aliyuncs.com/",
|
"https://oss-cn-beijing.aliyuncs.com/",
|
||||||
"LTAI5tKgrfcFQxH46ZwWYgFW",
|
"LTAI5tKgrfcFQxH46ZwWYgFW",
|
||||||
@@ -27,7 +28,8 @@ public enum EnvironmentEnum {
|
|||||||
1600096890,
|
1600096890,
|
||||||
"02f7339ec98947deaeab173599891932",
|
"02f7339ec98947deaeab173599891932",
|
||||||
"tcp://1.13.181.248",
|
"tcp://1.13.181.248",
|
||||||
"https://tmd.xscmmidi.site/h5");
|
"https://test.vespa.qxyushen.top/h5",
|
||||||
|
1);
|
||||||
|
|
||||||
private final String serverUrl;//服务器地址
|
private final String serverUrl;//服务器地址
|
||||||
private final String ALI_AUTH_KEY;//阿里云授权key
|
private final String ALI_AUTH_KEY;//阿里云授权key
|
||||||
@@ -47,10 +49,11 @@ public enum EnvironmentEnum {
|
|||||||
private final String mqttUrl;//MQTT服务器地址
|
private final String mqttUrl;//MQTT服务器地址
|
||||||
|
|
||||||
private final String H5Url;//h5地址
|
private final String H5Url;//h5地址
|
||||||
|
private final int shelf;//是否上架,0:平台更新,1:上架,发布到对应的应用商城,上架的初始是没有趣味的,需要点击6次才可以打开趣味
|
||||||
|
|
||||||
EnvironmentEnum(String serverUrl, String ALI_AUTH_KEY, String ossEndPoint, String ossaAcessKeyId,
|
EnvironmentEnum(String serverUrl, String ALI_AUTH_KEY, String ossEndPoint, String ossaAcessKeyId,
|
||||||
String ossAccessKeySecret, String ossBucketName, String ossBaseUrl, String wxAppId,
|
String ossAccessKeySecret, String ossBucketName, String ossBaseUrl, String wxAppId,
|
||||||
int sdkAppId, String swSdkAppId,String mqttUrl,String H5Url) {
|
int sdkAppId, String swSdkAppId,String mqttUrl,String H5Url,int shelf) {
|
||||||
this.serverUrl = serverUrl;
|
this.serverUrl = serverUrl;
|
||||||
this.ALI_AUTH_KEY = ALI_AUTH_KEY;
|
this.ALI_AUTH_KEY = ALI_AUTH_KEY;
|
||||||
this.ossEndPoint = ossEndPoint;
|
this.ossEndPoint = ossEndPoint;
|
||||||
@@ -63,6 +66,11 @@ public enum EnvironmentEnum {
|
|||||||
this.swSdkAppId = swSdkAppId;
|
this.swSdkAppId = swSdkAppId;
|
||||||
this.mqttUrl = mqttUrl;
|
this.mqttUrl = mqttUrl;
|
||||||
this.H5Url = H5Url;
|
this.H5Url = H5Url;
|
||||||
|
this.shelf = shelf;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getShelf() {
|
||||||
|
return shelf;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getH5Url() {
|
public String getH5Url() {
|
||||||
|
|||||||
@@ -30,26 +30,6 @@ public class EnvironmentPrefs {
|
|||||||
|
|
||||||
// 获取当前选择的环境,默认根据构建变体决定
|
// 获取当前选择的环境,默认根据构建变体决定
|
||||||
public EnvironmentEnum getSelectedEnvironment() {
|
public EnvironmentEnum getSelectedEnvironment() {
|
||||||
// // 检查是否是debug版本(开发版本)
|
|
||||||
// if (BuildConfig.DEBUG) {
|
|
||||||
// return EnvironmentEnum.TEST;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// // 检查flavor类型
|
|
||||||
// if ("dev".equals(BuildConfig.FLAVOR)) {
|
|
||||||
// return EnvironmentEnum.TEST;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// // 检查包名判断是否为开发版本
|
|
||||||
// try {
|
|
||||||
// String packageName = CommonAppContext.getInstance().getPackageName();
|
|
||||||
// if (packageName.contains(".test") || packageName.contains(".dev")) {
|
|
||||||
// return EnvironmentEnum.TEST;
|
|
||||||
// }
|
|
||||||
// } catch (Exception e) {
|
|
||||||
// // 忽略异常
|
|
||||||
// }
|
|
||||||
|
|
||||||
// 默认使用生产环境
|
// 默认使用生产环境
|
||||||
String envName = sharedPreferences.getString(KEY_ENV, EnvironmentEnum.PRODUCTION.name());
|
String envName = sharedPreferences.getString(KEY_ENV, EnvironmentEnum.PRODUCTION.name());
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ public class GmsLocationProvider implements LocationProvider {
|
|||||||
callback.onFailed("无法获取位置");
|
callback.onFailed("无法获取位置");
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.addOnFailureListener(e -> callback.onFailed("Google Play 定位失败:" + e.getMessage()));
|
.addOnFailureListener(e -> callback.onFailed("Google Play 定位失败:" ));
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressLint("MissingPermission")
|
@SuppressLint("MissingPermission")
|
||||||
|
|||||||
@@ -0,0 +1,57 @@
|
|||||||
|
package com.xscm.moduleutil.utils.logger;
|
||||||
|
|
||||||
|
import okhttp3.HttpUrl;
|
||||||
|
import okhttp3.Interceptor;
|
||||||
|
import okhttp3.Request;
|
||||||
|
import okhttp3.Response;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* com.xscm.moduleutil.utils.logger
|
||||||
|
* qx
|
||||||
|
* 2025/11/6
|
||||||
|
*/
|
||||||
|
public class BaseUrlSwitcherInterceptor implements Interceptor {
|
||||||
|
private List<String> baseUrls;
|
||||||
|
private int currentIndex = 0;
|
||||||
|
|
||||||
|
public BaseUrlSwitcherInterceptor(List<String> baseUrls) {
|
||||||
|
this.baseUrls = baseUrls;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Response intercept(Chain chain) throws IOException {
|
||||||
|
Request request = chain.request();
|
||||||
|
HttpUrl originalHttpUrl = request.url();
|
||||||
|
|
||||||
|
// 获取当前应该使用的 baseUrl
|
||||||
|
String currentBaseUrl = baseUrls.get(currentIndex);
|
||||||
|
HttpUrl newBaseUrl = HttpUrl.parse(currentBaseUrl);
|
||||||
|
|
||||||
|
if (newBaseUrl == null) {
|
||||||
|
throw new IllegalArgumentException("Invalid base url: " + currentBaseUrl);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 构建新的 HttpUrl
|
||||||
|
HttpUrl newUrl = originalHttpUrl.newBuilder()
|
||||||
|
.scheme(newBaseUrl.scheme())
|
||||||
|
.host(newBaseUrl.host())
|
||||||
|
.port(newBaseUrl.port())
|
||||||
|
.build();
|
||||||
|
|
||||||
|
Request.Builder builder = request.newBuilder().url(newUrl);
|
||||||
|
Request newRequest = builder.build();
|
||||||
|
|
||||||
|
// 尝试执行请求
|
||||||
|
try {
|
||||||
|
return chain.proceed(newRequest);
|
||||||
|
} catch (IOException e) {
|
||||||
|
// 如果请求失败,则切换到下一个 baseUrl 并重试
|
||||||
|
currentIndex = (currentIndex + 1) % baseUrls.size();
|
||||||
|
return intercept(chain); // 递归调用重新构建请求
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -133,8 +133,28 @@ public class RoomDefaultWheatView extends BaseWheatView {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// setCardiac(pitBean.getPit_number(), 0.0f);
|
// setCardiac(pitBean.getPit_number(), 0.0f);
|
||||||
}
|
|
||||||
|
|
||||||
|
updatePkState(bean);
|
||||||
|
}
|
||||||
|
private void updatePkState(RoomPitBean bean) {
|
||||||
|
if (bean.is_pk()) {
|
||||||
|
String userId = bean.getUser_id();
|
||||||
|
if (userId != null && !userId.equals("0") && !userId.isEmpty()) {
|
||||||
|
tv_time_pk.setVisibility(VISIBLE);
|
||||||
|
setSex(bean.getCharm(), false);
|
||||||
|
mCharmView.setVisibility(GONE);
|
||||||
|
} else {
|
||||||
|
tv_time_pk.setVisibility(GONE);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
tv_time_pk.setVisibility(GONE);
|
||||||
|
if (isOn()) {
|
||||||
|
mCharmView.setVisibility(VISIBLE);
|
||||||
|
}else {
|
||||||
|
mCharmView.setVisibility(GONE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
public void setSex(String value, boolean format) {
|
public void setSex(String value, boolean format) {
|
||||||
if (format) {
|
if (format) {
|
||||||
tv_time_pk.setText(value);
|
tv_time_pk.setText(value);
|
||||||
@@ -153,6 +173,10 @@ public class RoomDefaultWheatView extends BaseWheatView {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setTv_time_pk(boolean show){
|
||||||
|
tv_time_pk.setVisibility(show?VISIBLE:GONE);
|
||||||
|
}
|
||||||
|
|
||||||
private boolean showSexIcon = false;
|
private boolean showSexIcon = false;
|
||||||
private String sex;
|
private String sex;
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import android.widget.LinearLayout;
|
|||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
import com.xscm.moduleutil.R;
|
import com.xscm.moduleutil.R;
|
||||||
|
import com.xscm.moduleutil.bean.RoomMessageEvent;
|
||||||
import com.xscm.moduleutil.bean.UserOnlineStatusBean;
|
import com.xscm.moduleutil.bean.UserOnlineStatusBean;
|
||||||
import com.xscm.moduleutil.bean.room.RoomPitBean;
|
import com.xscm.moduleutil.bean.room.RoomPitBean;
|
||||||
|
|
||||||
@@ -170,6 +171,9 @@ public class WheatLayoutManager {
|
|||||||
|
|
||||||
private void addWheatViewItem(LinearLayout row, int pitNumber, int itemWidth, int layoutType) {
|
private void addWheatViewItem(LinearLayout row, int pitNumber, int itemWidth, int layoutType) {
|
||||||
RoomDefaultWheatView wheatView = createWheatView(pitNumber);
|
RoomDefaultWheatView wheatView = createWheatView(pitNumber);
|
||||||
|
if (layoutType==2){
|
||||||
|
wheatView.setTv_time_pk(false);
|
||||||
|
}
|
||||||
|
|
||||||
LinearLayout.LayoutParams params;
|
LinearLayout.LayoutParams params;
|
||||||
if (pitNumber == 9 || pitNumber == 10) {
|
if (pitNumber == 9 || pitNumber == 10) {
|
||||||
@@ -226,25 +230,65 @@ public class WheatLayoutManager {
|
|||||||
DisplayMetrics metrics = context.getResources().getDisplayMetrics();
|
DisplayMetrics metrics = context.getResources().getDisplayMetrics();
|
||||||
return metrics.widthPixels;
|
return metrics.widthPixels;
|
||||||
}
|
}
|
||||||
|
public void setUpData(RoomMessageEvent event,int layoutType){
|
||||||
|
String fromPit=event.getText().getFrom_pit_number()!=null?event.getText().getFrom_pit_number():"";
|
||||||
|
String toPitNumber=event.getText().getTo_pit_number()!=null?event.getText().getTo_pit_number():"";
|
||||||
|
if (fromPit.equals("") || toPitNumber.equals("")){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
RoomDefaultWheatView fromWheatView = findWheatViewByPitNumber(Integer.parseInt(fromPit));
|
||||||
|
RoomDefaultWheatView toWheatView = findWheatViewByPitNumber(Integer.parseInt(toPitNumber));
|
||||||
|
RoomPitBean fromPitBean=fromWheatView.pitBean;
|
||||||
|
RoomPitBean toPitBean=toWheatView.pitBean;
|
||||||
|
String tmpNumber=fromPitBean.getPit_number();
|
||||||
|
fromPitBean.setPit_number(toPitBean.getPit_number());
|
||||||
|
toPitBean.setPit_number(tmpNumber);
|
||||||
|
|
||||||
|
|
||||||
public void updateSingleWheat(RoomPitBean pitBean, int pitNumber) {
|
toWheatView.setData(fromPitBean);
|
||||||
if (pitList == null || pitList.isEmpty() || pitNumber < 1 || pitNumber > 10) return;
|
fromWheatView.setData(toPitBean);
|
||||||
if (isSingleMode && this.currentSinglePit != pitNumber) return;
|
|
||||||
|
|
||||||
RoomDefaultWheatView wheatView = findWheatViewByPitNumber(pitNumber);
|
if (layoutType==2){
|
||||||
if (wheatView != null) {
|
fromWheatView.setTv_time_pk(false);
|
||||||
wheatView.setData(pitBean);
|
toWheatView.setTv_time_pk(false);
|
||||||
|
}else if (layoutType==1){
|
||||||
|
fromWheatView.setTv_time_pk(true);
|
||||||
|
toWheatView.setTv_time_pk(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateSingleCharm(RoomPitBean pitBean, int pitNumber) {
|
public void updateSingleWheat(RoomPitBean pitBean, int pitNumber,int layoutType) {
|
||||||
if (pitList == null || pitList.isEmpty() || pitNumber < 1 || pitNumber > 10) return;
|
if (pitList == null || pitList.isEmpty() || pitNumber < 1 || pitNumber > 10) return;
|
||||||
if (isSingleMode && this.currentSinglePit != pitNumber) return;
|
if (isSingleMode && this.currentSinglePit != pitNumber) return;
|
||||||
|
|
||||||
RoomDefaultWheatView wheatView = findWheatViewByPitNumber(pitNumber);
|
RoomDefaultWheatView wheatView = findWheatViewByPitNumber(pitNumber);
|
||||||
if (wheatView != null) {
|
if (wheatView != null) {
|
||||||
wheatView.setCharm(pitBean.getCharm());
|
pitBean.set_pk(true);
|
||||||
|
wheatView.setData(pitBean);
|
||||||
|
if (layoutType==2){
|
||||||
|
wheatView.setTv_time_pk(false);
|
||||||
|
}else if (layoutType==1){
|
||||||
|
wheatView.setTv_time_pk(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void updateSingleCharm(RoomPitBean pitBean, int pitNumber,int layoutType) {
|
||||||
|
if (pitList == null || pitList.isEmpty() || pitNumber < 1 || pitNumber > 10) return;
|
||||||
|
if (isSingleMode && this.currentSinglePit != pitNumber) return;
|
||||||
|
|
||||||
|
RoomDefaultWheatView wheatView = findWheatViewByPitNumber(pitNumber);
|
||||||
|
if (wheatView != null) {
|
||||||
|
RoomPitBean bean=wheatView.pitBean;
|
||||||
|
bean=pitBean ;
|
||||||
|
|
||||||
|
if (layoutType==2){
|
||||||
|
wheatView.setTv_time_pk(false);
|
||||||
|
}else if (layoutType==1){
|
||||||
|
wheatView.setTv_time_pk(true);
|
||||||
|
}
|
||||||
|
wheatView.setSex(bean.getCharm(),true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -276,7 +320,7 @@ public class WheatLayoutManager {
|
|||||||
public void refreshWheatData(List<RoomPitBean> newPitList, List<Integer> changedPits) {
|
public void refreshWheatData(List<RoomPitBean> newPitList, List<Integer> changedPits) {
|
||||||
this.pitList = newPitList;
|
this.pitList = newPitList;
|
||||||
for (int pitNumber : changedPits) {
|
for (int pitNumber : changedPits) {
|
||||||
updateSingleWheat(pitList.get(pitNumber - 1), pitNumber);
|
updateSingleWheat(pitList.get(pitNumber - 1), pitNumber,1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ import com.xscm.moduleutil.presenter.RewardGiftContacts;
|
|||||||
import com.xscm.moduleutil.presenter.RewardGiftPresenter;
|
import com.xscm.moduleutil.presenter.RewardGiftPresenter;
|
||||||
import com.xscm.moduleutil.utils.ColorManager;
|
import com.xscm.moduleutil.utils.ColorManager;
|
||||||
import com.xscm.moduleutil.utils.ImageUtils;
|
import com.xscm.moduleutil.utils.ImageUtils;
|
||||||
|
import com.xscm.moduleutil.utils.SpUtil;
|
||||||
import com.xscm.moduleutil.widget.GifAvatarOvalView;
|
import com.xscm.moduleutil.widget.GifAvatarOvalView;
|
||||||
import com.xscm.moduleutil.widget.floatingView.IFloatingView;
|
import com.xscm.moduleutil.widget.floatingView.IFloatingView;
|
||||||
|
|
||||||
@@ -201,12 +202,16 @@ public class RewardGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPr
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void getGiftLabel(List<GiftLabelBean> giftLabelBeans) {
|
public void getGiftLabel(List<GiftLabelBean> giftLabelBeans) {
|
||||||
// giftLabelBeanList = new ArrayList<>();
|
if (giftLabelBeans == null) return;
|
||||||
// giftLabelBeanList.addAll(giftLabelBeans);
|
if (SpUtil.getShelf()==1){
|
||||||
// GiftLabelBean giftLabelBean = new GiftLabelBean();
|
for (GiftLabelBean giftLabelBean1 : giftLabelBeans){
|
||||||
// giftLabelBean.setId("0");
|
if (giftLabelBean1.getId().equals("2")){
|
||||||
// giftLabelBean.setName("背包");
|
giftLabelBeans.remove(giftLabelBean1);
|
||||||
// giftLabelBeans.add(0, giftLabelBean);
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
mBinding.viewPager.setAdapter(new MyFragmentPagerAdapter(getChildFragmentManager(), giftLabelBeans,fragmentList,""));
|
mBinding.viewPager.setAdapter(new MyFragmentPagerAdapter(getChildFragmentManager(), giftLabelBeans,fragmentList,""));
|
||||||
mBinding.slidingTabLayout.setViewPager(mBinding.viewPager);
|
mBinding.slidingTabLayout.setViewPager(mBinding.viewPager);
|
||||||
mBinding.slidingTabLayout.setCurrentTab(0);
|
mBinding.slidingTabLayout.setCurrentTab(0);
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:useLevel="false">
|
||||||
|
<corners android:radius="15dp" />
|
||||||
|
<solid android:color="@color/ps_color_white" />
|
||||||
|
|
||||||
|
</shape>
|
||||||
@@ -135,16 +135,16 @@
|
|||||||
android:id="@+id/iv_frame"
|
android:id="@+id/iv_frame"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
|
android:layout_marginStart="@dimen/dp_12"
|
||||||
|
android:layout_marginTop="@dimen/dp_12"
|
||||||
|
android:layout_marginEnd="@dimen/dp_12"
|
||||||
android:adjustViewBounds="true"
|
android:adjustViewBounds="true"
|
||||||
android:scaleType="fitCenter"
|
android:scaleType="fitCenter"
|
||||||
android:visibility="gone"
|
|
||||||
tools:visibility="visible"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintDimensionRatio="1:1"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintHeight_percent="0.98"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
app:layout_constraintWidth_percent="0.98" />
|
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:id="@+id/view_riv_bottom"
|
android:id="@+id/view_riv_bottom"
|
||||||
|
|||||||
@@ -48,7 +48,7 @@
|
|||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintDimensionRatio="1:1"
|
app:layout_constraintDimensionRatio="1:1"
|
||||||
app:layout_constraintHeight_default="percent"
|
app:layout_constraintHeight_default="percent"
|
||||||
app:layout_constraintHeight_percent="0.52" />
|
app:layout_constraintHeight_percent="0.5" />
|
||||||
|
|
||||||
<com.xscm.moduleutil.widget.AvatarFrameView
|
<com.xscm.moduleutil.widget.AvatarFrameView
|
||||||
android:id="@+id/iv_frame"
|
android:id="@+id/iv_frame"
|
||||||
@@ -75,7 +75,7 @@
|
|||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintDimensionRatio="1:1"
|
app:layout_constraintDimensionRatio="1:1"
|
||||||
app:layout_constraintHeight_default="percent"
|
app:layout_constraintHeight_default="percent"
|
||||||
app:layout_constraintHeight_percent="0.5"
|
app:layout_constraintHeight_percent="0.52"
|
||||||
app:loopCount="0"
|
app:loopCount="0"
|
||||||
app:source="ripple3695.svga" />
|
app:source="ripple3695.svga" />
|
||||||
|
|
||||||
|
|||||||
@@ -20,6 +20,7 @@
|
|||||||
android:layout_marginStart="@dimen/dp_12"
|
android:layout_marginStart="@dimen/dp_12"
|
||||||
android:layout_marginTop="@dimen/dp_12"
|
android:layout_marginTop="@dimen/dp_12"
|
||||||
android:layout_marginEnd="@dimen/dp_12"
|
android:layout_marginEnd="@dimen/dp_12"
|
||||||
|
tools:background="@color/black"
|
||||||
android:adjustViewBounds="true"
|
android:adjustViewBounds="true"
|
||||||
android:scaleType="fitCenter"
|
android:scaleType="fitCenter"
|
||||||
android:src="@mipmap/room_ic_wheat_default"
|
android:src="@mipmap/room_ic_wheat_default"
|
||||||
|
|||||||
BIN
moduleUtil/src/main/res/mipmap-hdpi/accompany_off.webp
Normal file
|
After Width: | Height: | Size: 858 B |
BIN
moduleUtil/src/main/res/mipmap-hdpi/accompany_on.webp
Normal file
|
After Width: | Height: | Size: 822 B |
|
Before Width: | Height: | Size: 4.4 KiB |
BIN
moduleUtil/src/main/res/mipmap-hdpi/cp_tx_k.webp
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
moduleUtil/src/main/res/mipmap-hdpi/icon_liang.webp
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
moduleUtil/src/main/res/mipmap-hdpi/muisc_reward.webp
Normal file
|
After Width: | Height: | Size: 738 B |
BIN
moduleUtil/src/main/res/mipmap-hdpi/muisc_switch.webp
Normal file
|
After Width: | Height: | Size: 556 B |
BIN
moduleUtil/src/main/res/mipmap-hdpi/muisc_tyt.webp
Normal file
|
After Width: | Height: | Size: 692 B |
|
Before Width: | Height: | Size: 3.9 KiB |
BIN
moduleUtil/src/main/res/mipmap-hdpi/ranking_user_cp_k.webp
Normal file
|
After Width: | Height: | Size: 948 B |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 730 B |
BIN
moduleUtil/src/main/res/mipmap-xhdpi/accompany_off.webp
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
moduleUtil/src/main/res/mipmap-xhdpi/accompany_on.webp
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 5.8 KiB |
BIN
moduleUtil/src/main/res/mipmap-xhdpi/cp_tx_k.webp
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 365 B |
BIN
moduleUtil/src/main/res/mipmap-xhdpi/hourly_d.webp
Normal file
|
After Width: | Height: | Size: 212 B |
|
Before Width: | Height: | Size: 16 KiB |
BIN
moduleUtil/src/main/res/mipmap-xhdpi/hourly_xlh_status.webp
Normal file
|
After Width: | Height: | Size: 5.6 KiB |
BIN
moduleUtil/src/main/res/mipmap-xhdpi/icon_liang.webp
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
moduleUtil/src/main/res/mipmap-xhdpi/muisc_reward.webp
Normal file
|
After Width: | Height: | Size: 988 B |
BIN
moduleUtil/src/main/res/mipmap-xhdpi/muisc_switch.webp
Normal file
|
After Width: | Height: | Size: 646 B |
BIN
moduleUtil/src/main/res/mipmap-xhdpi/muisc_tyt.webp
Normal file
|
After Width: | Height: | Size: 754 B |
|
Before Width: | Height: | Size: 6.0 KiB |
BIN
moduleUtil/src/main/res/mipmap-xhdpi/ranking_user_cp_k.webp
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 3.6 KiB |
BIN
moduleUtil/src/main/res/mipmap-xhdpi/top1.webp
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 3.4 KiB |
BIN
moduleUtil/src/main/res/mipmap-xhdpi/top2.webp
Normal file
|
After Width: | Height: | Size: 848 B |
|
Before Width: | Height: | Size: 4.0 KiB |
BIN
moduleUtil/src/main/res/mipmap-xhdpi/top3.webp
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
moduleUtil/src/main/res/mipmap-xxhdpi/accompany_off.webp
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
moduleUtil/src/main/res/mipmap-xxhdpi/accompany_on.webp
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 12 KiB |
BIN
moduleUtil/src/main/res/mipmap-xxhdpi/cp_tx_k.webp
Normal file
|
After Width: | Height: | Size: 4.6 KiB |
|
Before Width: | Height: | Size: 13 KiB |
BIN
moduleUtil/src/main/res/mipmap-xxhdpi/dcl.webp
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 23 KiB |
BIN
moduleUtil/src/main/res/mipmap-xxhdpi/dcl2.webp
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 24 KiB |
BIN
moduleUtil/src/main/res/mipmap-xxhdpi/dcl3.webp
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 24 KiB |
BIN
moduleUtil/src/main/res/mipmap-xxhdpi/dcl4.webp
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 24 KiB |
BIN
moduleUtil/src/main/res/mipmap-xxhdpi/dcl5.webp
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 23 KiB |
BIN
moduleUtil/src/main/res/mipmap-xxhdpi/dcl6.webp
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 9.8 KiB |
BIN
moduleUtil/src/main/res/mipmap-xxhdpi/hourly_djs.webp
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.0 KiB |
BIN
moduleUtil/src/main/res/mipmap-xxhdpi/hourly_num.webp
Normal file
|
After Width: | Height: | Size: 544 B |