修改可以使用
4
.idea/deploymentTargetSelector.xml
generated
@@ -4,10 +4,10 @@
|
||||
<selectionStates>
|
||||
<SelectionState runConfigName="app">
|
||||
<option name="selectionMode" value="DROPDOWN" />
|
||||
<DropdownSelection timestamp="2025-07-12T10:18:24.878545400Z">
|
||||
<DropdownSelection timestamp="2025-07-15T14:54:48.221182200Z">
|
||||
<Target type="DEFAULT_BOOT">
|
||||
<handle>
|
||||
<DeviceId pluginId="PhysicalDevice" identifier="serial=6705124a" />
|
||||
<DeviceId pluginId="Default" identifier="serial=emulator-5554;connection=9cfa89a5" />
|
||||
</handle>
|
||||
</Target>
|
||||
</DropdownSelection>
|
||||
|
||||
3
.idea/gradle.xml
generated
@@ -4,9 +4,8 @@
|
||||
<component name="GradleSettings">
|
||||
<option name="linkedExternalProjectsSettings">
|
||||
<GradleProjectSettings>
|
||||
<option name="testRunner" value="CHOOSE_PER_TEST" />
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||
<option name="gradleJvm" value="ms-17" />
|
||||
<option name="gradleJvm" value="jbr-17" />
|
||||
<option name="modules">
|
||||
<set>
|
||||
<option value="$PROJECT_DIR$" />
|
||||
|
||||
16964
app/proguard/mapping.txt
514785
app/proguard/seeds.txt
@@ -11,9 +11,9 @@
|
||||
"type": "SINGLE",
|
||||
"filters": [],
|
||||
"attributes": [],
|
||||
"versionCode": 5,
|
||||
"versionName": "1.0.4",
|
||||
"outputFile": "羽声_1.0.4_5.apk"
|
||||
"versionCode": 6,
|
||||
"versionName": "1.0.5",
|
||||
"outputFile": "羽声_1.0.5_6.apk"
|
||||
}
|
||||
],
|
||||
"elementType": "File",
|
||||
@@ -22,14 +22,14 @@
|
||||
"minApi": 28,
|
||||
"maxApi": 30,
|
||||
"baselineProfiles": [
|
||||
"baselineProfiles/1/羽声_1.0.4_5.dm"
|
||||
"baselineProfiles/1/羽声_1.0.5_6.dm"
|
||||
]
|
||||
},
|
||||
{
|
||||
"minApi": 31,
|
||||
"maxApi": 2147483647,
|
||||
"baselineProfiles": [
|
||||
"baselineProfiles/0/羽声_1.0.4_5.dm"
|
||||
"baselineProfiles/0/羽声_1.0.5_6.dm"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
@@ -129,6 +129,7 @@
|
||||
tools:ignore="SelectedPhotoAccess"
|
||||
tools:replace="android:theme,android:allowBackup"
|
||||
android:enableOnBackInvokedCallback="true"
|
||||
|
||||
>
|
||||
<activity
|
||||
android:name=".LaunchPageActivity"
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package com.qxcm.qxlive;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.blankj.utilcode.util.ServiceUtils;
|
||||
import com.hjq.toast.ToastUtils;
|
||||
import com.qxcm.moduleutil.utils.config.EnvironmentEnum;
|
||||
import com.qxcm.moduleutil.utils.config.EnvironmentPrefs;
|
||||
import com.qxcm.moduleutil.base.CommonAppContext;
|
||||
import com.qxcm.moduleutil.service.MyMqttService;
|
||||
|
||||
|
||||
/**
|
||||
@@ -20,6 +20,20 @@ public class AppContext extends CommonAppContext {
|
||||
super.onCreate();
|
||||
ToastUtils.init(this);
|
||||
ARouter.init(this);
|
||||
// ServiceUtils.startService(MyMqttService.class);/**/
|
||||
|
||||
/* mqttClient = MyMQTTClient.getInstance(this);
|
||||
mqttClient.initialize("tcp://81.70.45.221:1883");
|
||||
new Thread(() -> {
|
||||
boolean connected = mqttClient.connect();
|
||||
runOnUiThread(() -> {
|
||||
if (connected) {
|
||||
} else {
|
||||
com.blankj.utilcode.util.ToastUtils.showShort("MQTT连接失败");
|
||||
}
|
||||
});
|
||||
}).start();*/
|
||||
|
||||
// ToastUtils.setInterceptor(new IToastInterceptor() {
|
||||
// @Override
|
||||
// public boolean intercept(CharSequence charSequence) {
|
||||
|
||||
@@ -14,7 +14,7 @@ buildscript {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:7.4.2' // 或你使用的 Android Gradle 插件版本
|
||||
classpath libs.gradle // 或你使用的 Android Gradle 插件版本
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
|
||||
// ✅ 添加 ARouter 插件依赖
|
||||
|
||||
@@ -29,14 +29,14 @@ org.gradle.parallel=false
|
||||
org.gradle.deamon=false
|
||||
android.injected.testOnly=false
|
||||
|
||||
APP_VERSION_NAME=1.0.4
|
||||
APP_VERSION_CODE=5
|
||||
APP_VERSION_NAME=1.0.5
|
||||
APP_VERSION_CODE=6
|
||||
|
||||
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
|
||||
|
||||
|
||||
android.enableR8=true
|
||||
#android.enableR8=true
|
||||
#isModule
|
||||
modulevoice=false
|
||||
# <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ<EFBFBD><CABD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[versions]
|
||||
agp = "8.8.0"
|
||||
agp = "8.4.0"
|
||||
alipayAlipaysdkAndroid = "15.8.33"
|
||||
arouterApiVersion = "1.5.2"
|
||||
comJacktuotuoCustomviewVerificationcodeview2 = "1.0.5"
|
||||
@@ -19,6 +19,7 @@ githubNiceSpinnerVersion = "1.4.4"
|
||||
githubPhotoview = "2.3.0"
|
||||
githubRealtimeblurviewVersion = "1.2.1"
|
||||
githubShadowlayout = "3.3.1"
|
||||
gradle = "8.5.0-alpha04"
|
||||
junit = "4.13.2"
|
||||
junitVersion = "1.1.5"
|
||||
espressoCore = "3.5.1"
|
||||
@@ -94,6 +95,7 @@ egame-animplayer = { module = "com.egame.vap:animplayer", version.ref = "egameAn
|
||||
github-photoview = { module = "com.github.chrisbanes:PhotoView", version.ref = "githubPhotoview" }
|
||||
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" }
|
||||
junit = { group = "junit", name = "junit", version.ref = "junit" }
|
||||
ext-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junitVersion" }
|
||||
espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" }
|
||||
|
||||
3
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,6 +1,7 @@
|
||||
#Wed May 07 09:31:48 CST 2025
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://mirrors.cloud.tencent.com/gradle/gradle-8.10.2-bin.zip
|
||||
#distributionUrl=https\://mirrors.cloud.tencent.com/gradle/gradle-8.7-all.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=file:///D:/Greadle/gradle-8.7-bin.zip
|
||||
|
||||
@@ -124,7 +124,9 @@ dependencies {
|
||||
//判断是否是模拟器
|
||||
api(libs.easy.protector.release)
|
||||
//第三方Popup
|
||||
api(libs.custompopwindow)
|
||||
// api(libs.custompopwindow)
|
||||
// api 'com.github.pinguo-zhouwei:CustomPopwindow:2.1.1'
|
||||
api 'com.example.zhouwei.library:library:1.0.0'
|
||||
// cookie
|
||||
api(libs.persistentcookiejar)
|
||||
|
||||
@@ -168,7 +170,7 @@ dependencies {
|
||||
// 集成音频 SDK声网
|
||||
// api('io.agora.rtc:voice-sdk:4.5.2')
|
||||
// api( 'io.agora.rtc:agora-special-full:4.1.1.29')
|
||||
api( 'com.github.AgoraIO-Community:LyricsView:1.1.3')
|
||||
api('com.github.AgoraIO-Community:LyricsView:1.1.3')
|
||||
//声网集成屏幕共享
|
||||
def agora_sdk_version = "4.5.2"
|
||||
api "io.agora.rtc:full-sdk:${agora_sdk_version}"
|
||||
@@ -187,7 +189,7 @@ dependencies {
|
||||
api "com.tencent.liteav:LiteAVSDK_Professional:latest.release"
|
||||
api "com.tencent.imsdk:imsdk-plus:latest.release"
|
||||
//悬浮框
|
||||
api"io.github.petterpx:floatingx:2.3.5"
|
||||
api "io.github.petterpx:floatingx:2.3.5"
|
||||
// system浮窗&&compose时需要导入 https://github.com/Petterpx/FloatingX/
|
||||
// 记得AppHelper里调用 enableComposeSupport()
|
||||
api 'io.github.petterpx:floatingx-compose:2.3.5'
|
||||
@@ -197,6 +199,12 @@ dependencies {
|
||||
// api 'org.eclipse.paho:org.eclipse.paho.mqttv5.client:1.2.5'
|
||||
api 'org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.1.1'
|
||||
api 'org.eclipse.paho:org.eclipse.paho.android.service:1.1.1'
|
||||
// api 'com.github.hannesa2:paho.mqtt.android:3.3.5'
|
||||
// api 'org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.2.5'
|
||||
|
||||
api 'org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.2.5'
|
||||
// api 'io.github.mayzs:paho.mqtt.android:1.1.2'
|
||||
|
||||
|
||||
//2. 云normal SDK,
|
||||
//aar的名称,例如:WbCloudNormal-v5.1.10-123456789.aar,填入 'WbCloudNormal-v5.1.10-123456789.aar'
|
||||
|
||||
@@ -22,11 +22,12 @@
|
||||
android:name=".activity.news.OfficialNoticeActivity"
|
||||
android:exported="false" />
|
||||
<service android:name="org.eclipse.paho.android.service.MqttService" />
|
||||
<receiver android:name="org.eclipse.paho.android.service.AlarmPingSender$AlarmReceiver"
|
||||
android:exported="false"
|
||||
tools:ignore="Instantiatable" />
|
||||
<service android:name=".service.EMqttService"
|
||||
android:foregroundServiceType="dataSync"/>
|
||||
<!-- <receiver android:name="org.eclipse.paho.android.service.AlarmPingSender$AlarmReceiver"-->
|
||||
<!-- android:enabled="true"-->
|
||||
<!-- android:exported="true"-->
|
||||
<!-- tools:ignore="Instantiatable" />-->
|
||||
<!-- <service android:name=".service.EMqttService"-->
|
||||
<!-- android:foregroundServiceType="dataSync"/>-->
|
||||
<service android:name=".service.MyMqttService"
|
||||
android:foregroundServiceType="dataSync"/>
|
||||
</application>
|
||||
|
||||
@@ -20,6 +20,7 @@ import androidx.databinding.ViewDataBinding;
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.blankj.utilcode.util.BarUtils;
|
||||
import com.qxcm.moduleutil.R;
|
||||
import com.qxcm.moduleutil.utils.DisplayUtil;
|
||||
import com.qxcm.moduleutil.utils.LanguageUtil;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
@@ -65,19 +66,40 @@ public abstract class BaseAppCompatActivity<VDB extends ViewDataBinding> extends
|
||||
EventBus.getDefault().register(this);
|
||||
}
|
||||
|
||||
// 设置全屏模式,隐藏状态栏和导航栏
|
||||
View decorView = getWindow().getDecorView();
|
||||
decorView.setSystemUiVisibility(
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_STABLE
|
||||
| View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
|
||||
| View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
|
||||
| View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
|
||||
| View.SYSTEM_UI_FLAG_FULLSCREEN
|
||||
| View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);
|
||||
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public Resources getResources() {//禁止app字体大小跟随系统字体大小调节
|
||||
// Resources resources = super.getResources();
|
||||
// if (resources != null && resources.getConfiguration().fontScale != 1.0f) {
|
||||
// android.content.res.Configuration configuration = resources.getConfiguration();
|
||||
// configuration.fontScale = 1.0f;
|
||||
// resources.updateConfiguration(configuration, resources.getDisplayMetrics());
|
||||
// }
|
||||
// return resources;
|
||||
// }
|
||||
static float fontScale = 1f;
|
||||
|
||||
@Override
|
||||
public Resources getResources() {//禁止app字体大小跟随系统字体大小调节
|
||||
public Resources getResources() {
|
||||
Resources resources = super.getResources();
|
||||
if (resources != null && resources.getConfiguration().fontScale != 1.0f) {
|
||||
android.content.res.Configuration configuration = resources.getConfiguration();
|
||||
configuration.fontScale = 1.0f;
|
||||
resources.updateConfiguration(configuration, resources.getDisplayMetrics());
|
||||
}
|
||||
return resources;
|
||||
return DisplayUtil.getResources(this,resources,fontScale);
|
||||
}
|
||||
|
||||
public void setFontScale(float fontScale) {
|
||||
this.fontScale = fontScale;
|
||||
DisplayUtil.recreate(this);
|
||||
}
|
||||
public boolean isLightMode() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@ import com.qxcm.moduleutil.R;
|
||||
import com.qxcm.moduleutil.base.CommonAppContext;
|
||||
import com.qxcm.moduleutil.bean.UserBean;
|
||||
import com.qxcm.moduleutil.bean.UserInfo;
|
||||
import com.qxcm.moduleutil.event.UnreadCountEvent;
|
||||
import com.qxcm.moduleutil.utils.LanguageUtil;
|
||||
import com.qxcm.moduleutil.utils.location.LocationProvider;
|
||||
import com.qxcm.moduleutil.utils.location.LocationServiceFactory;
|
||||
@@ -36,6 +37,8 @@ import com.qxcm.moduleutil.utils.location.SystemLocationProvider;
|
||||
import com.tencent.imsdk.v2.V2TIMCallback;
|
||||
import com.tencent.imsdk.v2.V2TIMManager;
|
||||
import com.tencent.imsdk.v2.V2TIMUserFullInfo;
|
||||
import com.tencent.imsdk.v2.V2TIMValueCallback;
|
||||
import com.tencent.liteav.base.Log;
|
||||
import com.tencent.qcloud.tuicore.TUILogin;
|
||||
import com.tencent.qcloud.tuicore.interfaces.TUICallback;
|
||||
|
||||
@@ -117,6 +120,20 @@ public abstract class BaseMvpActivity<P extends IPresenter, VDB extends ViewData
|
||||
}
|
||||
});
|
||||
initLocation();
|
||||
|
||||
|
||||
// V2TIMManager.getConversationManager().getTotalUnreadMessageCount(new V2TIMValueCallback<Long>() {
|
||||
// @Override
|
||||
// public void onSuccess(Long aLong) {
|
||||
// Log.i("imsdk", "success");
|
||||
//// EventBus.getDefault().post(new UnreadCountEvent(aLong));
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onError(int code, String desc) {
|
||||
// Log.i("imsdk", "failure, code:" + code + ", desc:" + desc);
|
||||
// }
|
||||
// });
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -257,6 +257,16 @@ public class WebViewActivity extends BaseAppCompatActivity<ActivityWebViewBindin
|
||||
ARouter.getInstance().build(ARouteConstants.CURRENCY).navigation();
|
||||
|
||||
}
|
||||
|
||||
@JavascriptInterface
|
||||
public void Withdrawal() {
|
||||
ARouter.getInstance().build(ARouteConstants.WITHDRAWAL_ACTIVITY).navigation();
|
||||
}
|
||||
|
||||
@JavascriptInterface
|
||||
public void enterAuthent() {//实名认证
|
||||
ARouter.getInstance().build(ARouteConstants.REAL_NAME_ACTIVITY).navigation();
|
||||
}
|
||||
}
|
||||
|
||||
@JavascriptInterface
|
||||
|
||||
@@ -5,294 +5,18 @@ import com.qxcm.moduleutil.bean.room.RankInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 项目名称 qipao-android
|
||||
* 包名:com.qpyy.room.bean
|
||||
* 创建人 黄强
|
||||
* 创建时间 2020/7/25 14:38
|
||||
* 描述 describe
|
||||
*@author qx
|
||||
*@data 2025/7/16
|
||||
*@description: 房间排行榜
|
||||
*/
|
||||
@Data
|
||||
public class CharmRankingResp {
|
||||
private MyBean my;
|
||||
private List<ListsBean> lists;
|
||||
|
||||
public MyBean getMy() {
|
||||
return my;
|
||||
}
|
||||
|
||||
public void setMy(MyBean my) {
|
||||
this.my = my;
|
||||
}
|
||||
|
||||
public List<ListsBean> getLists() {
|
||||
return lists;
|
||||
}
|
||||
|
||||
public void setLists(List<ListsBean> lists) {
|
||||
this.lists = lists;
|
||||
}
|
||||
|
||||
public static class MyBean {
|
||||
/**
|
||||
* head_picture : https://gudao-prod.oss-cn-hangzhou.aliyuncs.com/android_images/577547/20200331141523_1585635321420.png
|
||||
* nickname : 687592
|
||||
* user_id : 577547
|
||||
* level : 55
|
||||
* number : 0
|
||||
* rank : -1
|
||||
* diff : 52474
|
||||
* rank_info : {"rank_id":"55","rank_name":1000,"nobility_id":0,"nobility_name":"","picture":""}
|
||||
*/
|
||||
|
||||
private String head_picture;
|
||||
private String nickname;
|
||||
private String user_id;
|
||||
private String level;
|
||||
private String number;
|
||||
private int rank;
|
||||
private String diff;
|
||||
private String sex;
|
||||
private String number_format;
|
||||
|
||||
public String getNumber_format() {
|
||||
return number_format;
|
||||
}
|
||||
|
||||
public void setNumber_format(String number_format) {
|
||||
this.number_format = number_format;
|
||||
}
|
||||
|
||||
public String getSex() {
|
||||
return sex;
|
||||
}
|
||||
|
||||
public void setSex(String sex) {
|
||||
this.sex = sex;
|
||||
}
|
||||
|
||||
private RankInfo rank_info;
|
||||
private String nobility_icon;
|
||||
private String level_icon;
|
||||
|
||||
public String getNobility_icon() {
|
||||
return nobility_icon;
|
||||
}
|
||||
|
||||
public void setNobility_icon(String nobility_icon) {
|
||||
this.nobility_icon = nobility_icon;
|
||||
}
|
||||
|
||||
public String getLevel_icon() {
|
||||
return level_icon;
|
||||
}
|
||||
|
||||
public void setLevel_icon(String level_icon) {
|
||||
this.level_icon = level_icon;
|
||||
}
|
||||
|
||||
public String getHead_picture() {
|
||||
return head_picture;
|
||||
}
|
||||
|
||||
public void setHead_picture(String head_picture) {
|
||||
this.head_picture = head_picture;
|
||||
}
|
||||
|
||||
public String getNickname() {
|
||||
return nickname;
|
||||
}
|
||||
|
||||
public void setNickname(String nickname) {
|
||||
this.nickname = nickname;
|
||||
}
|
||||
|
||||
public String getUser_id() {
|
||||
return user_id;
|
||||
}
|
||||
|
||||
public void setUser_id(String user_id) {
|
||||
this.user_id = user_id;
|
||||
}
|
||||
|
||||
public String getLevel() {
|
||||
return level;
|
||||
}
|
||||
|
||||
public void setLevel(String level) {
|
||||
this.level = level;
|
||||
}
|
||||
|
||||
public String getNumber() {
|
||||
return number;
|
||||
}
|
||||
|
||||
public void setNumber(String number) {
|
||||
this.number = number;
|
||||
}
|
||||
|
||||
public int getRank() {
|
||||
return rank;
|
||||
}
|
||||
|
||||
public void setRank(int rank) {
|
||||
this.rank = rank;
|
||||
}
|
||||
|
||||
public String getDiff() {
|
||||
return diff;
|
||||
}
|
||||
|
||||
public void setDiff(String diff) {
|
||||
this.diff = diff;
|
||||
}
|
||||
|
||||
public RankInfo getRank_info() {
|
||||
return rank_info;
|
||||
}
|
||||
|
||||
public void setRank_info(RankInfo rank_info) {
|
||||
this.rank_info = rank_info;
|
||||
}
|
||||
}
|
||||
|
||||
public static class ListsBean {
|
||||
/**
|
||||
* user_id : 642649
|
||||
* number : 43280001
|
||||
* head_picture : https://gudao-prod.oss-cn-hangzhou.aliyuncs.com/android_images/642649/20200601132728_1590989246548.jpeg
|
||||
* nickname : 109179
|
||||
* level : 4
|
||||
* sex : 1
|
||||
* nobility_icon : http://gudao-prod.oss-cn-hangzhou.aliyuncs.com/admin_images/5e71d1ef847ba.png
|
||||
* rank : 1
|
||||
* rank_info : {"rank_id":"4","rank_name":4,"nobility_id":6,"nobility_name":"帝皇","picture":""}
|
||||
*/
|
||||
|
||||
private String user_id;
|
||||
private String number;
|
||||
private String head_picture;
|
||||
private String nickname;
|
||||
private String level;
|
||||
private String sex;
|
||||
private String nobility_icon;
|
||||
private String level_icon;
|
||||
private String user_code;
|
||||
private int rank;
|
||||
private RankInfo rank_info;
|
||||
private String number_format;
|
||||
private String good_number;
|
||||
private String id_color;
|
||||
|
||||
public String getUser_code() {
|
||||
return user_code;
|
||||
}
|
||||
|
||||
public void setUser_code(String user_code) {
|
||||
this.user_code = user_code;
|
||||
}
|
||||
|
||||
public String getNumber_format() {
|
||||
return number_format;
|
||||
}
|
||||
|
||||
public void setNumber_format(String number_format) {
|
||||
this.number_format = number_format;
|
||||
}
|
||||
|
||||
public String getLevel_icon() {
|
||||
return level_icon;
|
||||
}
|
||||
|
||||
public void setLevel_icon(String level_icon) {
|
||||
this.level_icon = level_icon;
|
||||
}
|
||||
|
||||
public String getUser_id() {
|
||||
return user_id;
|
||||
}
|
||||
|
||||
public void setUser_id(String user_id) {
|
||||
this.user_id = user_id;
|
||||
}
|
||||
|
||||
public String getNumber() {
|
||||
return number;
|
||||
}
|
||||
|
||||
public void setNumber(String number) {
|
||||
this.number = number;
|
||||
}
|
||||
|
||||
public String getHead_picture() {
|
||||
return head_picture;
|
||||
}
|
||||
|
||||
public void setHead_picture(String head_picture) {
|
||||
this.head_picture = head_picture;
|
||||
}
|
||||
|
||||
public String getNickname() {
|
||||
return nickname;
|
||||
}
|
||||
|
||||
public void setNickname(String nickname) {
|
||||
this.nickname = nickname;
|
||||
}
|
||||
|
||||
public String getLevel() {
|
||||
return level;
|
||||
}
|
||||
|
||||
public void setLevel(String level) {
|
||||
this.level = level;
|
||||
}
|
||||
|
||||
public String getSex() {
|
||||
return sex;
|
||||
}
|
||||
|
||||
public void setSex(String sex) {
|
||||
this.sex = sex;
|
||||
}
|
||||
|
||||
public String getNobility_icon() {
|
||||
return nobility_icon;
|
||||
}
|
||||
|
||||
public void setNobility_icon(String nobility_icon) {
|
||||
this.nobility_icon = nobility_icon;
|
||||
}
|
||||
|
||||
public int getRank() {
|
||||
return rank;
|
||||
}
|
||||
|
||||
public void setRank(int rank) {
|
||||
this.rank = rank;
|
||||
}
|
||||
|
||||
public RankInfo getRank_info() {
|
||||
return rank_info;
|
||||
}
|
||||
|
||||
public void setRank_info(RankInfo rank_info) {
|
||||
this.rank_info = rank_info;
|
||||
}
|
||||
|
||||
public String getGood_number() {
|
||||
return good_number;
|
||||
}
|
||||
|
||||
public void setGood_number(String good_number) {
|
||||
this.good_number = good_number;
|
||||
}
|
||||
|
||||
public String getId_color() {
|
||||
return id_color;
|
||||
}
|
||||
|
||||
public void setId_color(String id_color) {
|
||||
this.id_color = id_color;
|
||||
}
|
||||
}
|
||||
private String user_id;
|
||||
private String nickname;
|
||||
private String avatar;
|
||||
private List<String> icon;
|
||||
private String total;
|
||||
}
|
||||
|
||||
@@ -19,4 +19,6 @@ public class HeadlineBean {
|
||||
private String money;//花了多钱发的这个头条
|
||||
private String nickname;//昵称
|
||||
private String avatar;//头像
|
||||
private String end_time;//倒计时时间
|
||||
private String room_id;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.qxcm.moduleutil.bean;
|
||||
|
||||
import lombok.Data;
|
||||
/**
|
||||
*@author qx
|
||||
*@data 2025/7/16
|
||||
*@description:抢头条推送过来的参数
|
||||
*/
|
||||
@Data
|
||||
public class HeadlineEvent {
|
||||
private int type;
|
||||
private String content;
|
||||
private UserInfo user_info;
|
||||
private String room_id;
|
||||
private String end_time;
|
||||
}
|
||||
@@ -52,6 +52,7 @@ public class UserInfo implements Serializable {
|
||||
private String is_room_owner;//是否是房主 0否 1是
|
||||
private String pit_number;//在点击麦上用户的时候使用
|
||||
private String auction_id;//在拍卖中的拍卖序号
|
||||
private int auth;//是否实名 1:实名 0:未实名
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ public class EMMessageInfo implements MultiItemEntity {
|
||||
public static final int QXRoomMessageTypeAplayPitModeDidChanged = 1014;
|
||||
/// pk房数值变化
|
||||
public static final int QXRoomMessageTypePKValueDidChanged = 1015;
|
||||
/// 房间类型发生变化
|
||||
/// 禁言禁麦解除解禁
|
||||
public static final int QXRoomMessageTypeRoomTypeDidChanged = 1016;
|
||||
/// 管理员被删除
|
||||
public static final int QXRoomMessageTypeManagerIsDelete = 1017;
|
||||
@@ -119,6 +119,9 @@ public class EMMessageInfo implements MultiItemEntity {
|
||||
case QXRoomMessageTypeRoomPKStart:
|
||||
case QXRoomMessageTypeRoomPKEnd:
|
||||
case QXRoomMessageTypeRoomPKDisconnect:
|
||||
case QXRoomMessageTypeSeatMute:
|
||||
case QXRoomMessageTypeSeatLock:
|
||||
case QXRoomMessageTypeRoomTypeDidChanged:
|
||||
return 1;
|
||||
case QXRoomMessageTypeGift:
|
||||
return 3;
|
||||
|
||||
@@ -36,6 +36,7 @@ public class RoomAuction implements Serializable {
|
||||
private String relation_icon;//关系图标
|
||||
private String base_image;//礼物图片
|
||||
private long duration;//时间
|
||||
private String charm;
|
||||
}
|
||||
|
||||
@Data
|
||||
@@ -46,7 +47,7 @@ public class RoomAuction implements Serializable {
|
||||
private String avatar;
|
||||
private String dress;
|
||||
private String sex;
|
||||
private String gift_price;
|
||||
private String gift_prices;
|
||||
private String charm;
|
||||
private List<String> icon;
|
||||
}
|
||||
|
||||
@@ -61,5 +61,7 @@ public class RoomPitBean implements Serializable {
|
||||
private boolean is_pk;//是否是在pk模式中
|
||||
private boolean isMute;//是否打开麦圈
|
||||
|
||||
private int is_pm;//是否是拍卖房 1是 0否
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.qxcm.moduleutil.event;
|
||||
|
||||
import lombok.Data;
|
||||
/**
|
||||
*@author qx
|
||||
*@data 2025/7/15
|
||||
*@description: 这是im展示需要显示的未读消息数
|
||||
*/
|
||||
@Data
|
||||
public class UnreadCountEvent {
|
||||
private long aLong;
|
||||
|
||||
public UnreadCountEvent(long aLong) {
|
||||
this.aLong = aLong;
|
||||
}
|
||||
}
|
||||
@@ -6,6 +6,7 @@ import com.qxcm.moduleutil.bean.AppPay;
|
||||
import com.qxcm.moduleutil.bean.BannerModel;
|
||||
import com.qxcm.moduleutil.bean.BindType;
|
||||
import com.qxcm.moduleutil.bean.BlackUserBean;
|
||||
import com.qxcm.moduleutil.bean.CharmRankingResp;
|
||||
import com.qxcm.moduleutil.bean.CircleListBean;
|
||||
import com.qxcm.moduleutil.bean.CommentBean;
|
||||
import com.qxcm.moduleutil.bean.ExpandColumnBean;
|
||||
@@ -95,7 +96,7 @@ public interface ApiServer {
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.SEND_HEADLINE)
|
||||
Call<BaseModel<String>> sendHeadine(@Field("content") String content ,@Field("money") String money);
|
||||
Call<BaseModel<String>> sendHeadine(@Field("content") String content ,@Field("money") String money,@Field("room_id") String roomId);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.POST_WITHDRAWAL)
|
||||
@@ -121,6 +122,10 @@ public interface ApiServer {
|
||||
@GET(Constants.GET_WITHDRAWAL_LIST)
|
||||
Observable<BaseModel<List<WithdrawalBean>>> withdrawalList(@Query("page") String page, @Query("page_limit") String page_limit,@Query("search_stime") String search_stime, @Query("search_etime") String search_etime);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.POST_ROOM_RANK)
|
||||
Observable<BaseModel<List<CharmRankingResp>>> getRoomRank(@Field("room_id") String room_id, @Field("type") String type, @Field("time_type") String time_type, @Field("page") String page, @Field("page_limit") String page_limit);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.POST_ROOM_RANKING)
|
||||
Observable<BaseModel<PlaceholderBean>> roomRanking( @Field("type") String type);
|
||||
@@ -182,7 +187,7 @@ public interface ApiServer {
|
||||
Observable<BaseModel<UserBean>> userUpdate(@Field("nickname")String nickname, @Field("birthday")String birthday,@Field("sex")String sex, @Field("avatar")String avatar,@Field("init_code")String init_code,@Field("user_id")String user_id);
|
||||
|
||||
@GET(Constants.AUTHORIZATION)
|
||||
Observable<BaseModel<String>> authorization();
|
||||
Call<ResponseBody> authorization();
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.CHANGE_PASSWORD)
|
||||
@@ -254,7 +259,7 @@ public interface ApiServer {
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.CHECK_TXT)
|
||||
Call<BaseModel<String>> checkTxt(@Field("room_name") String room_name, @Field("room_cover") String room_cover, @Field("room_intro") String room_intro);
|
||||
Call<ResponseBody> checkTxt(@Field("room_name") String room_name, @Field("room_cover") String room_cover, @Field("room_intro") String room_intro);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.GET_REWARD_LIST)
|
||||
@@ -533,7 +538,7 @@ public interface ApiServer {
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.SET_PRESIDED_RATIO)
|
||||
Call<BaseModel<String>> setPresidedRatio(@Field("room_id") String room_id,@Field("user_id") String userId,@Field("ration") String ration);
|
||||
Call<BaseModel<String>> setPresidedRatio(@Field("room_id") String room_id,@Field("user_id") String userId,@Field("ratio") String ration);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.GET_PRESIDED_RATIO)
|
||||
|
||||
@@ -21,6 +21,7 @@ import com.qxcm.moduleutil.bean.AppPay;
|
||||
import com.qxcm.moduleutil.bean.BannerModel;
|
||||
import com.qxcm.moduleutil.bean.BindType;
|
||||
import com.qxcm.moduleutil.bean.BlackUserBean;
|
||||
import com.qxcm.moduleutil.bean.CharmRankingResp;
|
||||
import com.qxcm.moduleutil.bean.CircleListBean;
|
||||
import com.qxcm.moduleutil.bean.CommentBean;
|
||||
import com.qxcm.moduleutil.bean.ExpandColumnBean;
|
||||
@@ -324,6 +325,10 @@ public class RetrofitClient {
|
||||
sApiServer.withdrawalList(page,page_limit,search_stime,search_etime).compose(new DefaultTransformer<>()).subscribe(observer);
|
||||
}
|
||||
|
||||
public void getRoomRank(String roomId, String type, String time_type, String page, String page_limit, BaseObserver<List<CharmRankingResp>> observer){
|
||||
sApiServer.getRoomRank(roomId, type, time_type, page, page_limit).compose(new DefaultTransformer<>()).subscribe(observer);
|
||||
}
|
||||
|
||||
public void wealthRanking(String ranking_type, String type, BaseObserver<PlaceholderBean> observer){
|
||||
if (ranking_type.equals("0")){
|
||||
sApiServer.roomRanking(type).compose(new DefaultTransformer<>()).subscribe(observer);
|
||||
@@ -380,8 +385,8 @@ public class RetrofitClient {
|
||||
sApiServer.dailyTasksOpenBox(gift_box_id).compose(new DefaultTransformer<>()).subscribe(observer);
|
||||
}
|
||||
|
||||
public void sendHeadine(String content, String money, BaseObserver<String> observer) {
|
||||
sApiServer.sendHeadine(content, money).enqueue(new Callback<BaseModel<String>>() {
|
||||
public void sendHeadine(String content, String money,String roomId, BaseObserver<String> observer) {
|
||||
sApiServer.sendHeadine(content, money,roomId).enqueue(new Callback<BaseModel<String>>() {
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
||||
onNextRetu(response, observer);
|
||||
@@ -545,7 +550,26 @@ public class RetrofitClient {
|
||||
}
|
||||
|
||||
public void authorization(BaseObserver<String> observer) {
|
||||
sApiServer.authorization().compose(new DefaultTransformer<>()).subscribe(observer);
|
||||
sApiServer.authorization().enqueue(new Callback<ResponseBody>() {
|
||||
@Override
|
||||
public void onResponse(Call<ResponseBody> call, Response<ResponseBody> response) {
|
||||
if (response.code()==200){
|
||||
try {
|
||||
String json = response.body().string();
|
||||
BaseModel<String> baseModel = GsonUtils.fromJson(json, BaseModel.class);
|
||||
observer.onNext(baseModel.getData());
|
||||
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<ResponseBody> call, Throwable t) {
|
||||
t.printStackTrace();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void oauthLogin(String netease_token, BaseObserver<List<UserBean>> observer) {
|
||||
@@ -1307,15 +1331,27 @@ public class RetrofitClient {
|
||||
}
|
||||
|
||||
public void checkTxt(String room_name, String room_cover, String room_intro, BaseObserver<String> observer) {
|
||||
sApiServer.checkTxt(room_name, room_cover, room_intro).enqueue(new Callback<BaseModel<String>>() {
|
||||
sApiServer.checkTxt(room_name, room_cover, room_intro).enqueue(new Callback<ResponseBody>() {
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
||||
onNextRetu(response, observer);
|
||||
public void onResponse(Call<ResponseBody> call, Response<ResponseBody> response) {
|
||||
if (response.code() == 200) {
|
||||
try {
|
||||
String json = response.body().string();
|
||||
BaseModel<String> baseModel = GsonUtils.fromJson(json, BaseModel.class);
|
||||
if (baseModel.getCode()==1) {
|
||||
observer.onNext(baseModel.getData());
|
||||
}else {
|
||||
com.hjq.toast.ToastUtils.show(baseModel.getMsg());
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
com.blankj.utilcode.util.ToastUtils.showShort(t.toString());
|
||||
public void onFailure(Call<ResponseBody> call, Throwable t) {
|
||||
t.printStackTrace();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -4,8 +4,12 @@ import android.util.Log;
|
||||
|
||||
import com.blankj.utilcode.util.GsonUtils;
|
||||
import com.blankj.utilcode.util.LogUtils;
|
||||
import com.qxcm.moduleutil.bean.HeadlineBean;
|
||||
import com.qxcm.moduleutil.bean.HeadlineEvent;
|
||||
import com.qxcm.moduleutil.bean.RoomMessageEvent;
|
||||
import com.qxcm.moduleutil.bean.room.RoomInfoResp;
|
||||
import com.qxcm.moduleutil.utils.SpUtil;
|
||||
import com.tencent.imsdk.v2.V2TIMAdvancedMsgListener;
|
||||
import com.tencent.imsdk.v2.V2TIMCallback;
|
||||
import com.tencent.imsdk.v2.V2TIMGroupListener;
|
||||
import com.tencent.imsdk.v2.V2TIMGroupMemberInfo;
|
||||
@@ -32,6 +36,7 @@ public class MessageListenerSingleton {
|
||||
private static MessageListenerSingleton instance;
|
||||
private List<OnMessageReceivedListener> listeners = new ArrayList<>();
|
||||
private V2TIMSimpleMsgListener simpleMsgListener;
|
||||
private V2TIMAdvancedMsgListener v2TIMAdvancedMsgListener;
|
||||
private static String mRoomId="";
|
||||
private V2TIMGroupListener groupListener;
|
||||
private MessageListenerSingleton() {
|
||||
@@ -69,15 +74,35 @@ public class MessageListenerSingleton {
|
||||
public void onRecvGroupCustomMessage(String msgID, String groupID, V2TIMGroupMemberInfo sender, byte[] customData) {
|
||||
// notifyMessageReceived("群自定义(信令)消息:群组 " + groupID + " 中 " + sender.getNickName());
|
||||
LogUtils.d("收到群自定义消息:群组 " + groupID + " 中 " + sender.getNickName());
|
||||
String message = new String(customData, StandardCharsets.UTF_8);
|
||||
RoomMessageEvent event = GsonUtils.fromJson(message, RoomMessageEvent.class);
|
||||
notifyMessageReceived(event);
|
||||
LogUtils.d("收到群自定义消息(信令):",message);
|
||||
if (!groupID.equals("")) {
|
||||
String message = new String(customData, StandardCharsets.UTF_8);
|
||||
RoomMessageEvent event = GsonUtils.fromJson(message, RoomMessageEvent.class);
|
||||
notifyMessageReceived(event);
|
||||
LogUtils.d("收到群自定义消息(信令):", message);
|
||||
}else {
|
||||
String message = new String(customData, StandardCharsets.UTF_8);
|
||||
LogUtils.d("收到群自定义消息(信令):", message);
|
||||
HeadlineBean event = GsonUtils.fromJson(message, HeadlineBean.class);
|
||||
EventBus.getDefault().post(event);
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
V2TIMManager.getMessageManager().addAdvancedMsgListener(v2TIMAdvancedMsgListener);
|
||||
V2TIMManager.getInstance().addSimpleMsgListener(simpleMsgListener);
|
||||
|
||||
v2TIMAdvancedMsgListener=new V2TIMAdvancedMsgListener() {
|
||||
@Override
|
||||
public void onRecvNewMessage(V2TIMMessage msg) {
|
||||
super.onRecvNewMessage(msg);
|
||||
if (msg.isBroadcastMessage()) {
|
||||
// 收到了广播消息
|
||||
String message = new String(msg.getCustomElem().getData(), StandardCharsets.UTF_8);
|
||||
LogUtils.e("收到广播消息(系统):",message);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
groupListener = new V2TIMGroupListener() {
|
||||
@Override
|
||||
public void onMemberEnter(String groupID, List<V2TIMGroupMemberInfo> memberList) {
|
||||
@@ -254,7 +279,7 @@ public class MessageListenerSingleton {
|
||||
|
||||
// 创建自定义群消息
|
||||
V2TIMMessage v2TIMMessage = V2TIMManager.getMessageManager().createCustomMessage(binaryData);
|
||||
|
||||
// v2TIMMessage.setNeedReadReceipt(true);
|
||||
// 发送消息
|
||||
V2TIMManager.getMessageManager().sendMessage(
|
||||
v2TIMMessage,
|
||||
@@ -272,6 +297,7 @@ public class MessageListenerSingleton {
|
||||
V2TIMMessage v2TIMMessage = V2TIMManager.getMessageManager().createCustomMessage(binaryData);
|
||||
v2TIMMessage.setExcludedFromUnreadCount( true);
|
||||
v2TIMMessage.setExcludedFromContentModeration(true);
|
||||
// v2TIMMessage.setNeedReadReceipt(true);
|
||||
//
|
||||
// // 发送消息
|
||||
V2TIMManager.getMessageManager().sendMessage(v2TIMMessage,"u"+userId,null, V2TIMMessage.V2TIM_PRIORITY_HIGH,
|
||||
|
||||
@@ -28,11 +28,11 @@ import com.blankj.utilcode.util.ObjectUtils;
|
||||
import com.blankj.utilcode.util.PathUtils;
|
||||
import com.blankj.utilcode.util.ThreadUtils;
|
||||
import com.liulishuo.okdownload.DownloadTask;
|
||||
import com.liulishuo.okdownload.StatusUtil;
|
||||
import com.liulishuo.okdownload.core.cause.EndCause;
|
||||
import com.liulishuo.okdownload.core.cause.ResumeFailedCause;
|
||||
import com.liulishuo.okdownload.core.listener.DownloadListener1;
|
||||
import com.liulishuo.okdownload.core.listener.assist.Listener1Assist;
|
||||
import com.orhanobut.logger.Logger;
|
||||
import com.qxcm.moduleutil.base.CommonAppContext;
|
||||
import com.qxcm.moduleutil.bean.RoomMessageEvent;
|
||||
import com.qxcm.moduleutil.event.CabinEvent;
|
||||
@@ -41,11 +41,14 @@ import com.qxcm.moduleutil.interfaces.SoundLevelUpdateListener;
|
||||
import com.qxcm.moduleutil.listener.MessageListenerSingleton;
|
||||
import com.qxcm.moduleutil.utils.Md5Utils;
|
||||
import com.qxcm.moduleutil.utils.SpUtil;
|
||||
import com.qxcm.moduleutil.utils.logger.Logger;
|
||||
import com.tencent.bugly.idasc.crashreport.CrashReport;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
@@ -375,6 +378,14 @@ public class AgoraManager {
|
||||
}
|
||||
}
|
||||
|
||||
public void muteAllRemoteAudioStreamsEx(boolean enabled){
|
||||
if (rtcEngine != null){
|
||||
RtcConnection connection = new RtcConnection();
|
||||
connection.channelId = mRoomId;
|
||||
rtcEngine.muteAllRemoteAudioStreamsEx(enabled, connection);
|
||||
}
|
||||
}
|
||||
|
||||
public void ClientRole(boolean enabled) {
|
||||
if (rtcEngine != null) {
|
||||
|
||||
@@ -648,13 +659,8 @@ public class AgoraManager {
|
||||
for (SoundLevelUpdateListener listener : soundLevelUpdateListeners) {
|
||||
if (listener != null) {
|
||||
ThreadUtils.runOnUiThread(() -> {
|
||||
// if (uid <= 0) {
|
||||
// // 本地用户音量变化
|
||||
// listener.onLocalSoundLevelUpdate(volume);
|
||||
// } else {
|
||||
// 远程用户音量变化
|
||||
listener.onRemoteSoundLevelUpdate(uid > 0 ? String.valueOf(uid) : SpUtil.getUserId() + "", volume);
|
||||
// listener.onRemoteSoundLevelUpdate( String.valueOf(uid), volume);
|
||||
// }
|
||||
});
|
||||
}
|
||||
@@ -775,8 +781,10 @@ public class AgoraManager {
|
||||
} else if (musicPlayer.getState() == io.agora.mediaplayer.Constants.MediaPlayerState.PLAYER_STATE_OPENING) {
|
||||
LogUtils.e("lxj", musicPlayer.getState());
|
||||
isPreload(mSongCode, type);
|
||||
}else if (musicPlayer.getState() == io.agora.mediaplayer.Constants.MediaPlayerState.PLAYER_STATE_PLAYING){
|
||||
LogUtils.e("lxj", musicPlayer.getState());
|
||||
isPreload(mSongCode, type);
|
||||
}
|
||||
|
||||
}
|
||||
} else if (type == 2) {
|
||||
if (code < 0) {
|
||||
@@ -786,11 +794,41 @@ public class AgoraManager {
|
||||
musicContentCenter.preload(mSongCode);
|
||||
isPreload(mSongCode, type);
|
||||
} catch (Exception e) {
|
||||
Log.e("@@@", "预加载歌曲失败: songCode=" + mSongCode, e);
|
||||
Log.e("lxj", "预加载歌曲失败: songCode=" + mSongCode, e);
|
||||
}
|
||||
}, 3000); // 3秒延迟
|
||||
} else {
|
||||
musicPlayer.open(mSongCode, 0);
|
||||
// if (musicPlayer.getState() == io.agora.mediaplayer.Constants.MediaPlayerState.PLAYER_STATE_PAUSED) {//暂停
|
||||
// LogUtils.e("lxj", "暂停");
|
||||
// musicPlayer.resume();
|
||||
//
|
||||
// } else if (musicPlayer.getState() == io.agora.mediaplayer.Constants.MediaPlayerState.PLAYER_STATE_IDLE) {//空闲
|
||||
// LogUtils.e("lxj", "空闲");
|
||||
// musicPlayer.open(mSongCode, 0);
|
||||
// isPreload(mSongCode, type);
|
||||
// } else if (musicPlayer.getState() == io.agora.mediaplayer.Constants.MediaPlayerState.PLAYER_STATE_OPEN_COMPLETED) {//打开成功
|
||||
// LogUtils.e("lxj", "播放");
|
||||
// musicPlayer.play();
|
||||
// musicPlayer.selectAudioTrack(0);
|
||||
// } else if (musicPlayer.getState() == io.agora.mediaplayer.Constants.MediaPlayerState.PLAYER_STATE_IDLE) {
|
||||
// LogUtils.e("lxj", "空闲");
|
||||
// musicPlayer.open(mSongCode, 0);
|
||||
// isPreload(mSongCode, type);
|
||||
//// LogUtils.e("@@@", musicPlayer.getState());
|
||||
//// musicPlayer.pause() ;
|
||||
// } else if (musicPlayer.getState() == io.agora.mediaplayer.Constants.MediaPlayerState.PLAYER_STATE_PAUSING_INTERNAL) {
|
||||
// LogUtils.e("lxj", "关闭");
|
||||
// musicPlayer.pause();
|
||||
// } else if (musicPlayer.getState() == io.agora.mediaplayer.Constants.MediaPlayerState.PLAYER_STATE_PLAYBACK_ALL_LOOPS_COMPLETED) {
|
||||
// LogUtils.e("lxj", "daki");
|
||||
// musicPlayer.open(mSongCode, 0);
|
||||
// isPreload(mSongCode, type);
|
||||
// } else if (musicPlayer.getState() == io.agora.mediaplayer.Constants.MediaPlayerState.PLAYER_STATE_OPENING) {
|
||||
// LogUtils.e("lxj", musicPlayer.getState());
|
||||
// isPreload(mSongCode, type);
|
||||
// }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -861,6 +899,35 @@ public class AgoraManager {
|
||||
}, 3000); // 3秒延迟
|
||||
} else {
|
||||
musicPlayer.open(mSongCode, 0);
|
||||
// if (musicPlayer.getState() == io.agora.mediaplayer.Constants.MediaPlayerState.PLAYER_STATE_PAUSED) {//暂停
|
||||
// LogUtils.e("lxj", "暂停");
|
||||
// musicPlayer.resume();
|
||||
//
|
||||
// } else if (musicPlayer.getState() == io.agora.mediaplayer.Constants.MediaPlayerState.PLAYER_STATE_IDLE) {//空闲
|
||||
// LogUtils.e("lxj", "空闲");
|
||||
// musicPlayer.open(mSongCode, 0);
|
||||
// isPreload2(mSongCode, type);
|
||||
// } else if (musicPlayer.getState() == io.agora.mediaplayer.Constants.MediaPlayerState.PLAYER_STATE_OPEN_COMPLETED) {//打开成功
|
||||
// LogUtils.e("lxj", "播放");
|
||||
// musicPlayer.play();
|
||||
// musicPlayer.selectAudioTrack(0);
|
||||
// } else if (musicPlayer.getState() == io.agora.mediaplayer.Constants.MediaPlayerState.PLAYER_STATE_IDLE) {
|
||||
// LogUtils.e("lxj", "空闲");
|
||||
// musicPlayer.open(mSongCode, 0);
|
||||
// isPreload2(mSongCode, type);
|
||||
//// LogUtils.e("@@@", musicPlayer.getState());
|
||||
//// musicPlayer.pause() ;
|
||||
// } else if (musicPlayer.getState() == io.agora.mediaplayer.Constants.MediaPlayerState.PLAYER_STATE_PAUSING_INTERNAL) {
|
||||
// LogUtils.e("lxj", "关闭");
|
||||
// musicPlayer.pause();
|
||||
// } else if (musicPlayer.getState() == io.agora.mediaplayer.Constants.MediaPlayerState.PLAYER_STATE_PLAYBACK_ALL_LOOPS_COMPLETED) {
|
||||
// LogUtils.e("lxj", "daki");
|
||||
// musicPlayer.open(mSongCode, 0);
|
||||
// isPreload2(mSongCode, type);
|
||||
// } else if (musicPlayer.getState() == io.agora.mediaplayer.Constants.MediaPlayerState.PLAYER_STATE_OPENING) {
|
||||
// LogUtils.e("lxj", musicPlayer.getState());
|
||||
// isPreload2(mSongCode, type);
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1011,36 +1078,100 @@ public class AgoraManager {
|
||||
* @param lrcUri
|
||||
*/
|
||||
public void getLyricsInstance(String lrcUri) {
|
||||
final File[] file = new File[1];
|
||||
// 设置可缓存的歌词文件的最大数量,默认为 50
|
||||
LyricsFileDownloader.getInstance(context).setMaxFileNum(50);
|
||||
// 设置单个歌词文件的有效期,默认为 8 小时
|
||||
LyricsFileDownloader.getInstance(context).setMaxFileAge(8 * 60 * 60);
|
||||
LyricsFileDownloader.getInstance(context).download(lrcUri);
|
||||
LyricsFileDownloader.getInstance(context).setLyricsFileDownloaderCallback(new LyricsFileDownloaderCallback() {
|
||||
// 歌词文件下载回调
|
||||
@Override
|
||||
public void onLyricsFileDownloadProgress(int requestId, float progress) {
|
||||
LogUtils.e("onLyricsFileDownloadProgress", "requestId: " + requestId + ", progress: " + progress);
|
||||
MusicFileBean musicFileBean = new MusicFileBean();
|
||||
musicFileBean.setFileData(null);
|
||||
EventBus.getDefault().post(musicFileBean);
|
||||
}
|
||||
downloadAndPlayMp4(lrcUri);
|
||||
|
||||
// 歌词文件下载完成回调
|
||||
@Override
|
||||
public void onLyricsFileDownloadCompleted(int requestId, byte[] fileData, DownloadError error) {
|
||||
LogUtils.e("onLyricsFileDownloadCompleted", "requestId: " + requestId + ", error: " + error);
|
||||
if (error == null) {
|
||||
MusicFileBean musicFileBean = new MusicFileBean();
|
||||
musicFileBean.setFileData(fileData);
|
||||
EventBus.getDefault().post(musicFileBean);
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
// final File[] file = new File[1];
|
||||
//// 设置可缓存的歌词文件的最大数量,默认为 50
|
||||
// LyricsFileDownloader.getInstance(context).setMaxFileNum(50);
|
||||
//// 设置单个歌词文件的有效期,默认为 8 小时
|
||||
// LyricsFileDownloader.getInstance(context).setMaxFileAge(8 * 60 * 60);
|
||||
// LyricsFileDownloader.getInstance(context).download(lrcUri);
|
||||
// LyricsFileDownloader.getInstance(context).setLyricsFileDownloaderCallback(new LyricsFileDownloaderCallback() {
|
||||
// // 歌词文件下载回调
|
||||
// @Override
|
||||
// public void onLyricsFileDownloadProgress(int requestId, float progress) {
|
||||
// LogUtils.e("onLyricsFileDownloadProgress", "requestId: " + requestId + ", progress: " + progress);
|
||||
// MusicFileBean musicFileBean = new MusicFileBean();
|
||||
// musicFileBean.setFileData(null);
|
||||
// EventBus.getDefault().post(musicFileBean);
|
||||
// }
|
||||
//
|
||||
// // 歌词文件下载完成回调
|
||||
// @Override
|
||||
// public void onLyricsFileDownloadCompleted(int requestId, byte[] fileData, DownloadError error) {
|
||||
// LogUtils.e("onLyricsFileDownloadCompleted", "requestId: " + requestId + ", error: " + error);
|
||||
// if (error == null) {
|
||||
// MusicFileBean musicFileBean = new MusicFileBean();
|
||||
// musicFileBean.setFileData(fileData);
|
||||
// EventBus.getDefault().post(musicFileBean);
|
||||
// }
|
||||
//
|
||||
// }
|
||||
// });
|
||||
|
||||
}
|
||||
|
||||
private void downloadAndPlayMp4(String url) {
|
||||
DownloadTask task = new DownloadTask.Builder(url, PathUtils.getInternalAppCachePath()
|
||||
, Md5Utils.getStringMD5(url))
|
||||
// the minimal interval millisecond for callback progress
|
||||
.setMinIntervalMillisCallbackProcess(100)
|
||||
// do re-download even if the task has already been completed in the past.
|
||||
.setPassIfAlreadyCompleted(false)
|
||||
.setAutoCallbackToUIThread(true)
|
||||
.build();
|
||||
if (StatusUtil.isCompleted(task)) {
|
||||
MusicFileBean musicFileBean = new MusicFileBean();
|
||||
musicFileBean.setFileData(convertFileToByteArray(task.getFile()));
|
||||
EventBus.getDefault().post(musicFileBean);
|
||||
} else {
|
||||
task.enqueue(new DownloadListener1() {
|
||||
@Override
|
||||
public void taskStart(@NonNull DownloadTask task, @NonNull Listener1Assist.Listener1Model model) {
|
||||
com.qxcm.moduleutil.utils.logger.Logger.e("taskStart", model);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void retry(@NonNull DownloadTask task, @NonNull ResumeFailedCause cause) {
|
||||
com.qxcm.moduleutil.utils.logger.Logger.e("retry", cause);
|
||||
CrashReport.postCatchedException(new RuntimeException("下载文件重试:" + cause == null ? "" : cause.name()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void connected(@NonNull DownloadTask task, int blockCount, long currentOffset, long totalLength) {
|
||||
com.qxcm.moduleutil.utils.logger.Logger.e("connected", blockCount);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void progress(@NonNull DownloadTask task, long currentOffset, long totalLength) {
|
||||
com.qxcm.moduleutil.utils.logger.Logger.e("progress", currentOffset);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void taskEnd(@NonNull DownloadTask task, @NonNull EndCause cause, @Nullable Exception realCause, @NonNull Listener1Assist.Listener1Model model) {
|
||||
Logger.e("taskEnd", model);
|
||||
MusicFileBean musicFileBean = new MusicFileBean();
|
||||
musicFileBean.setFileData(convertFileToByteArray(task.getFile()));
|
||||
EventBus.getDefault().post(musicFileBean);
|
||||
if (cause != null && cause != EndCause.COMPLETED) {
|
||||
// CrashReport.postCatchedException(new RuntimeException("下载任务结束:" + cause == null ? "" : cause.name() + "_realCause:" + realCause == null ? "" : realCause.getMessage()));
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public static byte[] convertFileToByteArray(File file) {
|
||||
byte[] byteArray = null;
|
||||
try (FileInputStream fis = new FileInputStream(file)) {
|
||||
byteArray = new byte[(int) file.length()];
|
||||
fis.read(byteArray);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return byteArray;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,6 +41,7 @@ import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
|
||||
public class EMqttService extends Service implements NetworkUtils.OnNetworkStatusChangedListener {
|
||||
private final static String TAG = "EMQTT消息";
|
||||
|
||||
@@ -65,10 +66,10 @@ public class EMqttService extends Service implements NetworkUtils.OnNetworkStatu
|
||||
super.onCreate();
|
||||
Logger.e(TAG, "服务创建成功");
|
||||
NetworkUtils.registerNetworkStatusChangedListener(this);
|
||||
scheduledExecutorService.scheduleWithFixedDelay(connectTask, 0, 10, TimeUnit.SECONDS);
|
||||
// scheduledExecutorService.scheduleWithFixedDelay(connectTask, 0, 10, TimeUnit.SECONDS);
|
||||
}
|
||||
|
||||
private final Runnable connectTask = this::doClientConnection;
|
||||
// private final Runnable connectTask = this::doClientConnection;
|
||||
@Override
|
||||
public int onStartCommand(Intent intent, int flags, int startId) {
|
||||
return super.onStartCommand(intent, flags, startId);
|
||||
@@ -148,11 +149,11 @@ public class EMqttService extends Service implements NetworkUtils.OnNetworkStatu
|
||||
*/
|
||||
private String clientId = "";
|
||||
|
||||
private void init() {
|
||||
private void init() throws MqttException {
|
||||
UserBean user = CommonAppContext.getInstance().getUser();
|
||||
if (mqttAndroidClient == null) {
|
||||
clientId = "android-" + user.getUser_id() + "-" + MqttClient.generateClientId();
|
||||
mqttAndroidClient = new MqttAndroidClient(this, HOST, clientId);
|
||||
mqttAndroidClient = new MqttAndroidClient(this, HOST, clientId, MqttAndroidClient.Ack.AUTO_ACK);
|
||||
}
|
||||
mMqttConnectOptions = new MqttConnectOptions();
|
||||
mMqttConnectOptions.setCleanSession(true);
|
||||
@@ -161,16 +162,12 @@ public class EMqttService extends Service implements NetworkUtils.OnNetworkStatu
|
||||
mMqttConnectOptions.setUserName("public");
|
||||
mMqttConnectOptions.setMqttVersion(MqttConnectOptions.MQTT_VERSION_3_1_1);
|
||||
|
||||
try {
|
||||
mqttAndroidClient.connect(mMqttConnectOptions, null, iMqttActionListener);
|
||||
mqttAndroidClient.setCallback(mqttCallback);
|
||||
} catch (MqttException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
mqttAndroidClient.connect(mMqttConnectOptions, null, iMqttActionListener);
|
||||
mqttAndroidClient.setCallback(mqttCallback);
|
||||
|
||||
}
|
||||
|
||||
private synchronized void doClientConnection() {
|
||||
private synchronized void doClientConnection() throws MqttException {
|
||||
Logger.e("doClientConnection", "doClientConnection");
|
||||
if (!isAlreadyConnected() && isConnectIsNomarl()) {
|
||||
releaseMQTT();
|
||||
@@ -225,7 +222,7 @@ public class EMqttService extends Service implements NetworkUtils.OnNetworkStatu
|
||||
MqttException mqttException = (MqttException) arg1;
|
||||
Logger.e(TAG, "链接状态失败:" + mqttException.getMessage());
|
||||
}
|
||||
ThreadUtils.runOnUiThreadDelayed(connectTask, 1000);
|
||||
// ThreadUtils.runOnUiThreadDelayed(connectTask, 1000);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -236,7 +233,11 @@ public class EMqttService extends Service implements NetworkUtils.OnNetworkStatu
|
||||
@Override
|
||||
public void connectionLost(Throwable cause) {
|
||||
Logger.e(TAG, "链接断开,请检查网络");
|
||||
doClientConnection();
|
||||
try {
|
||||
doClientConnection();
|
||||
} catch (MqttException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -363,7 +364,11 @@ public class EMqttService extends Service implements NetworkUtils.OnNetworkStatu
|
||||
|
||||
@Override
|
||||
public void onConnected(NetworkUtils.NetworkType networkType) {
|
||||
doClientConnection();
|
||||
try {
|
||||
doClientConnection();
|
||||
} catch (MqttException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -34,9 +34,10 @@ import org.eclipse.paho.client.mqttv3.MqttMessage;
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
|
||||
public class MyMqttService extends Service {
|
||||
|
||||
private final static String TAG = MyMqttService.class.getCanonicalName();
|
||||
private final static String TAG = "lxj";
|
||||
|
||||
private static int qos = 2;
|
||||
private static String HOST = "tcp://81.70.45.221";
|
||||
@@ -74,26 +75,30 @@ public class MyMqttService extends Service {
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
init();
|
||||
try {
|
||||
init();
|
||||
} catch (MqttException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
private Notification createNotification() {
|
||||
// 创建你的前台通知
|
||||
Notification.Builder builder = null;
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
builder = new Notification.Builder(this, "channel_id")
|
||||
.setContentTitle("MQTT Service")
|
||||
.setSmallIcon(R.mipmap.default_avatar);
|
||||
}
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
NotificationChannel channel = new NotificationChannel(
|
||||
"channel_id", "MQTT Channel",
|
||||
NotificationManager.IMPORTANCE_LOW);
|
||||
NotificationManager manager = getSystemService(NotificationManager.class);
|
||||
manager.createNotificationChannel(channel);
|
||||
}
|
||||
return builder.build();
|
||||
}
|
||||
// private Notification createNotification() {
|
||||
// // 创建你的前台通知
|
||||
// Notification.Builder builder = null;
|
||||
// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
// builder = new Notification.Builder(this, "channel_id")
|
||||
// .setContentTitle("MQTT Service")
|
||||
// .setSmallIcon(R.mipmap.default_avatar);
|
||||
// }
|
||||
// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
// NotificationChannel channel = new NotificationChannel(
|
||||
// "channel_id", "MQTT Channel",
|
||||
// NotificationManager.IMPORTANCE_LOW);
|
||||
// NotificationManager manager = getSystemService(NotificationManager.class);
|
||||
// manager.createNotificationChannel(channel);
|
||||
// }
|
||||
// return builder.build();
|
||||
// }
|
||||
|
||||
/**
|
||||
* 开启服务
|
||||
@@ -127,28 +132,24 @@ public class MyMqttService extends Service {
|
||||
*
|
||||
* @param message 消息
|
||||
*/
|
||||
public static void publish(String topic, String message) {
|
||||
public static void publish(String topic, String message) throws MqttException {
|
||||
if (mqttAndroidClient == null) {
|
||||
Logger.e(TAG, "mqttAndroidClient is null", "发送失败");
|
||||
return;
|
||||
}
|
||||
try {
|
||||
//参数分别为:主题、消息的字节数组、服务质量、是否在服务器保留断开连接后的最后一条消息
|
||||
IMqttDeliveryToken publish = mqttAndroidClient.publish(topic, message.getBytes(), qos, false);
|
||||
publish.setActionCallback(new IMqttActionListener() {
|
||||
@Override
|
||||
public void onSuccess(IMqttToken asyncActionToken) {
|
||||
Logger.e(TAG, "发送消息", "发送成功");
|
||||
}
|
||||
//参数分别为:主题、消息的字节数组、服务质量、是否在服务器保留断开连接后的最后一条消息
|
||||
IMqttDeliveryToken publish = mqttAndroidClient.publish(topic, message.getBytes(), qos, false);
|
||||
publish.setActionCallback(new IMqttActionListener() {
|
||||
@Override
|
||||
public void onSuccess(IMqttToken asyncActionToken) {
|
||||
Logger.e(TAG, "发送消息", "发送成功");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(IMqttToken asyncActionToken, Throwable exception) {
|
||||
Logger.e(TAG, "发送消息", "发送失败");
|
||||
}
|
||||
});
|
||||
} catch (MqttException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
@Override
|
||||
public void onFailure(IMqttToken asyncActionToken, Throwable exception) {
|
||||
Logger.e(TAG, "发送消息", "发送失败");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -206,9 +207,9 @@ public class MyMqttService extends Service {
|
||||
/**
|
||||
* 初始化
|
||||
*/
|
||||
private void init() {
|
||||
private void init() throws MqttException {
|
||||
String CLIENTID = "android-" + CommonAppContext.getInstance().getUser().getUser_id() + "-" + MqttClient.generateClientId();
|
||||
mqttAndroidClient = new MqttAndroidClient(this, HOST, CLIENTID);
|
||||
mqttAndroidClient = new MqttAndroidClient(this, HOST, CLIENTID, MqttAndroidClient.Ack.AUTO_ACK);
|
||||
mqttAndroidClient.setCallback(mqttCallback); //设置监听订阅消息的回调
|
||||
mMqttConnectOptions = new MqttConnectOptions();
|
||||
mMqttConnectOptions.setCleanSession(false); //设置是否清除缓存
|
||||
@@ -216,39 +217,32 @@ public class MyMqttService extends Service {
|
||||
mMqttConnectOptions.setKeepAliveInterval(10); //设置心跳包发送间隔,单位:秒
|
||||
mMqttConnectOptions.setUserName("public"); //设置用户名
|
||||
// mMqttConnectOptions.setPassword(new char[0]); //设置密码
|
||||
mMqttConnectOptions.setMqttVersion(MqttConnectOptions.MQTT_VERSION_3_1);
|
||||
if (!mqttAndroidClient.isConnected()) {
|
||||
doClientConnection();
|
||||
}
|
||||
}
|
||||
|
||||
private void doClientConnection() {
|
||||
private void doClientConnection() throws MqttException {
|
||||
if (mqttAndroidClient != null && !mqttAndroidClient.isConnected() && isConnectIsNomarl() && b) {
|
||||
try {
|
||||
mqttAndroidClient.connect(mMqttConnectOptions, null, iMqttActionListener);
|
||||
} catch (MqttException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
mqttAndroidClient.connect(mMqttConnectOptions, null, iMqttActionListener);
|
||||
}
|
||||
}
|
||||
|
||||
public static void closeConnection() {
|
||||
public static void closeConnection() throws MqttException {
|
||||
if (mqttAndroidClient.isConnected()) {
|
||||
try {
|
||||
IMqttToken disconnect = mqttAndroidClient.disconnect();
|
||||
disconnect.setActionCallback(new IMqttActionListener() {
|
||||
@Override
|
||||
public void onSuccess(IMqttToken asyncActionToken) {
|
||||
Logger.e(TAG, "断开链接", "断开链接成功");
|
||||
}
|
||||
IMqttToken disconnect = mqttAndroidClient.disconnect();
|
||||
disconnect.setActionCallback(new IMqttActionListener() {
|
||||
@Override
|
||||
public void onSuccess(IMqttToken asyncActionToken) {
|
||||
Logger.e(TAG, "断开链接", "断开链接成功");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(IMqttToken asyncActionToken, Throwable exception) {
|
||||
Logger.e(TAG, "断开链接", "断开链接失败" + exception.getMessage());
|
||||
}
|
||||
});
|
||||
} catch (MqttException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
@Override
|
||||
public void onFailure(IMqttToken asyncActionToken, Throwable exception) {
|
||||
Logger.e(TAG, "断开链接", "断开链接失败" + exception.getMessage());
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -268,7 +262,11 @@ public class MyMqttService extends Service {
|
||||
HandlerUtil.getInstance(this).postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
doClientConnection();
|
||||
try {
|
||||
doClientConnection();
|
||||
} catch (MqttException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
}, 3000);
|
||||
return false;
|
||||
@@ -293,14 +291,18 @@ public class MyMqttService extends Service {
|
||||
if (mMyEmqttConnectListener != null) {
|
||||
mMyEmqttConnectListener.onConnectFailure();
|
||||
}
|
||||
if (arg0 instanceof MqttException) {
|
||||
Logger.e(TAG, "链接状态:", "链接失败" + ((MqttException) arg1).getMessage());
|
||||
}
|
||||
// if (arg0 instanceof MqttException) {
|
||||
//// Logger.e(TAG, "链接状态:", "链接失败" + ((MqttException) arg1).getMessage());
|
||||
// }
|
||||
HandlerUtil.getInstance(getApplicationContext()).postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (b) {
|
||||
doClientConnection();
|
||||
try {
|
||||
doClientConnection();
|
||||
} catch (MqttException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}, 3000);
|
||||
@@ -339,7 +341,11 @@ public class MyMqttService extends Service {
|
||||
@Override
|
||||
public void run() {
|
||||
if (b) {
|
||||
doClientConnection();
|
||||
try {
|
||||
doClientConnection();
|
||||
} catch (MqttException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}, 300);
|
||||
|
||||
@@ -17,6 +17,11 @@ public class ARouteConstants {
|
||||
public static final String ROOM_ALLOWANCE = "/modulevocal/RoomAllowanceActivity"; //补贴明细
|
||||
public static final String ROOM_ALLOWANCE_DETAIL = "/modulevocal/RoomAllowanceDetailActivity"; //补贴历史
|
||||
public static final String CURRENCY = "/modulevocal/CurrencyExchangeActivity"; //补贴历史
|
||||
public static final String CREATED_ROOM = "/modulevocal/CreatedRoomActivity"; //创建房间
|
||||
public static final String WITHDRAWAL_ACTIVITY = "/modulevocal/WithdrawalActivity"; //提现
|
||||
public static final String REAL_NAME_ACTIVITY ="/modulevocal/RealName1Activity"; //实名认证
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.qxcm.moduleutil.utils;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.res.Configuration;
|
||||
import android.content.res.Resources;
|
||||
|
||||
public class DisplayUtil {
|
||||
/**
|
||||
* 保持字体大小不随系统设置变化(用在界面加载之前)
|
||||
* 要重写Activity的attachBaseContext()
|
||||
*/
|
||||
public static Context attachBaseContext(Context context, float fontScale) {
|
||||
Configuration config = context.getResources().getConfiguration();
|
||||
//正确写法
|
||||
config.fontScale = fontScale;
|
||||
return context.createConfigurationContext(config);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保持字体大小不随系统设置变化(用在界面加载之前)
|
||||
* 要重写Activity的getResources()
|
||||
*/
|
||||
public static Resources getResources(Context context, Resources resources, float fontScale) {
|
||||
Configuration config = resources.getConfiguration();
|
||||
if(config.fontScale != fontScale) {
|
||||
config.fontScale = fontScale;
|
||||
return context.createConfigurationContext(config).getResources();
|
||||
} else {
|
||||
return resources;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存字体大小,后通知界面重建,它会触发attachBaseContext,来改变字号
|
||||
*/
|
||||
public static void recreate(Activity activity) {
|
||||
activity.recreate();
|
||||
}
|
||||
}
|
||||
@@ -9,7 +9,7 @@ public enum EnvironmentEnum {
|
||||
"qx-yusheng",
|
||||
"https://qx-yusheng.oss-cn-hangzhou.aliyuncs.com/",
|
||||
"wxc7681513be9f926b",
|
||||
1600086675,
|
||||
1600096860,
|
||||
"4a521d6f1c6343998b1c8fd425dea02a"),
|
||||
TEST(
|
||||
"http://chat.qxmier.com/",
|
||||
@@ -20,7 +20,7 @@ public enum EnvironmentEnum {
|
||||
"qx-yusheng",
|
||||
"https://qx-yusheng.oss-cn-hangzhou.aliyuncs.com/",
|
||||
"wxc7681513be9f926b",
|
||||
1600086675,
|
||||
1600096890,
|
||||
"4a521d6f1c6343998b1c8fd425dea02a");
|
||||
|
||||
private final String serverUrl;
|
||||
|
||||
@@ -70,6 +70,7 @@ public abstract class BaseWheatView extends ConstraintLayout implements IBaseWhe
|
||||
boolean closePhone = false;//自己麦位关闭话筒,用于判断声纹显示
|
||||
|
||||
public String pitNumber;
|
||||
public int pitImageVId;
|
||||
|
||||
public ImageView iv_zhul;
|
||||
public ImageView iv_on_line;
|
||||
@@ -222,6 +223,7 @@ public abstract class BaseWheatView extends ConstraintLayout implements IBaseWhe
|
||||
if (userId.equals(pitBean.getUser_id())) {
|
||||
if (soundLevel == 0) {
|
||||
mIvRipple.post(() -> {
|
||||
mIvRipple.stopAnimation();
|
||||
mIvRipple.setVisibility(GONE);
|
||||
});
|
||||
} else {
|
||||
@@ -232,11 +234,11 @@ public abstract class BaseWheatView extends ConstraintLayout implements IBaseWhe
|
||||
|
||||
});
|
||||
}
|
||||
if (pitBean.getUser_id().equals(SpUtil.getUserId()) && closePhone) {
|
||||
mIvRipple.post(() -> {
|
||||
mIvRipple.setVisibility(GONE);
|
||||
});
|
||||
}
|
||||
// if (pitBean.getUser_id().equals(SpUtil.getUserId()) && closePhone) {
|
||||
// mIvRipple.post(() -> {
|
||||
// mIvRipple.setVisibility(GONE);
|
||||
// });
|
||||
// }
|
||||
}
|
||||
// else {
|
||||
// mIvRipple.post(() -> {
|
||||
|
||||
@@ -10,11 +10,14 @@ import android.opengl.GLES11Ext;
|
||||
import android.opengl.GLES20;
|
||||
import android.opengl.GLSurfaceView;
|
||||
import android.opengl.Matrix;
|
||||
import android.os.Build;
|
||||
import android.os.Handler;
|
||||
import android.os.HandlerThread;
|
||||
import android.util.Log;
|
||||
import android.view.Surface;
|
||||
|
||||
import androidx.annotation.RequiresApi;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.ByteOrder;
|
||||
import java.nio.FloatBuffer;
|
||||
@@ -22,6 +25,7 @@ import java.nio.FloatBuffer;
|
||||
import javax.microedition.khronos.opengles.GL10;
|
||||
|
||||
|
||||
@RequiresApi(api = Build.VERSION_CODES.CUPCAKE)
|
||||
public class ChannelSplitRenderer1 implements GLSurfaceView.Renderer {
|
||||
|
||||
private static final String VERTEX_SHADER =
|
||||
|
||||
@@ -182,161 +182,13 @@ public class Constants {
|
||||
public static final String CASH_ACCOUNT_NAME = "cashAccountName";
|
||||
public static final String CASH_ACCOUNT_TYPE = "cashAccountType";
|
||||
|
||||
|
||||
public static final int RED_PACK_TYPE_AVERAGE = 0;//平均红包
|
||||
public static final int RED_PACK_TYPE_SHOU_QI = 1;//拼手气红包
|
||||
public static final int RED_PACK_SEND_TIME_NORMAL = 0;//立即发放
|
||||
public static final int RED_PACK_SEND_TIME_DELAY = 1;//延时发放
|
||||
|
||||
public static final int PUSH_TYPE_LIVE = 1;//直播
|
||||
public static final int PUSH_TYPE_MESSAGE = 2;//消息
|
||||
public static final String PUSH_TYPE = "pushType";
|
||||
public static final String PUSH_DATA = "pushData";
|
||||
|
||||
public static final String VIDEO_HOME = "videoHome";
|
||||
public static final String VIDEO_USER = "videoUser_";
|
||||
public static final String VIDEO_LIKE = "videoLike_";
|
||||
public static final String VIDEO_KEY = "videoKey";
|
||||
public static final String VIDEO_POSITION = "videoPosition";
|
||||
public static final String VIDEO_SINGLE = "videoSingle";
|
||||
public static final String VIDEO_PAGE = "videoPage";
|
||||
public static final String VIDEO_BEAN = "videoBean";
|
||||
public static final String VIDEO_ID = "videoId";
|
||||
public static final String VIDEO_COMMENT_BEAN = "videoCommnetBean";
|
||||
public static final String VIDEO_FACE_OPEN = "videoOpenFace";
|
||||
public static final String VIDEO_FACE_HEIGHT = "videoFaceHeight";
|
||||
public static final String VIDEO_DURATION = "videoDuration";
|
||||
public static final String VIDEO_PATH = "videoPath";
|
||||
public static final String VIDEO_PATH_WATER = "videoPathWater";
|
||||
public static final String VIDEO_FROM_RECORD = "videoFromRecord";
|
||||
public static final String VIDEO_MUSIC_ID = "videoMusicId";
|
||||
public static final String VIDEO_HAS_BGM = "videoHasBgm";
|
||||
public static final String VIDEO_MUSIC_NAME_PREFIX = "videoMusicName_";
|
||||
public static final String VIDEO_SAVE_TYPE = "videoSaveType";
|
||||
public static final int VIDEO_SAVE_SAVE_AND_PUB = 1;//保存并发布
|
||||
public static final int VIDEO_SAVE_SAVE = 2;//仅保存
|
||||
public static final int VIDEO_SAVE_PUB = 3;//仅发布
|
||||
|
||||
public static final String MOB_QQ = "qq";
|
||||
public static final String MOB_QZONE = "qzone";
|
||||
public static final String MOB_WX = "wx";
|
||||
public static final String MOB_WX_PYQ = "wchat";
|
||||
public static final String MOB_FACEBOOK = "facebook";
|
||||
public static final String MOB_TWITTER = "twitter";
|
||||
public static final String MOB_PHONE = "phone";
|
||||
|
||||
public static final String LIVE_SDK = "liveSdk";
|
||||
public static final String LIVE_CONFIG = "liveConfig";
|
||||
public static final int LIVE_SDK_TX = 1;//腾讯推流
|
||||
|
||||
|
||||
public static final int LINK_MIC_TYPE_NORMAL = 0;//观众与主播连麦
|
||||
public static final int LINK_MIC_TYPE_ANCHOR = 1;//主播与主播连麦
|
||||
|
||||
public static final String HAVE_STORE = "haveStore";
|
||||
public static final String IS_CHAT_ROOM = "isChatRoom";
|
||||
public static final String CHAT_ROOM_TYPE = "voiceChatRoomType";
|
||||
public static final String SCREEN_RECORD = "screenRecord";
|
||||
|
||||
public static final String MONEY_SIGN = "¥";
|
||||
|
||||
public static final String CHOOSE_IMG = "chooseImage";
|
||||
public static final String CHOOSE_LOCATION = "chooseLocation";
|
||||
public static final String ACTIVE_BEAN = "activeBean";
|
||||
//动态类型
|
||||
public static final int ACTIVE_TYPE_TEXT = 0;//0:纯文字;
|
||||
public static final int ACTIVE_TYPE_IMAGE = 1;//1:文字+图片;
|
||||
public static final int ACTIVE_TYPE_VIDEO = 2;//2:文字+视频;
|
||||
public static final int ACTIVE_TYPE_VOICE = 3;//3:文字+音频
|
||||
public static final int ACTIVE_TYPE_GOODS = 4;//4:文字+商品
|
||||
|
||||
|
||||
public static final int GIFT_TYPE_NORMAL = 0;//正常礼物
|
||||
public static final int GIFT_TYPE_DAO = 1;//道具
|
||||
public static final int GIFT_TYPE_PACK = 2;//背包
|
||||
|
||||
|
||||
public static final String MALL_APPLY_FAILED = "mallApplyFailed";
|
||||
public static final String MALL_APPLY_MANAGE_CLASS = "mallApplyManageClass";
|
||||
public static final String MALL_APPLY_BOND = "mallApplyBond";
|
||||
public static final String MALL_GOODS_CLASS = "mallGoodsClass";
|
||||
public static final String MALL_GOODS_ID = "mallGoodsId";
|
||||
public static final String MALL_GOODS_NAME = "mallGoodsName";
|
||||
public static final String MALL_GOODS_FROM_SHOP = "mallGoodsFromShop";
|
||||
public static final String MALL_CERT_IMG = "mallCertImg";
|
||||
public static final String MALL_CERT_TEXT = "mallCertText";
|
||||
|
||||
public static final String MALL_REFUND_NAME = "mallRefundName";
|
||||
public static final String MALL_REFUND_PHONE = "mallRefundPhone";
|
||||
public static final String MALL_REFUND_PROVINCE = "mallRefundProvince";
|
||||
public static final String MALL_REFUND_CITY = "mallRefundCity";
|
||||
public static final String MALL_REFUND_ZONE = "mallRefundZone";
|
||||
public static final String MALL_REFUND_ADDRESS = "mallRefundAddress";
|
||||
|
||||
public static final String MALL_BUYER_ADDRESS = "mallBuyerAddress";
|
||||
public static final String MALL_GOODS_SPEC = "mallGoodsSpec";
|
||||
public static final String MALL_GOODS_COUNT = "mallGoodsCount";
|
||||
public static final String MALL_POSTAGE = "mallPostage";
|
||||
public static final String MALL_SHOP_NAME = "mallShopName";
|
||||
|
||||
public static final int GOODS_TYPE_OUT = 1;//站外商品
|
||||
public static final int GOODS_TYPE_INNER = 2;//站内商品
|
||||
|
||||
public static final String MALL_ORDER_ID = "mallOrderId";
|
||||
public static final String MALL_ORDER_MONEY = "mallOrderMoney";
|
||||
public static final String MALL_ORDER_INDEX = "mallOrderIndex";
|
||||
public static final String MALL_PAY_GOODS_ORDER = "Buyer.goodsOrderPay";
|
||||
public static final String MALL_PAY_CONTENT_ALI = "Paidprogram.getAliOrder";
|
||||
public static final String MALL_PAY_CONTENT_WX = "Paidprogram.getWxOrder";
|
||||
public static final String MALL_PAY_CONTENT_PAYPAL = "Paidprogram.getBraintreePaypalOrder";
|
||||
|
||||
// 订单状态 -1已关闭,0待付款,1待发货,2待收货,3待评价,4已评价,5退款
|
||||
public static final int MALL_ORDER_STATUS_CLOSE = -1;
|
||||
public static final int MALL_ORDER_STATUS_WAIT_PAY = 0;
|
||||
public static final int MALL_ORDER_STATUS_WAIT_SEND = 1;
|
||||
public static final int MALL_ORDER_STATUS_WAIT_RECEIVE = 2;
|
||||
public static final int MALL_ORDER_STATUS_WAIT_COMMENT = 3;
|
||||
public static final int MALL_ORDER_STATUS_COMMENT = 4;
|
||||
public static final int MALL_ORDER_STATUS_REFUND = 5;
|
||||
|
||||
public static final String MALL_CASH_BALANCE = "mallCashBalance";
|
||||
public static final String MALL_CASH_TOTAL = "mallCashTotal";
|
||||
public static final String MALL_GOODS_ORDER = "goodsorder_admin";
|
||||
public static final String MALL_PLAT_UID = "1";
|
||||
|
||||
|
||||
public static final int VOICE_CTRL_EMPTY = 0;//无人且麦位可用
|
||||
public static final int VOICE_CTRL_BAN = 2;//无人且麦位不可用,被禁了
|
||||
public static final int VOICE_CTRL_CLOSE = -1;//有人且被关麦,无法说话
|
||||
public static final int VOICE_CTRL_OPEN = 1;//有人且正常说话
|
||||
public static final String VOICE_FACE = "voiceRoomFace";
|
||||
|
||||
public static final String NOT_LOGIN_UID = "-9999";//未登录的uid
|
||||
public static final String NOT_LOGIN_TOKEN = "-9999";//未登录的token
|
||||
|
||||
public static final int ZERO = 0;
|
||||
public static final String EMPTY_STRING = "";
|
||||
public static final String[] EMPTY_STRING_ARR = new String[]{};
|
||||
|
||||
public static final String IM_MSG_CONCAT = "dsp_fans";
|
||||
public static final String IM_MSG_LIKE = "dsp_like";
|
||||
public static final String IM_MSG_AT = "dsp_at";
|
||||
public static final String IM_MSG_COMMENT = "dsp_comment";
|
||||
public static final String IM_CUSTOM_METHOD_GOODS = "GoodsMsg";
|
||||
public static final String IM_CUSTOM_METHOD_ORDER = "order";
|
||||
|
||||
public static final int FLOAT_TYPE_DEFAULT = 0;
|
||||
public static final int FLOAT_TYPE_GOODS = 1;
|
||||
|
||||
public static final String LANGUAGE = "language";
|
||||
public static final String LANG_EN = "en";//英文
|
||||
public static final String LANG_ZH = "zh-cn";//中文
|
||||
public static final String SOCKET_CT_ZH = "ct";
|
||||
public static final String SOCKET_CT_EN = "ct_en";
|
||||
public static final int CHAT_ROOM_TYPE_VOICE = 0;
|
||||
public static final int CHAT_ROOM_TYPE_VIDEO = 1;
|
||||
|
||||
public static final String MUTE_REMOTE_AUDIO = "muteRemoteAudio";
|
||||
|
||||
public static final int PAYSUCESS = 0x0000;
|
||||
|
||||
@@ -355,7 +207,7 @@ public class Constants {
|
||||
|
||||
public static final String USER_UPDATE = "/api/UserData/modify_fist_user_info";
|
||||
|
||||
public static final String CHANGE_PASSWORD = "/api/UserData/modify_password";
|
||||
public static final String CHANGE_PASSWORD = "/api/UserData/modify_password";//设置密码
|
||||
|
||||
public static final String URL_LOGIN = "/api/Login/one_click_login";//一键登录
|
||||
public static final String URL_AUTH_CODE = "/api/Login/aliLogin";//支付宝登录
|
||||
@@ -499,6 +351,7 @@ public class Constants {
|
||||
public static final String GET_MY_BAG_OUTCOME = "/api/UserGiftPack/get_gift_pack_outcome";//背包礼物支出列表
|
||||
public static final String GET_GIFT_PACK = "/api/UserGiftPack/get_gift_pack_list";//获取背包礼物列表
|
||||
public static final String GET_WITHDRAWAL_LIST = "/api/UserWithdrawal/withdrawal_list";//提现记录
|
||||
public static final String POST_ROOM_RANK = "/api/Room/room_rank";//房间排行榜(财富、魅力)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -41,12 +41,14 @@ public class RoomMakeWheatView extends BaseWheatView {
|
||||
protected void initPit(Context context, AttributeSet attrs) {
|
||||
TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.RoomMakeWheatView);
|
||||
pitNumber = typedArray.getString(R.styleable.RoomMakeWheatView_room_make_wheat_number);
|
||||
pitImageVId=typedArray.getResourceId(R.styleable.RoomMakeWheatView_room_make_pic, 0);
|
||||
typedArray.recycle();
|
||||
mIvTagBoss = findViewById(R.id.iv_tag_boos);
|
||||
mTvTime = findViewById(R.id.tv_time);
|
||||
iv_on_line=findViewById(R.id.iv_online);
|
||||
iv_tag_type=findViewById(R.id.iv_tag_type);
|
||||
mCharmView = findViewById(R.id.charm_view);
|
||||
mRiv.setImageResource(pitImageVId);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
package com.qxcm.moduleutil.widget;
|
||||
|
||||
import android.os.CountDownTimer;
|
||||
|
||||
public class SilentCountDownTimer {
|
||||
private CountDownTimer countDownTimer;
|
||||
private long remainingMillis; // 剩余毫秒数
|
||||
private OnCountDownFinishListener listener;
|
||||
|
||||
public interface OnCountDownFinishListener {
|
||||
void onFinish();
|
||||
}
|
||||
|
||||
public void setOnCountDownFinishListener(OnCountDownFinishListener listener) {
|
||||
this.listener = listener;
|
||||
}
|
||||
|
||||
/**
|
||||
* 启动或更新倒计时
|
||||
*
|
||||
* @param targetTimestamp 目标时间戳(单位:秒)
|
||||
*/
|
||||
public void start(long targetTimestamp) {
|
||||
// 将目标时间戳(秒)转为毫秒,并计算剩余时间
|
||||
long currentTimeMillis = System.currentTimeMillis();
|
||||
long targetMillis = targetTimestamp * 1000L;
|
||||
remainingMillis = targetMillis - currentTimeMillis;
|
||||
|
||||
if (remainingMillis <= 0) {
|
||||
// 时间已过,直接结束
|
||||
finishCountDown();
|
||||
return;
|
||||
}
|
||||
|
||||
// 释放旧的倒计时
|
||||
if (countDownTimer != null) {
|
||||
countDownTimer.cancel();
|
||||
}
|
||||
|
||||
// 创建新倒计时
|
||||
countDownTimer = new CountDownTimer(remainingMillis, 1000) {
|
||||
@Override
|
||||
public void onTick(long millisUntilFinished) {
|
||||
remainingMillis = millisUntilFinished;
|
||||
// 可选:输出日志或做一些后台处理
|
||||
// Log.d("SilentCountDown", "剩余时间:" + millisUntilFinished / 1000 + " 秒");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFinish() {
|
||||
finishCountDown();
|
||||
}
|
||||
};
|
||||
|
||||
countDownTimer.start();
|
||||
}
|
||||
|
||||
private void finishCountDown() {
|
||||
if (listener != null) {
|
||||
listener.onFinish(); // 回调完成
|
||||
}
|
||||
release(); // 释放资源
|
||||
}
|
||||
|
||||
/**
|
||||
* 销毁倒计时并释放资源
|
||||
*/
|
||||
public void release() {
|
||||
if (countDownTimer != null) {
|
||||
countDownTimer.cancel();
|
||||
countDownTimer = null;
|
||||
}
|
||||
listener = null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,21 +13,27 @@ import com.blankj.utilcode.util.ScreenUtils;
|
||||
|
||||
/**
|
||||
* 可拖拽悬浮
|
||||
* 稳定版悬浮窗控件 - 支持点击/拖动分离、适配横竖屏、自动吸附边缘
|
||||
*/
|
||||
public class FloatingMagnetView extends FrameLayout {
|
||||
|
||||
public static final int MARGIN_EDGE = 0;
|
||||
private float mOriginalRawX;
|
||||
private float mOriginalRawY;
|
||||
private float mOriginalX;
|
||||
private float mOriginalY;
|
||||
private static final int TOUCH_TIME_THRESHOLD = 150;
|
||||
private float mOriginalX, mOriginalY; // 当前 View 的坐标
|
||||
private float mOriginalRawX, mOriginalRawY; // 触摸点的原始屏幕坐标
|
||||
private long mLastTouchDownTime;
|
||||
protected MoveAnimator mMoveAnimator;
|
||||
protected int mScreenWidth;
|
||||
private boolean isDragging = false;
|
||||
private boolean isNearestLeft = true;
|
||||
|
||||
private int mScreenWidth;
|
||||
private int mScreenHeight;
|
||||
private int mStatusBarHeight;
|
||||
private boolean isNearestLeft = true;
|
||||
|
||||
private MoveAnimator mMoveAnimator;
|
||||
|
||||
private OnFloatingClickListener listener;
|
||||
|
||||
private static final int TOUCH_TIME_THRESHOLD = 150;
|
||||
private static final float CLICK_DRAG_THRESHOLD = 10;
|
||||
|
||||
public FloatingMagnetView(Context context) {
|
||||
this(context, null);
|
||||
@@ -50,58 +56,89 @@ public class FloatingMagnetView extends FrameLayout {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onTouchEvent(MotionEvent event) {
|
||||
if (event == null) {
|
||||
return false;
|
||||
protected void onConfigurationChanged(Configuration newConfig) {
|
||||
super.onConfigurationChanged(newConfig);
|
||||
updateSize();
|
||||
moveToEdge(isNearestLeft);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onInterceptTouchEvent(MotionEvent ev) {
|
||||
switch (ev.getAction()) {
|
||||
case MotionEvent.ACTION_DOWN:
|
||||
return false; // 不拦截,让子控件优先处理点击
|
||||
|
||||
case MotionEvent.ACTION_MOVE:
|
||||
float dx = Math.abs(ev.getX() - (mOriginalRawX - mOriginalX));
|
||||
float dy = Math.abs(ev.getY() - (mOriginalRawY - mOriginalY));
|
||||
if (dx > CLICK_DRAG_THRESHOLD || dy > CLICK_DRAG_THRESHOLD) {
|
||||
isDragging = true;
|
||||
}
|
||||
return isDragging;
|
||||
|
||||
case MotionEvent.ACTION_UP:
|
||||
case MotionEvent.ACTION_CANCEL:
|
||||
isDragging = false;
|
||||
return false;
|
||||
|
||||
default:
|
||||
return super.onInterceptTouchEvent(ev);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onTouchEvent(MotionEvent event) {
|
||||
if (event == null) return false;
|
||||
|
||||
switch (event.getAction()) {
|
||||
case MotionEvent.ACTION_DOWN:
|
||||
changeOriginalTouchParams(event);
|
||||
updateSize();
|
||||
mOriginalX = getX();
|
||||
mOriginalY = getY();
|
||||
mOriginalRawX = event.getRawX();
|
||||
mOriginalRawY = event.getRawY();
|
||||
mLastTouchDownTime = System.currentTimeMillis();
|
||||
mMoveAnimator.stop();
|
||||
isDragging = false;
|
||||
break;
|
||||
|
||||
case MotionEvent.ACTION_MOVE:
|
||||
updateViewPosition(event);
|
||||
if (isDragging) {
|
||||
float newX = mOriginalX + (event.getRawX() - mOriginalRawX);
|
||||
float newY = mOriginalY + (event.getRawY() - mOriginalRawY);
|
||||
|
||||
// 限制 Y 轴边界
|
||||
if (newY < mStatusBarHeight) newY = mStatusBarHeight;
|
||||
if (newY > mScreenHeight - getHeight()) newY = mScreenHeight - getHeight();
|
||||
|
||||
setX(newX);
|
||||
setY(newY);
|
||||
}
|
||||
break;
|
||||
|
||||
case MotionEvent.ACTION_UP:
|
||||
moveToEdge();
|
||||
if (isOnClickEvent()) {
|
||||
if (listener != null) {
|
||||
listener.onClick();
|
||||
}
|
||||
} else {
|
||||
moveToEdge();
|
||||
}
|
||||
isDragging = false;
|
||||
break;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
protected boolean isOnClickEvent() {
|
||||
return System.currentTimeMillis() - mLastTouchDownTime < TOUCH_TIME_THRESHOLD;
|
||||
private boolean isOnClickEvent() {
|
||||
long time = System.currentTimeMillis() - mLastTouchDownTime;
|
||||
float dx = Math.abs(getX() - mOriginalX);
|
||||
float dy = Math.abs(getY() - mOriginalY);
|
||||
return time < TOUCH_TIME_THRESHOLD && dx < CLICK_DRAG_THRESHOLD && dy < CLICK_DRAG_THRESHOLD;
|
||||
}
|
||||
|
||||
private void updateViewPosition(MotionEvent event) {
|
||||
setX(mOriginalX + event.getRawX() - mOriginalRawX);
|
||||
// 限制不可超出屏幕高度
|
||||
float desY = mOriginalY + event.getRawY() - mOriginalRawY;
|
||||
if (desY < mStatusBarHeight) {
|
||||
desY = mStatusBarHeight;
|
||||
}
|
||||
if (desY > mScreenHeight - getHeight()) {
|
||||
desY = mScreenHeight - getHeight();
|
||||
}
|
||||
setY(desY);
|
||||
}
|
||||
|
||||
private void changeOriginalTouchParams(MotionEvent event) {
|
||||
mOriginalX = getX();
|
||||
mOriginalY = getY();
|
||||
mOriginalRawX = event.getRawX();
|
||||
mOriginalRawY = event.getRawY();
|
||||
mLastTouchDownTime = System.currentTimeMillis();
|
||||
}
|
||||
|
||||
protected void updateSize() {
|
||||
mScreenWidth = (ScreenUtils.getScreenWidth() - this.getWidth());
|
||||
private void updateSize() {
|
||||
mScreenWidth = ScreenUtils.getScreenWidth() - getWidth();
|
||||
mScreenHeight = ScreenUtils.getScreenHeight();
|
||||
}
|
||||
|
||||
@@ -110,69 +147,55 @@ public class FloatingMagnetView extends FrameLayout {
|
||||
}
|
||||
|
||||
public void moveToEdge(boolean isLeft) {
|
||||
float moveDistance = isLeft ? MARGIN_EDGE : mScreenWidth - MARGIN_EDGE;
|
||||
mMoveAnimator.start(moveDistance, getY());
|
||||
float moveX = isLeft ? MARGIN_EDGE : mScreenWidth - MARGIN_EDGE;
|
||||
mMoveAnimator.start(moveX, getY());
|
||||
isNearestLeft = isLeft;
|
||||
}
|
||||
|
||||
protected boolean isNearestLeft() {
|
||||
int middle = mScreenWidth / 2;
|
||||
isNearestLeft = getX() < middle;
|
||||
return isNearestLeft;
|
||||
return getX() < middle;
|
||||
}
|
||||
|
||||
|
||||
protected class MoveAnimator implements Runnable {
|
||||
|
||||
private Handler handler = new Handler(Looper.getMainLooper());
|
||||
private float destinationX;
|
||||
private float destinationY;
|
||||
private long startingTime;
|
||||
private float destinationX, destinationY;
|
||||
private long startTime;
|
||||
|
||||
void start(float x, float y) {
|
||||
this.destinationX = x;
|
||||
this.destinationY = y;
|
||||
startingTime = System.currentTimeMillis();
|
||||
this.startTime = System.currentTimeMillis();
|
||||
handler.post(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
if (getRootView() == null || getRootView().getParent() == null) {
|
||||
return;
|
||||
}
|
||||
float progress = Math.min(1, (System.currentTimeMillis() - startingTime) / 400f);
|
||||
if (getRootView() == null || getRootView().getParent() == null) return;
|
||||
|
||||
float progress = Math.min(1f, (System.currentTimeMillis() - startTime) / 400f);
|
||||
float deltaX = (destinationX - getX()) * progress;
|
||||
float deltaY = (destinationY - getY()) * progress;
|
||||
move(deltaX, deltaY);
|
||||
if (progress < 1) {
|
||||
|
||||
setX(getX() + deltaX);
|
||||
setY(getY() + deltaY);
|
||||
|
||||
if (progress < 1f) {
|
||||
handler.post(this);
|
||||
}
|
||||
}
|
||||
|
||||
private void stop() {
|
||||
void stop() {
|
||||
handler.removeCallbacks(this);
|
||||
}
|
||||
}
|
||||
|
||||
private void move(float deltaX, float deltaY) {
|
||||
setX(getX() + deltaX);
|
||||
setY(getY() + deltaY);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onConfigurationChanged(Configuration newConfig) {
|
||||
super.onConfigurationChanged(newConfig);
|
||||
updateSize();
|
||||
moveToEdge(isNearestLeft);
|
||||
}
|
||||
|
||||
public void setListener(OnFloatingClickListener listener) {
|
||||
public void setOnFloatingClickListener(OnFloatingClickListener listener) {
|
||||
this.listener = listener;
|
||||
}
|
||||
|
||||
private OnFloatingClickListener listener;
|
||||
|
||||
public interface OnFloatingClickListener {
|
||||
void onClick();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 82 KiB |
BIN
moduleUtil/src/main/res/mipmap-xxxhdpi/headline_b.png
Normal file
|
After Width: | Height: | Size: 8.7 KiB |
BIN
moduleUtil/src/main/res/mipmap-xxxhdpi/image_yq.png
Normal file
|
After Width: | Height: | Size: 6.4 KiB |
BIN
moduleUtil/src/main/res/mipmap-xxxhdpi/qm_b.png
Normal file
|
After Width: | Height: | Size: 1.1 MiB |
BIN
moduleUtil/src/main/res/mipmap-xxxhdpi/tt_c.png
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
moduleUtil/src/main/res/mipmap-xxxhdpi/tt_q.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
moduleUtil/src/main/res/mipmap-xxxhdpi/tt_yc.png
Normal file
|
After Width: | Height: | Size: 612 B |
BIN
moduleUtil/src/main/res/mipmap-xxxhdpi/za_bj.png
Normal file
|
After Width: | Height: | Size: 680 KiB |
BIN
moduleUtil/src/main/res/mipmap-xxxhdpi/za_g.png
Normal file
|
After Width: | Height: | Size: 4.6 KiB |
BIN
moduleUtil/src/main/res/mipmap-xxxhdpi/za_l.png
Normal file
|
After Width: | Height: | Size: 4.6 KiB |
BIN
moduleUtil/src/main/res/mipmap-xxxhdpi/za_ljjp.png
Normal file
|
After Width: | Height: | Size: 56 KiB |
BIN
moduleUtil/src/main/res/mipmap-xxxhdpi/za_m.png
Normal file
|
After Width: | Height: | Size: 36 KiB |
BIN
moduleUtil/src/main/res/mipmap-xxxhdpi/za_maiw.png
Normal file
|
After Width: | Height: | Size: 181 KiB |
BIN
moduleUtil/src/main/res/mipmap-xxxhdpi/za_p.png
Normal file
|
After Width: | Height: | Size: 56 KiB |
BIN
moduleUtil/src/main/res/mipmap-xxxhdpi/za_s.png
Normal file
|
After Width: | Height: | Size: 30 KiB |
BIN
moduleUtil/src/main/res/mipmap-xxxhdpi/za_sj.png
Normal file
|
After Width: | Height: | Size: 4.7 KiB |
BIN
moduleUtil/src/main/res/mipmap-xxxhdpi/za_t.png
Normal file
|
After Width: | Height: | Size: 465 KiB |
@@ -120,7 +120,7 @@ public class DynamicDetailActivity extends BaseMvpActivity<CirclePresenter, Acti
|
||||
|
||||
@Override
|
||||
public void onDiandianClick(CircleListBean item) {
|
||||
ShareDialog shareDialog = new ShareDialog(DynamicDetailActivity.this, item.getContent(), item.getShare_url(), item.getTopic_id(),3,item.getUser_id() + "",item);
|
||||
ShareDialog shareDialog = new ShareDialog(DynamicDetailActivity.this, item.getContent(), item.getShare_url(), item.getId()+"",3,item.getUser_id() + "",item);
|
||||
shareDialog.setOnShareDataListener(new ShareDialog.OnShareDataListener() {
|
||||
|
||||
@Override
|
||||
|
||||
@@ -92,7 +92,7 @@ public class DynamicListActivity extends BaseMvpActivity<CirclePresenter, Activi
|
||||
|
||||
@Override
|
||||
public void onDiandianClick(CircleListBean item) {
|
||||
ShareDialog shareDialog= new ShareDialog(DynamicListActivity.this,item.getContent(),item.getShare_url(),item.getTopic_id(),3,item.getUser_id()+"",item);
|
||||
ShareDialog shareDialog= new ShareDialog(DynamicListActivity.this,item.getContent(),item.getShare_url(),item.getId()+"",3,item.getUser_id()+"",item);
|
||||
shareDialog.setOnShareDataListener(new ShareDialog.OnShareDataListener(){
|
||||
|
||||
@Override
|
||||
|
||||
@@ -130,7 +130,7 @@ public class CircleCategoryFragment extends BaseMvpFragment<CirclePresenter, Fra
|
||||
|
||||
@Override
|
||||
public void onDiandianClick(CircleListBean item) {//点击点点,分享等
|
||||
ShareDialog shareDialog = new ShareDialog(getContext(), item.getContent(),item.getShare_url(),item.getTopic_id(),3,item.getUser_id()+"",item);
|
||||
ShareDialog shareDialog = new ShareDialog(getContext(), item.getContent(),item.getShare_url(),item.getId()+"",3,item.getUser_id()+"",item);
|
||||
shareDialog.setOnShareDataListener(new ShareDialog.OnShareDataListener() {
|
||||
|
||||
@Override
|
||||
@@ -226,7 +226,7 @@ public class CircleCategoryFragment extends BaseMvpFragment<CirclePresenter, Fra
|
||||
|
||||
@Override
|
||||
public void setLikeZone() {
|
||||
// MvpPre.getCircleList(page + "", "10");
|
||||
MvpPre.getCircleList(page + "", "10");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -350,11 +350,11 @@ public class MainActivity extends BaseMvpActivity<HomePresenter, ActivityMainBin
|
||||
@Override
|
||||
public void setUnReadCount(int unreadMessageCount) {
|
||||
if (unreadMessageCount == 0) {
|
||||
mBinding.tvMessage0.setVisibility(View.GONE);
|
||||
mBinding.tvMessage0.setText("0");
|
||||
mBinding.tvMessage.setVisibility(View.GONE);
|
||||
mBinding.tvMessage.setText("0");
|
||||
} else {
|
||||
mBinding.tvMessage0.setVisibility(View.VISIBLE);
|
||||
mBinding.tvMessage0.setText(String.valueOf(unreadMessageCount));
|
||||
mBinding.tvMessage.setVisibility(View.VISIBLE);
|
||||
mBinding.tvMessage.setText(String.valueOf(unreadMessageCount));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@
|
||||
android:src="@drawable/main_bottom_bar_icon_news" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_message0"
|
||||
android:id="@+id/tv_message"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dp_10"
|
||||
|
||||
@@ -51,6 +51,8 @@ import com.lzf.easyfloat.EasyFloat;
|
||||
import com.petterp.floatingx.assist.helper.FxScopeHelper;
|
||||
import com.petterp.floatingx.listener.control.IFxControl;
|
||||
import com.qxcm.moduleutil.base.CommonAppContext;
|
||||
import com.qxcm.moduleutil.bean.HeadlineBean;
|
||||
import com.qxcm.moduleutil.bean.HeadlineEvent;
|
||||
import com.qxcm.moduleutil.bean.UserInfo;
|
||||
import com.qxcm.moduleutil.bean.room.RoomOnline;
|
||||
import com.qxcm.moduleutil.databinding.RoomDialogMusicWindowOpenBinding;
|
||||
@@ -86,6 +88,7 @@ import com.qxcm.moduleutil.utils.ImageUtils;
|
||||
import com.qxcm.moduleutil.utils.SpUtil;
|
||||
import com.qxcm.moduleutil.widget.CustomMusicFloatingView;
|
||||
import com.qxcm.moduleutil.widget.MusicView;
|
||||
import com.qxcm.moduleutil.widget.SilentCountDownTimer;
|
||||
import com.qxcm.moduleutil.widget.ViewUtils;
|
||||
import com.qxcm.moduleutil.widget.floatingView.FloatingMagnetView;
|
||||
import com.tencent.imsdk.v2.V2TIMCallback;
|
||||
@@ -133,6 +136,9 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
private boolean isFullScreen = false;
|
||||
private ImageView ivExitFullscreen;
|
||||
ImageView ivQuan;
|
||||
private boolean imYc;
|
||||
|
||||
private SilentCountDownTimer silentCountDownTimer;
|
||||
|
||||
@Override
|
||||
protected void onNewIntent(Intent intent) {
|
||||
@@ -152,13 +158,13 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onKeyDown(int keyCode, KeyEvent event) {
|
||||
if (keyCode == KeyEvent.KEYCODE_BACK) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
// @Override
|
||||
// public boolean onKeyDown(int keyCode, KeyEvent event) {
|
||||
// if (keyCode == KeyEvent.KEYCODE_BACK) {
|
||||
// return true;
|
||||
// }
|
||||
// return false;
|
||||
// }
|
||||
|
||||
// 禁用系统手势导航
|
||||
|
||||
@@ -536,7 +542,7 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
|
||||
public void upRoomInfo(RoomInfoResp resp) {
|
||||
this.mRoomInfoResp = resp;
|
||||
if (mRoomInfoResp.getRoom_info().getPit_list().get(8).getUser_id().equals(SpUtil.getUserId() + "")) {
|
||||
if (mRoomInfoResp.getUser_info().getPit_number()==9 && mRoomInfoResp.getUser_info().getUser_id().equals(SpUtil.getUserId() + "")) {
|
||||
mBinding.roomTop.rl.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
mBinding.roomTop.rl.setVisibility(View.GONE);
|
||||
@@ -610,23 +616,89 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
AgoraManager.getInstance(this).stopMuisc();
|
||||
initializeAudio();
|
||||
|
||||
|
||||
toutiao();
|
||||
upRoomInfo(resp);
|
||||
}
|
||||
|
||||
public void toutiao(){
|
||||
if (mRoomInfoResp.getRoom_info().getHead_line() != null) {
|
||||
mBinding.flaoatZuoji.setVisibility(VISIBLE);
|
||||
// 设置 OnTouchListener,强制悬浮框自己处理拖动
|
||||
|
||||
ImageUtils.loadHeadCC(mRoomInfoResp.getRoom_info().getHead_line().getAvatar(), mBinding.headAvate);
|
||||
mBinding.headName.setText(mRoomInfoResp.getRoom_info().getHead_line().getNickname());
|
||||
mBinding.headCone.setText(mRoomInfoResp.getRoom_info().getHead_line().getContent());
|
||||
mBinding.cc.setOnClickListener(v -> {
|
||||
mBinding.flaoatZuoji.setVisibility(GONE);
|
||||
});
|
||||
// mBinding.cc.setOnClickListener(v -> {
|
||||
// mBinding.flaoatZuoji.setVisibility(GONE);
|
||||
// });
|
||||
mBinding.ivQuanQiang.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
PublishCommentDialogFragment.show(getSupportFragmentManager());
|
||||
mBinding.flaoatZuoji.setVisibility(GONE);
|
||||
PublishCommentDialogFragment.show(roomId,getSupportFragmentManager());
|
||||
}
|
||||
});
|
||||
|
||||
mBinding.ivQuanC.setOnClickListener(new View.OnClickListener() {//这是跟随的意思
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
ARouter.getInstance().build(ARouteConstants.ROOM_DETAILS).withString("from", "我的界面").withString("roomId", mRoomInfoResp.getRoom_info().getHead_line().getRoom_id() ).navigation();
|
||||
}
|
||||
});
|
||||
|
||||
mBinding.imYc.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (imYc){
|
||||
mBinding.cl.setVisibility(VISIBLE);
|
||||
imYc = false;
|
||||
}else {
|
||||
mBinding.cl.setVisibility(GONE);
|
||||
imYc = true;
|
||||
}
|
||||
}
|
||||
});
|
||||
mBinding.imHq.setOnClickListener(new View.OnClickListener(){
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (!imYc){
|
||||
mBinding.cl.setVisibility(VISIBLE);
|
||||
imYc = true;
|
||||
}else {
|
||||
mBinding.cl.setVisibility(GONE);
|
||||
imYc = false;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
silentCountDownTimer = new SilentCountDownTimer();
|
||||
silentCountDownTimer.setOnCountDownFinishListener(() -> {
|
||||
// 倒计时结束后的操作
|
||||
Log.d("CountDown", "倒计时结束,执行清理或通知操作");
|
||||
hideSomeViewOrDoSomething();
|
||||
});
|
||||
|
||||
// 启动倒计时(例如:目标时间戳 1752661716)
|
||||
silentCountDownTimer.start(Long.parseLong(mRoomInfoResp.getRoom_info().getHead_line().getEnd_time()));
|
||||
}else {
|
||||
mBinding.flaoatZuoji.setVisibility(GONE);
|
||||
}
|
||||
}
|
||||
private void hideSomeViewOrDoSomething() {
|
||||
runOnUiThread(() -> {
|
||||
// 执行你需要的操作,比如隐藏某个控件
|
||||
// mBinding.someView.setVisibility(View.GONE);
|
||||
mBinding.flaoatZuoji.setVisibility(GONE);
|
||||
});
|
||||
}
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onHeadlineEvent(HeadlineBean event) {
|
||||
mRoomInfoResp.getRoom_info().setHead_line(event);
|
||||
toutiao();
|
||||
}
|
||||
|
||||
/**
|
||||
* @author qx
|
||||
@@ -933,6 +1005,9 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
||||
if (isSave) {
|
||||
finish();
|
||||
}
|
||||
if (silentCountDownTimer != null) {
|
||||
silentCountDownTimer.release();
|
||||
}
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ public class RankingAutcionAdapter extends BaseQuickAdapter<RoomAuction.AuctionL
|
||||
protected void convert(BaseViewHolder helper, RoomAuction.AuctionListBean item) {
|
||||
helper.setText(R.id.room_item_seq, String.valueOf(helper.getAdapterPosition() + 4));//从第四个开始设置值
|
||||
helper.setText(R.id.room_item_name, item.getNickname());
|
||||
helper.setText(R.id.room_item_pop, item.getGift_price());
|
||||
helper.setText(R.id.room_item_pop, item.getGift_prices());
|
||||
ImageUtils.loadHeadCC(item.getAvatar(), helper.getView(R.id.room_item_head));
|
||||
helper.addOnClickListener(R.id.room_item_head);
|
||||
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
package com.example.moduleroom.adapter;
|
||||
|
||||
import static com.qxcm.moduleutil.utils.UtilConfig.getContext;
|
||||
|
||||
import android.graphics.Color;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
@@ -17,59 +20,71 @@ import com.qxcm.moduleutil.utils.ImageUtils;
|
||||
import com.qxcm.moduleutil.utils.logger.Logger;
|
||||
import com.qxcm.moduleutil.widget.BeautifulNameView;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 项目名称 qipao-android
|
||||
* 包名:com.qpyy.room.adapter
|
||||
* 创建人 黄强
|
||||
* 创建时间 2020/7/25 10:37
|
||||
* 描述 describe
|
||||
*@author qx
|
||||
*@data 2025/7/16
|
||||
*@description: 房间榜单适配器
|
||||
*/
|
||||
public class RankingCharmListAdapter extends BaseQuickAdapter<CharmRankingResp.ListsBean, BaseViewHolder> {
|
||||
public class RankingCharmListAdapter extends BaseQuickAdapter<CharmRankingResp, BaseViewHolder> {
|
||||
|
||||
private static String GG = "0";
|
||||
private static String MM = "1";
|
||||
|
||||
public RankingCharmListAdapter() {
|
||||
super(R.layout.room_rv_item_ranking);
|
||||
super(R.layout.room_rv_item_ranking_rich);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void convert(BaseViewHolder helper, CharmRankingResp.ListsBean item) {
|
||||
protected void convert(BaseViewHolder helper, CharmRankingResp item) {
|
||||
//数据绑定赋值
|
||||
helper.setText(R.id.room_item_seq, String.valueOf(helper.getAdapterPosition() + 4));//从第四个开始设置值
|
||||
helper.setText(R.id.room_item_name, item.getNickname());
|
||||
// ((BeautifulNameView) helper.getView(R.id.bnv_rank_list_room)).setText(String.format(mContext.getResources().getString(R.string.common_id_formatter), item.getUser_code()));
|
||||
// ((BeautifulNameView) helper.getView(R.id.bnv_rank_list_room)).setTextColor(!TextUtils.isEmpty(item.getId_color()) ? Color.parseColor(item.getId_color()) : mContext.getResources().getColor(R.color.color_FFCCCCCC));
|
||||
((BeautifulNameView) helper.getView(R.id.bnv_rank_list_room)).setPlay(!TextUtils.isEmpty(item.getId_color()));
|
||||
((BeautifulNameView) helper.getView(R.id.bnv_rank_list_room)).setImgVisible("1".equals(item.getGood_number()));
|
||||
helper.setText(R.id.room_item_pop, item.getNumber_format());
|
||||
helper.setText(R.id.room_item_pop, item.getTotal());
|
||||
// if (GG.equals(item.getSex())) {
|
||||
// helper.setBackgroundRes(R.id.room_item_pop, R.mipmap.room_bg_wheat_charm_gg_sr);
|
||||
// } else {
|
||||
// helper.setBackgroundRes(R.id.room_item_pop, R.mipmap.room_bg_wheat_charm_mm_sr);
|
||||
// }
|
||||
ImageUtils.loadHeadCC(item.getHead_picture(), helper.getView(R.id.room_item_head));
|
||||
String nobility = item.getLevel_icon();//等级
|
||||
String status = item.getNobility_icon();//爵位
|
||||
ImageUtils.loadImageView(item.getNobility_icon(), helper.getView(R.id.room_item_rank));
|
||||
ImageUtils.loadImageView(item.getLevel_icon(), helper.getView(R.id.room_item_grade));
|
||||
if (TextUtils.isEmpty(nobility)) {
|
||||
helper.getView(R.id.room_item_grade).setVisibility(View.GONE);
|
||||
} else {
|
||||
helper.getView(R.id.room_item_grade).setVisibility(View.VISIBLE);
|
||||
}
|
||||
if (TextUtils.isEmpty(status)) {
|
||||
helper.getView(R.id.room_item_rank).setVisibility(View.GONE);
|
||||
} else {
|
||||
helper.getView(R.id.room_item_rank).setVisibility(View.VISIBLE);
|
||||
}
|
||||
TextView textView = helper.getView(R.id.room_item_pop);
|
||||
if (helper.getAdapterPosition() % 2 == 1) {
|
||||
helper.getView(R.id.room_item_bg).setVisibility(View.GONE);//隔开隐藏背景
|
||||
} else {
|
||||
helper.getView(R.id.room_item_bg).setVisibility(View.VISIBLE);
|
||||
}
|
||||
ImageUtils.loadHeadCC(item.getAvatar(), helper.getView(R.id.room_item_head));
|
||||
// if (TextUtils.isEmpty(nobility)) {
|
||||
// helper.getView(R.id.room_item_grade).setVisibility(View.GONE);
|
||||
// } else {
|
||||
// helper.getView(R.id.room_item_grade).setVisibility(View.VISIBLE);
|
||||
// }
|
||||
// if (TextUtils.isEmpty(status)) {
|
||||
// helper.getView(R.id.room_item_rank).setVisibility(View.GONE);
|
||||
// } else {
|
||||
// helper.getView(R.id.room_item_rank).setVisibility(View.VISIBLE);
|
||||
// }
|
||||
// TextView textView = helper.getView(R.id.room_item_pop);
|
||||
// if (helper.getAdapterPosition() % 2 == 1) {
|
||||
// helper.getView(R.id.room_item_bg).setVisibility(View.GONE);//隔开隐藏背景
|
||||
// } else {
|
||||
// helper.getView(R.id.room_item_bg).setVisibility(View.VISIBLE);
|
||||
// }
|
||||
helper.addOnClickListener(R.id.room_item_head);
|
||||
LinearLayout ll = helper.getView(R.id.bnv_rank_list_rich);
|
||||
List<String> images = item.getIcon(); // 获取图片列表
|
||||
|
||||
for (String url : images) {
|
||||
if (url.contains("http")) {
|
||||
ImageView imageView1 = new ImageView(getContext());
|
||||
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(
|
||||
getContext().getResources().getDimensionPixelSize(com.qxcm.moduleutil.R.dimen.dp_37),
|
||||
getContext().getResources().getDimensionPixelSize(com.qxcm.moduleutil.R.dimen.dp_15)
|
||||
);
|
||||
params.setMargins(0, 0, getContext().getResources().getDimensionPixelSize(com.qxcm.moduleutil.R.dimen.dp_5), 0); // 右边距
|
||||
imageView1.setLayoutParams(params);
|
||||
imageView1.setScaleType(ImageView.ScaleType.FIT_CENTER);
|
||||
|
||||
// 使用 Glide 加载图片
|
||||
ImageUtils.loadHeadCC(url, imageView1);
|
||||
|
||||
ll.addView(imageView1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -20,29 +20,21 @@ public class DataListContacts {
|
||||
public interface View extends IView<Activity> {
|
||||
|
||||
//榜一更新
|
||||
void setNo1(CharmRankingResp.ListsBean listsBean);
|
||||
void setNo1(WealthRankingResp.ListsBean listsBean);
|
||||
|
||||
void setNo1(CharmRankingResp listsBean);
|
||||
//榜二更新
|
||||
void setNo2(CharmRankingResp.ListsBean listsBean);
|
||||
void setNo2(WealthRankingResp.ListsBean listsBean);
|
||||
|
||||
void setNo2(CharmRankingResp listsBean);
|
||||
//榜三更新
|
||||
void setNo3(CharmRankingResp.ListsBean listsBean);
|
||||
void setNo3(WealthRankingResp.ListsBean listsBean);
|
||||
|
||||
void setNo3(CharmRankingResp listsBean);
|
||||
//魅力榜和魅力榜界面更新
|
||||
void setCharmView(List<CharmRankingResp.ListsBean> listsBeans);
|
||||
void setWealthView(List<WealthRankingResp.ListsBean> listsBeans);
|
||||
|
||||
void setCharmEmpty();
|
||||
void setCharmEmpty( List<CharmRankingResp> list);
|
||||
|
||||
void setWealthEmpty();
|
||||
}
|
||||
public interface IRoomDataListPre extends IPresenter {
|
||||
|
||||
//定义魅力榜数据访问接口
|
||||
void getCharmListInfo(String roomId,int type);
|
||||
void getCharmListInfo(String roomId,String type, String time_type, String page, String page_limit);
|
||||
|
||||
//定义财富榜数据访问接口
|
||||
void getWealthListInfo(String roomId,int type);
|
||||
|
||||
@@ -12,7 +12,7 @@ public class PublishCommentContacts {
|
||||
void currentHeadline(HeadlineBean headlineBean);
|
||||
}
|
||||
public interface IRoomPre extends IPresenter {
|
||||
void sendHeadine(String content,String money);
|
||||
void sendHeadine(String content,String money,String roomId);
|
||||
|
||||
void currentHeadline();
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@ public class BidListDialogFragment extends BaseMvpDialogFragment<BidListPresente
|
||||
);
|
||||
params.setMargins(0, 0, getContext().getResources().getDimensionPixelSize(com.qxcm.moduleutil.R.dimen.dp_5), 0); // 右边距
|
||||
imageView1.setLayoutParams(params);
|
||||
imageView1.setScaleType(ImageView.ScaleType.CENTER_CROP);
|
||||
imageView1.setScaleType(ImageView.ScaleType.FIT_CENTER);
|
||||
|
||||
// 使用 Glide 加载图片
|
||||
ImageUtils.loadHeadCC(url, imageView1);
|
||||
@@ -107,7 +107,7 @@ public class BidListDialogFragment extends BaseMvpDialogFragment<BidListPresente
|
||||
}
|
||||
}
|
||||
|
||||
mBinding.roomHeadTop1Label.setText(listsBean.getGift_price());
|
||||
mBinding.roomHeadTop1Label.setText(listsBean.getGift_prices());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -137,7 +137,7 @@ public class BidListDialogFragment extends BaseMvpDialogFragment<BidListPresente
|
||||
}
|
||||
}
|
||||
|
||||
mBinding.roomHeadTop2Label.setText(listsBean.getGift_price());
|
||||
mBinding.roomHeadTop2Label.setText(listsBean.getGift_prices());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -167,7 +167,7 @@ public class BidListDialogFragment extends BaseMvpDialogFragment<BidListPresente
|
||||
}
|
||||
}
|
||||
|
||||
mBinding.roomHeadTop3Label.setText(listsBean.getGift_price());
|
||||
mBinding.roomHeadTop3Label.setText(listsBean.getGift_prices());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -92,6 +92,9 @@ public class CardRelationshipFragment extends BaseMvpDialogFragment<CardRelation
|
||||
// 可选:设置动画样式(从底部弹出)
|
||||
window.setWindowAnimations(com.qxcm.moduleutil.R.style.CommonShowDialogBottom);
|
||||
}
|
||||
// 设置不可通过点击外部关闭
|
||||
getDialog().setCancelable(false);
|
||||
getDialog().setCanceledOnTouchOutside(false);
|
||||
}
|
||||
@Override
|
||||
protected void initDialogStyle(Window window) {
|
||||
|
||||
@@ -27,15 +27,16 @@ import com.qxcm.moduleutil.bean.HeadlineBean;
|
||||
*/
|
||||
public class PublishCommentDialogFragment extends BaseMvpDialogFragment<PublishCommentPresenter, DialogPublishCommentBinding> implements PublishCommentContacts.View{
|
||||
HeadlineBean headlineBean;
|
||||
String roomId;
|
||||
@Override
|
||||
protected PublishCommentPresenter bindPresenter() {
|
||||
return new PublishCommentPresenter(this, getActivity());
|
||||
}
|
||||
|
||||
public static void show( FragmentManager fragmentManager) {
|
||||
public static void show(String roomId, FragmentManager fragmentManager) {
|
||||
PublishCommentDialogFragment dialogFragment = new PublishCommentDialogFragment();
|
||||
Bundle args = new Bundle();
|
||||
|
||||
args.putString("roomId", roomId);
|
||||
dialogFragment.setArguments(args);
|
||||
dialogFragment.show(fragmentManager, "PublishCommentDialogFragment");
|
||||
}
|
||||
@@ -60,6 +61,7 @@ public class PublishCommentDialogFragment extends BaseMvpDialogFragment<PublishC
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
roomId=getArguments().getString("roomId");
|
||||
MvpPre.currentHeadline();
|
||||
}
|
||||
|
||||
@@ -79,7 +81,7 @@ public class PublishCommentDialogFragment extends BaseMvpDialogFragment<PublishC
|
||||
ToastUtils.showShort("请输入内容");
|
||||
return;
|
||||
}
|
||||
MvpPre.sendHeadine(mBinding.edRoomName.getText().toString().trim(),headlineBean.getNext_money() );
|
||||
MvpPre.sendHeadine(mBinding.edRoomName.getText().toString().trim(),headlineBean.getNext_money(),roomId );
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.example.moduleroom.dialog;
|
||||
import static com.qxcm.moduleutil.bean.room.RoomSettingBean.QXRoomSettingTypeRoomOrderMic;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
@@ -13,6 +14,7 @@ import androidx.annotation.NonNull;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.blankj.utilcode.util.GsonUtils;
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||
import com.example.moduleroom.R;
|
||||
@@ -31,6 +33,7 @@ import com.qxcm.moduleutil.bean.RoomMessageEvent;
|
||||
import com.qxcm.moduleutil.bean.RoomSettingEvent;
|
||||
import com.qxcm.moduleutil.bean.room.RoomInfoResp;
|
||||
import com.qxcm.moduleutil.bean.room.RoomSettingBean;
|
||||
import com.qxcm.moduleutil.utils.ARouteConstants;
|
||||
import com.qxcm.moduleutil.utils.SpUtil;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
@@ -242,6 +245,8 @@ public class RoomSettingFragment extends BaseMvpDialogFragment<RoomSettingPresen
|
||||
|
||||
}else if (bean.getType()==RoomSettingBean.QXRoomSettingTypeRoomTypeGirl){
|
||||
|
||||
}else if (bean.getType()==RoomSettingBean.QXRoomSettingTypeRoomSetting){
|
||||
ARouter.getInstance().build(ARouteConstants.CREATED_ROOM).withSerializable("roomInfoResp", roomInfoResp).navigation();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -290,7 +295,7 @@ public class RoomSettingFragment extends BaseMvpDialogFragment<RoomSettingPresen
|
||||
mBinding.cl.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
PublishCommentDialogFragment.show(getChildFragmentManager());
|
||||
PublishCommentDialogFragment.show(roomId,getChildFragmentManager());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -257,8 +257,8 @@ public class RoomUserInfoFragment extends BaseMvpDialogFragment<RoomUserPresente
|
||||
Map<String, String> textMap = new HashMap<>();
|
||||
textMap.put("is_manager", userInfo.getIs_manager().equals("1") ? "取消管理" : "设为管理");
|
||||
textMap.put("is_host", userInfo.getIs_host().equals("1") ? "取消主持" : "设为主持");
|
||||
textMap.put("is_mute", userInfo.getIs_mute().equals("1") ? "开麦" : "禁麦");
|
||||
textMap.put("is_mute_pit", userInfo.getIs_mute_pit().equals("1") ? "解除禁言" : "禁言");
|
||||
textMap.put("is_mute", userInfo.getIs_mute_pit().equals("1") ? "开麦" : "禁麦");
|
||||
textMap.put("is_mute_pit", userInfo.getIs_mute().equals("1") ? "解除禁言" : "禁言");
|
||||
|
||||
switch (type) {
|
||||
case 1:
|
||||
@@ -292,7 +292,7 @@ public class RoomUserInfoFragment extends BaseMvpDialogFragment<RoomUserPresente
|
||||
// ImageUtils.loadHeadCC(userInfo.getAvatar(), mBinding.ivAvatar);
|
||||
mBinding.ivAvatar.setData(userInfo.getAvatar(), "", userInfo.getSex() + "");
|
||||
mBinding.tvName.setText(userInfo.getNickname());
|
||||
mBinding.tvId.setText("ID:" + userInfo.getUser_id());
|
||||
mBinding.tvId.setText("ID:" + userInfo.getUser_code());
|
||||
if (userInfo.getIs_in_pit() == 1) {
|
||||
mBinding.roomMCz.setText("下麦");
|
||||
} else {
|
||||
|
||||
@@ -499,10 +499,17 @@ public class PublicScreenEaseChatFragment extends BaseMvpFragment<PublicScreenEa
|
||||
}
|
||||
EventBus.getDefault().post(message);
|
||||
return;
|
||||
}else if (message.getMsgType()==1016||message.getMsgType()==1026){
|
||||
}else if (message.getMsgType()==1016){
|
||||
if (message.getText().getFromUserInfo().getUser_id()==SpUtil.getUserId()) {
|
||||
easeChatAdapter.addData(new EMMessageInfo(message));
|
||||
}
|
||||
EventBus.getDefault().post(message);
|
||||
return;
|
||||
}else if (message.getMsgType()==1003){
|
||||
}else if (message.getMsgType()==1026){
|
||||
EventBus.getDefault().post(message);
|
||||
return;
|
||||
}
|
||||
else if (message.getMsgType()==1003){
|
||||
EventBus.getDefault().post(message);
|
||||
easeChatAdapter.addData(new EMMessageInfo(message));
|
||||
scrollToBottomIfNeed();
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
package com.example.moduleroom.fragment;
|
||||
|
||||
import static com.qxcm.moduleutil.utils.UtilConfig.getContext;
|
||||
|
||||
import android.graphics.Color;
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
@@ -92,6 +96,7 @@ public class RankingChildFragment extends BaseMvpFragment<DataListPresenter, Roo
|
||||
wAdapter.bindToRecyclerView(mBinding.rankRecycleView);
|
||||
}
|
||||
// onRefreshEvent(null);
|
||||
MvpPre.getCharmListInfo(roomId, rankType+"", dataType+"","1","20");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -116,7 +121,7 @@ public class RankingChildFragment extends BaseMvpFragment<DataListPresenter, Roo
|
||||
@Override
|
||||
public void onItemChildClick(BaseQuickAdapter adapter, View view, int position) {
|
||||
if (view.getId() == R.id.room_item_head) {
|
||||
CharmRankingResp.ListsBean item = cAdapter.getItem(position);
|
||||
CharmRankingResp item = cAdapter.getItem(position);
|
||||
// ARouter.getInstance().build(ARouteConstants.NEW_HOME_PAGE).withString("userId", item.getUser_id()).withBoolean("returnRoom", true).navigation();
|
||||
}
|
||||
}
|
||||
@@ -141,20 +146,14 @@ public class RankingChildFragment extends BaseMvpFragment<DataListPresenter, Roo
|
||||
return R.layout.room_ranking_child;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void setNo1(CharmRankingResp.ListsBean listsBean) {//魅力排行榜一数据设值
|
||||
ImageUtils.loadHeadCC(listsBean.getHead_picture(), mBinding.roomRankTop1HeadIcon);
|
||||
setSexBg(mBinding.roomHeadTop1Label, listsBean.getSex());
|
||||
public void setNo1(CharmRankingResp listsBean) {
|
||||
ImageUtils.loadHeadCC(listsBean.getAvatar(), mBinding.roomRankTop1HeadIcon);
|
||||
mBinding.roomTop1Name.setText(listsBean.getNickname());
|
||||
// mBinding.bnvFirst.setText(String.format(getString(R.string.room_rank_list_id_formatter), listsBean.getUser_code()));
|
||||
// mBinding.bnvFirst.setTextColor(!TextUtils.isEmpty(listsBean.getId_color()) ? Color.parseColor(listsBean.getId_color()) : getResources().getColor(R.color.color_white));
|
||||
mBinding.bnvFirst.setPlay(!TextUtils.isEmpty(listsBean.getId_color()));
|
||||
mBinding.bnvFirst.setImgVisible("1".equals(listsBean.getGood_number()));
|
||||
mBinding.roomHeadTop1Label.setText(listsBean.getNumber_format());
|
||||
mBinding.roomTop1Label.setVisibility(TextUtils.isEmpty(listsBean.getLevel_icon()) ? View.GONE : View.VISIBLE);
|
||||
ImageUtils.loadImageView(listsBean.getLevel_icon(), mBinding.roomTop1Label);
|
||||
mBinding.roomTop1Grade.setVisibility(TextUtils.isEmpty(listsBean.getNobility_icon()) ? View.GONE : View.VISIBLE);
|
||||
ImageUtils.loadImageView(listsBean.getNobility_icon(), mBinding.roomTop1Grade);
|
||||
mBinding.roomHeadTop1Label.setText(listsBean.getTotal());
|
||||
setview(listsBean.getIcon(), mBinding.llVip1);
|
||||
mBinding.roomRankTop1HeadIcon.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
@@ -164,40 +163,11 @@ public class RankingChildFragment extends BaseMvpFragment<DataListPresenter, Roo
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setNo1(WealthRankingResp.ListsBean listsBean) {//财富排行榜一数据设值
|
||||
ImageUtils.loadHeadCC(listsBean.getHead_picture(), mBinding.roomRankTop1HeadIcon);
|
||||
mBinding.roomTop1Name.setText(listsBean.getNickname());
|
||||
// mBinding.bnvFirst.setText(String.format(getString(R.string.room_rank_list_id_formatter), listsBean.getUser_code()));
|
||||
// mBinding.bnvFirst.setTextColor(!TextUtils.isEmpty(listsBean.getId_color()) ? Color.parseColor(listsBean.getId_color()) : getResources().getColor(R.color.color_white));
|
||||
mBinding.bnvFirst.setPlay(!TextUtils.isEmpty(listsBean.getId_color()));
|
||||
mBinding.bnvFirst.setImgVisible("1".equals(listsBean.getGood_number()));
|
||||
mBinding.roomHeadTop1Label.setText(listsBean.getNumber_format());
|
||||
mBinding.roomTop1Label.setVisibility(TextUtils.isEmpty(listsBean.getLevel_icon()) ? View.GONE : View.VISIBLE);
|
||||
ImageUtils.loadImageView(listsBean.getLevel_icon(), mBinding.roomTop1Label);
|
||||
mBinding.roomTop1Grade.setVisibility(TextUtils.isEmpty(listsBean.getNobility_icon()) ? View.GONE : View.VISIBLE);
|
||||
ImageUtils.loadImageView(listsBean.getNobility_icon(), mBinding.roomTop1Grade);
|
||||
mBinding.roomRankTop1HeadIcon.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
// ARouter.getInstance().build(ARouteConstants.NEW_HOME_PAGE).withString("userId", listsBean.getUser_id()).withBoolean("returnRoom", true).navigation();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setNo2(CharmRankingResp.ListsBean listsBean) {//魅力榜二
|
||||
ImageUtils.loadHeadCC(listsBean.getHead_picture(), mBinding.roomRankTop2HeadIcon);
|
||||
setSexBg(mBinding.roomHeadTop2Label, listsBean.getSex());
|
||||
public void setNo2(CharmRankingResp listsBean) {
|
||||
ImageUtils.loadHeadCC(listsBean.getAvatar(), mBinding.roomRankTop2HeadIcon);
|
||||
mBinding.roomTop2Name.setText(listsBean.getNickname());
|
||||
// mBinding.bnvSecond.setText(String.format(getString(R.string.room_rank_list_id_formatter), listsBean.getUser_code()));
|
||||
// mBinding.bnvSecond.setTextColor(!TextUtils.isEmpty(listsBean.getId_color()) ? Color.parseColor(listsBean.getId_color()) : getResources().getColor(R.color.color_white));
|
||||
mBinding.bnvSecond.setPlay(!TextUtils.isEmpty(listsBean.getId_color()));
|
||||
mBinding.bnvSecond.setImgVisible("1".equals(listsBean.getGood_number()));
|
||||
mBinding.roomHeadTop2Label.setText(listsBean.getNumber_format());
|
||||
mBinding.roomTop2Label.setVisibility(TextUtils.isEmpty(listsBean.getLevel_icon()) ? View.GONE : View.VISIBLE);
|
||||
ImageUtils.loadImageView(listsBean.getLevel_icon(), mBinding.roomTop2Label);
|
||||
mBinding.roomTop2Grade.setVisibility(TextUtils.isEmpty(listsBean.getNobility_icon()) ? View.GONE : View.VISIBLE);
|
||||
ImageUtils.loadImageView(listsBean.getNobility_icon(), mBinding.roomTop2Grade);
|
||||
mBinding.roomHeadTop2Label.setText(listsBean.getTotal());
|
||||
setview(listsBean.getIcon(), mBinding.llVip2);
|
||||
mBinding.roomRankTop2HeadIcon.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
@@ -206,41 +176,34 @@ public class RankingChildFragment extends BaseMvpFragment<DataListPresenter, Roo
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setNo2(WealthRankingResp.ListsBean listsBean) {//财富榜二
|
||||
ImageUtils.loadHeadCC(listsBean.getHead_picture(), mBinding.roomRankTop2HeadIcon);
|
||||
mBinding.roomTop2Name.setText(listsBean.getNickname());
|
||||
// mBinding.bnvSecond.setText(String.format(getString(R.string.room_rank_list_id_formatter), listsBean.getUser_code()));
|
||||
// mBinding.bnvSecond.setTextColor(!TextUtils.isEmpty(listsBean.getId_color()) ? Color.parseColor(listsBean.getId_color()) : getResources().getColor(R.color.color_white));
|
||||
mBinding.bnvSecond.setPlay(!TextUtils.isEmpty(listsBean.getId_color()));
|
||||
mBinding.bnvSecond.setImgVisible("1".equals(listsBean.getGood_number()));
|
||||
mBinding.roomHeadTop2Label.setText(listsBean.getNumber_format());
|
||||
mBinding.roomTop2Label.setVisibility(TextUtils.isEmpty(listsBean.getLevel_icon()) ? View.GONE : View.VISIBLE);
|
||||
ImageUtils.loadImageView(listsBean.getLevel_icon(), mBinding.roomTop2Label);
|
||||
mBinding.roomTop2Grade.setVisibility(TextUtils.isEmpty(listsBean.getNobility_icon()) ? View.GONE : View.VISIBLE);
|
||||
ImageUtils.loadImageView(listsBean.getNobility_icon(), mBinding.roomTop2Grade);
|
||||
mBinding.roomRankTop2HeadIcon.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
// ARouter.getInstance().build(ARouteConstants.NEW_HOME_PAGE).withString("userId", listsBean.getUser_id()).withBoolean("returnRoom", true).navigation();
|
||||
private void setview(List<String> item, LinearLayout llContainer){
|
||||
List<String> images = item; // 获取图片列表
|
||||
|
||||
for (String url : images) {
|
||||
if (url.contains("http")) {
|
||||
ImageView imageView1 = new ImageView(getContext());
|
||||
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(
|
||||
getContext().getResources().getDimensionPixelSize(com.qxcm.moduleutil.R.dimen.dp_37),
|
||||
getContext().getResources().getDimensionPixelSize(com.qxcm.moduleutil.R.dimen.dp_15)
|
||||
);
|
||||
params.setMargins(0, 0, getContext().getResources().getDimensionPixelSize(com.qxcm.moduleutil.R.dimen.dp_5), 0); // 右边距
|
||||
imageView1.setLayoutParams(params);
|
||||
imageView1.setScaleType(ImageView.ScaleType.FIT_CENTER);
|
||||
|
||||
// 使用 Glide 加载图片
|
||||
ImageUtils.loadHeadCC(url, imageView1);
|
||||
|
||||
llContainer.addView(imageView1);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setNo3(CharmRankingResp.ListsBean listsBean) {//魅力榜三
|
||||
ImageUtils.loadHeadCC(listsBean.getHead_picture(), mBinding.roomRankTop3HeadIcon);
|
||||
setSexBg(mBinding.roomHeadTop3Label, listsBean.getSex());
|
||||
public void setNo3(CharmRankingResp listsBean) {
|
||||
ImageUtils.loadHeadCC(listsBean.getAvatar(), mBinding.roomRankTop3HeadIcon);
|
||||
mBinding.roomTop3Name.setText(listsBean.getNickname());
|
||||
// mBinding.bnvThird.setText(String.format(getString(R.string.room_rank_list_id_formatter), listsBean.getUser_code()));
|
||||
// mBinding.bnvThird.setTextColor(!TextUtils.isEmpty(listsBean.getId_color()) ? Color.parseColor(listsBean.getId_color()) : getResources().getColor(R.color.color_white));
|
||||
mBinding.bnvThird.setPlay(!TextUtils.isEmpty(listsBean.getId_color()));
|
||||
mBinding.bnvThird.setImgVisible("1".equals(listsBean.getGood_number()));
|
||||
mBinding.roomHeadTop3Label.setText(listsBean.getNumber_format());
|
||||
mBinding.roomTop3Label.setVisibility(TextUtils.isEmpty(listsBean.getLevel_icon()) ? View.GONE : View.VISIBLE);
|
||||
ImageUtils.loadImageView(listsBean.getLevel_icon(), mBinding.roomTop3Label);
|
||||
mBinding.roomTop3Grade.setVisibility(TextUtils.isEmpty(listsBean.getNobility_icon()) ? View.GONE : View.VISIBLE);
|
||||
ImageUtils.loadImageView(listsBean.getNobility_icon(), mBinding.roomTop3Grade);
|
||||
mBinding.roomHeadTop3Label.setText(listsBean.getTotal());
|
||||
setview(listsBean.getIcon(), mBinding.llVip3);
|
||||
mBinding.roomRankTop3HeadIcon.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
@@ -250,40 +213,8 @@ public class RankingChildFragment extends BaseMvpFragment<DataListPresenter, Roo
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setNo3(WealthRankingResp.ListsBean listsBean) {//财富榜三
|
||||
ImageUtils.loadHeadCC(listsBean.getHead_picture(), mBinding.roomRankTop3HeadIcon);
|
||||
mBinding.roomTop3Name.setText(listsBean.getNickname());
|
||||
// mBinding.bnvThird.setText(String.format(getString(R.string.room_rank_list_id_formatter), listsBean.getUser_code()));
|
||||
// mBinding.bnvThird.setTextColor(!TextUtils.isEmpty(listsBean.getId_color()) ? Color.parseColor(listsBean.getId_color()) : getResources().getColor(R.color.color_white));
|
||||
mBinding.bnvThird.setPlay(!TextUtils.isEmpty(listsBean.getId_color()));
|
||||
mBinding.bnvThird.setImgVisible("1".equals(listsBean.getGood_number()));
|
||||
mBinding.roomHeadTop3Label.setText(listsBean.getNumber_format());
|
||||
mBinding.roomTop3Label.setVisibility(TextUtils.isEmpty(listsBean.getLevel_icon()) ? View.GONE : View.VISIBLE);
|
||||
ImageUtils.loadImageView(listsBean.getLevel_icon(), mBinding.roomTop3Label);
|
||||
mBinding.roomTop3Grade.setVisibility(TextUtils.isEmpty(listsBean.getNobility_icon()) ? View.GONE : View.VISIBLE);
|
||||
ImageUtils.loadImageView(listsBean.getNobility_icon(), mBinding.roomTop3Grade);
|
||||
mBinding.roomRankTop3HeadIcon.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
// ARouter.getInstance().build(ARouteConstants.NEW_HOME_PAGE).withString("userId", listsBean.getUser_id()).withBoolean("returnRoom", true).navigation();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCharmView(List<CharmRankingResp.ListsBean> listsBeans) {
|
||||
cAdapter.setNewData(listsBeans);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setWealthView(List<WealthRankingResp.ListsBean> listsBeans) {
|
||||
wAdapter.setNewData(listsBeans);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCharmEmpty() {
|
||||
cAdapter.setEmptyView(commonEmptyView);
|
||||
public void setCharmEmpty(List<CharmRankingResp> list) {
|
||||
cAdapter.setNewData( list);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -308,21 +239,11 @@ public class RankingChildFragment extends BaseMvpFragment<DataListPresenter, Roo
|
||||
@Override
|
||||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
// EventBus.getDefault().register(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroyView() {
|
||||
// EventBus.getDefault().unregister(this);
|
||||
super.onDestroyView();
|
||||
}
|
||||
|
||||
// @Subscribe(threadMode = ThreadMode.MAIN)
|
||||
// public void onRefreshEvent(RankingRefreshEvent event) {
|
||||
// if (rankType == 1) {
|
||||
// MvpPre.getCharmListInfo(roomId, dataType);
|
||||
// } else {
|
||||
// MvpPre.getWealthListInfo(roomId, dataType);
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@ import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
import androidx.core.content.ContextCompat;
|
||||
|
||||
import com.blankj.utilcode.util.LogUtils;
|
||||
@@ -138,6 +139,7 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
||||
}
|
||||
RoomPitBean roomPitBean = roomInfoResp.getRoom_info().getPit_list().get(0);
|
||||
if (roomPitBean.getUser_id() != null && !roomPitBean.getUser_id().isEmpty() && !roomPitBean.getUser_id().equals("0")) {
|
||||
roomPitBean.setIs_pm(1);
|
||||
wheatView.setData(roomPitBean);
|
||||
}
|
||||
parentFragment = (RoomFragment) getParentFragment();
|
||||
@@ -153,8 +155,9 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
||||
roomPitBean1.setDress(auctionUserBean.getDress());
|
||||
roomPitBean1.setSex(auctionUserBean.getSex());
|
||||
roomPitBean1.setPit_number("888");
|
||||
roomPitBean1.setIs_pm(1);
|
||||
wheatView2.setData(roomPitBean1);
|
||||
|
||||
mBinding.tvPB.setText(auctionUserBean.getCharm());
|
||||
countDownTime(auctionUserBean.getDuration());
|
||||
if (auctionUserBean.getUser_id() != null && auctionUserBean.getUser_id().equals(SpUtil.getUserId() + "")) {
|
||||
mBinding.ivJp.setVisibility(INVISIBLE);
|
||||
@@ -191,7 +194,9 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
||||
roomPitBean1.setUser_id("");
|
||||
roomPitBean1.setNickname("");
|
||||
roomPitBean1.setAvatar("");
|
||||
roomPitBean1.setIs_pm(1);
|
||||
wheatView2.setData(roomPitBean1);
|
||||
mBinding.tvPB.setText("0");
|
||||
auctionId = "";
|
||||
SpUtil.setAuctionId("");
|
||||
}
|
||||
@@ -205,8 +210,12 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
||||
mBinding.roomMakeWheat.setOnClickListener(this::onChock);
|
||||
mBinding.roomMakeWheat2.setOnClickListener(this::onChock);
|
||||
mBinding.bangdan.setOnClickListener(this::onChock);
|
||||
mBinding.ivAuction1.setOnClickListener(this::onChock);
|
||||
mBinding.ivAuction2.setOnClickListener(this::onChock);
|
||||
mBinding.ivAuction3.setOnClickListener(this::onChock);
|
||||
getTextView();
|
||||
initOverlayButtons();
|
||||
steView(type);
|
||||
}
|
||||
|
||||
private void onChock(View view) {
|
||||
@@ -242,8 +251,20 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
||||
MvpPre.auctionDelay(SpUtil.getauctionId());
|
||||
} else if (id == R.id.im_action_js) {
|
||||
MvpPre.auctionEnd(SpUtil.getauctionId());
|
||||
} else if (id == R.id.bangdan) {
|
||||
} else if (id == R.id.bangdan) {//出价榜单
|
||||
BidListDialogFragment.newInstance(SpUtil.getauctionId()).show(getChildFragmentManager(), "BidListDialogFragment");
|
||||
} else if (id == R.id.iv_auction1) {
|
||||
if (mBinding.ivAuction1.getUserId() != null && !mBinding.ivAuction1.getUserId().equals("")) {
|
||||
RoomUserInfoFragment.show(roomInfoResp.getRoom_info().getRoom_id(), mBinding.ivAuction1.getUserId(), mBinding.ivAuction1.pitNumber, getHostUser(), false, getChildFragmentManager());
|
||||
}
|
||||
} else if (id == R.id.iv_auction2) {
|
||||
if (mBinding.ivAuction2.getUserId() != null && !mBinding.ivAuction2.getUserId().equals("")) {
|
||||
RoomUserInfoFragment.show(roomInfoResp.getRoom_info().getRoom_id(), mBinding.ivAuction2.getUserId(), mBinding.ivAuction2.pitNumber, getHostUser(), false, getChildFragmentManager());
|
||||
}
|
||||
} else if (id == R.id.iv_auction3) {
|
||||
if (mBinding.ivAuction3.getUserId() != null && !mBinding.ivAuction3.getUserId().equals("")) {
|
||||
RoomUserInfoFragment.show(roomInfoResp.getRoom_info().getRoom_id(), mBinding.ivAuction3.getUserId(), mBinding.ivAuction3.pitNumber, getHostUser(), false, getChildFragmentManager());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -251,29 +272,22 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
||||
private void getTextView() {
|
||||
int defaultColor = ContextCompat.getColor(requireContext(), com.qxcm.moduleutil.R.color.color_0DFFB9); // 原亲密拍颜色
|
||||
int selectedColor = Color.WHITE; // 原真爱拍颜色
|
||||
|
||||
float defaultSize = 24f; // 亲密拍默认字体大小
|
||||
float selectedSize = 16f; // 真爱拍默认字体大小
|
||||
|
||||
// if (type == 2) {
|
||||
toggleTextStyles(mBinding.qinmi, mBinding.zhenai, defaultColor, selectedColor, defaultSize, selectedSize, type);
|
||||
// } else if (type == 1) {
|
||||
// toggleTextStyles( mBinding.zhenai,mBinding.qinmi, defaultColor, selectedColor, defaultSize, selectedSize);
|
||||
// }
|
||||
|
||||
if (type == 1) {
|
||||
toggleTextStyles(mBinding.qinmi, mBinding.zhenai, defaultColor, selectedColor, defaultSize, selectedSize, type);
|
||||
}else {
|
||||
toggleTextStyles(mBinding.zhenai, mBinding.qinmi, defaultColor, selectedColor, defaultSize, selectedSize, type);
|
||||
}
|
||||
|
||||
mBinding.zhenai.setOnClickListener(v -> {
|
||||
// type = 1;
|
||||
// toggleTextStyles(mBinding.qinmi, mBinding.zhenai, defaultColor, selectedColor, defaultSize, selectedSize);
|
||||
if (wheatView.getUserId().equals(SpUtil.getUserId() + "")) {
|
||||
// 判断 wheatView2 是否有人
|
||||
if (wheatView2 != null && wheatView2.getUserId() != null && !wheatView2.getUserId().isEmpty()) {
|
||||
// 显示提示:竞拍进行中
|
||||
// showAlertDialog("提示", "竞拍正在进行中,请稍后再操作");
|
||||
ToastUtils.show("竞拍正在进行中,请稍后再操作");
|
||||
} else {
|
||||
// 显示确认对话框
|
||||
// showConfirmDialog(1);
|
||||
queren(1);
|
||||
}
|
||||
} else {
|
||||
@@ -286,11 +300,9 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
||||
|
||||
if (wheatView2 != null && wheatView2.getUserId() != null && !wheatView2.getUserId().isEmpty()) {
|
||||
// 显示提示:竞拍进行中
|
||||
// showAlertDialog("提示", "竞拍正在进行中,请稍后再操作");
|
||||
ToastUtils.show("竞拍正在进行中,请稍后再操作");
|
||||
} else {
|
||||
// 显示确认对话框
|
||||
// showConfirmDialog(2);
|
||||
queren(2);
|
||||
}
|
||||
} else {
|
||||
@@ -309,20 +321,80 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
||||
"确认",
|
||||
"取消",
|
||||
v -> {
|
||||
steView(newType);
|
||||
// 点击“确认”按钮时执行
|
||||
// MvpPre.agreeSong(roomId, "1");
|
||||
MvpPre.auctionMode(roomInfoResp.getRoom_info().getRoom_id(), newType == 1 ? "1" : "2");
|
||||
// type = newType;
|
||||
// toggleTextStyles(mBinding.qinmi, mBinding.zhenai,
|
||||
// ContextCompat.getColor(requireContext(), com.qxcm.moduleutil.R.color.color_0DFFB9),
|
||||
// Color.WHITE, 24f, 16f);
|
||||
},
|
||||
v -> {
|
||||
// 点击“取消”按钮时什么都不做
|
||||
// MvpPre.agreeSong(roomId, "2");
|
||||
}, false, 0).show();
|
||||
}
|
||||
|
||||
private void steView(int type) {
|
||||
if (type == 1) {
|
||||
mBinding.tvPB.setVisibility(VISIBLE);
|
||||
mBinding.ccc.setBackgroundResource(com.qxcm.moduleutil.R.mipmap.za_bj);
|
||||
mBinding.pB.setImageResource(com.qxcm.moduleutil.R.mipmap.za_t);
|
||||
mBinding.btnRelation.setImageResource(com.qxcm.moduleutil.R.mipmap.za_g);
|
||||
mBinding.tvRelation.setTextColor(ContextCompat.getColor(requireContext(), com.qxcm.moduleutil.R.color.color_white));
|
||||
mBinding.btnGift.setImageResource(com.qxcm.moduleutil.R.mipmap.za_l);
|
||||
mBinding.tvGift.setTextColor(ContextCompat.getColor(requireContext(), com.qxcm.moduleutil.R.color.color_white));
|
||||
mBinding.btnTime.setImageResource(com.qxcm.moduleutil.R.mipmap.za_sj);
|
||||
mBinding.tvTimetg.setTextColor(ContextCompat.getColor(requireContext(), com.qxcm.moduleutil.R.color.color_white));
|
||||
mBinding.ivJp.setImageResource(com.qxcm.moduleutil.R.mipmap.za_ljjp);
|
||||
mBinding.avatar4.setImageResource(com.qxcm.moduleutil.R.mipmap.za_m);
|
||||
mBinding.avatar5.setImageResource(com.qxcm.moduleutil.R.mipmap.za_m);
|
||||
mBinding.avatar6.setImageResource(com.qxcm.moduleutil.R.mipmap.za_m);
|
||||
if (wheatView.getUserId() == null || wheatView.getUserId().isEmpty() || wheatView.getUserId().equals("") || wheatView.getUserId().equals("0")) {
|
||||
wheatView.setImageResource(com.qxcm.moduleutil.R.mipmap.za_m, 0, "0");
|
||||
}
|
||||
// wheatView2.pitImageVId=com.qxcm.moduleutil.R.mipmap.za_p;
|
||||
wheatView2.setImageResource(com.qxcm.moduleutil.R.mipmap.za_p, 0, "0");
|
||||
mBinding.ivAuction1.setImageResource(com.qxcm.moduleutil.R.mipmap.za_m, 0, "0");
|
||||
mBinding.ivAuction2.setImageResource(com.qxcm.moduleutil.R.mipmap.za_m, 0, "0");
|
||||
mBinding.ivAuction3.setImageResource(com.qxcm.moduleutil.R.mipmap.za_m, 0, "0");
|
||||
setparams();
|
||||
mBinding.clBj1.setBackgroundResource(com.qxcm.moduleutil.R.mipmap.za_maiw);
|
||||
mBinding.clBj2.setBackgroundResource(com.qxcm.moduleutil.R.mipmap.za_maiw);
|
||||
mBinding.clBj3.setBackgroundResource(com.qxcm.moduleutil.R.mipmap.za_maiw);
|
||||
|
||||
} else {
|
||||
mBinding.ccc.setBackgroundResource(com.qxcm.moduleutil.R.drawable.bg_rounded_corner);
|
||||
mBinding.pB.setImageResource(com.qxcm.moduleutil.R.mipmap.qm_b);
|
||||
mBinding.btnRelation.setImageResource(com.qxcm.moduleutil.R.mipmap.guanx);
|
||||
mBinding.tvRelation.setTextColor(ContextCompat.getColor(requireContext(), com.qxcm.moduleutil.R.color.color_FF999999));
|
||||
mBinding.btnGift.setImageResource(com.qxcm.moduleutil.R.mipmap.liwu);
|
||||
mBinding.tvGift.setTextColor(ContextCompat.getColor(requireContext(), com.qxcm.moduleutil.R.color.color_FF999999));
|
||||
mBinding.btnTime.setImageResource(com.qxcm.moduleutil.R.mipmap.shij);
|
||||
mBinding.tvTimetg.setTextColor(ContextCompat.getColor(requireContext(), com.qxcm.moduleutil.R.color.color_FF999999));
|
||||
mBinding.ivJp.setImageResource(com.qxcm.moduleutil.R.mipmap.room_auction_jp);
|
||||
mBinding.avatar4.setImageResource(com.qxcm.moduleutil.R.mipmap.auction);
|
||||
mBinding.avatar5.setImageResource(com.qxcm.moduleutil.R.mipmap.auction);
|
||||
mBinding.avatar6.setImageResource(com.qxcm.moduleutil.R.mipmap.auction);
|
||||
mBinding.tvPB.setVisibility(GONE);
|
||||
if (wheatView.getUserId() == null || wheatView.getUserId().isEmpty() || wheatView.getUserId().equals("") || wheatView.getUserId().equals("0")) {
|
||||
wheatView.setImageResource(com.qxcm.moduleutil.R.mipmap.auction, 0, "0");
|
||||
}
|
||||
wheatView2.setImageResource(com.qxcm.moduleutil.R.mipmap.auction, 0, "0");
|
||||
mBinding.ivAuction1.setImageResource(com.qxcm.moduleutil.R.mipmap.auction, 0, "0");
|
||||
mBinding.ivAuction2.setImageResource(com.qxcm.moduleutil.R.mipmap.auction, 0, "0");
|
||||
mBinding.ivAuction3.setImageResource(com.qxcm.moduleutil.R.mipmap.auction, 0, "0");
|
||||
mBinding.clBj1.setBackgroundResource(com.qxcm.moduleutil.R.mipmap.auction_bj1);
|
||||
mBinding.clBj2.setBackgroundResource(com.qxcm.moduleutil.R.mipmap.auction_bj2);
|
||||
mBinding.clBj3.setBackgroundResource(com.qxcm.moduleutil.R.mipmap.auction_bj3);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void setparams() {
|
||||
ConstraintLayout.LayoutParams params =
|
||||
(ConstraintLayout.LayoutParams) wheatView2.getLayoutParams();
|
||||
params.setMargins(0, 100, 0, 0);
|
||||
wheatView2.setLayoutParams(params);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.fragment_room_auction;
|
||||
@@ -454,6 +526,7 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
||||
} else if (messageEvent.getMsgType() == 1027) {
|
||||
type = messageEvent.getText().getType();
|
||||
getTextView();
|
||||
steView(type);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -485,7 +558,7 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
||||
private void gexList() {
|
||||
if (auctionList != null && auctionList.size() > 0) {
|
||||
for (int i = 0; i < auctionList.size(); i++) {
|
||||
int j = 0;
|
||||
int j = i;
|
||||
j++;
|
||||
|
||||
RoomAuction.AuctionListBean auctionListBean = auctionList.get(i);
|
||||
@@ -696,7 +769,7 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
||||
pitBean.setNickname("");
|
||||
pitBean.setSex("");
|
||||
pitBean.setCharm("");
|
||||
|
||||
pitBean.setIs_pm(1);
|
||||
return pitBean;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
package com.example.moduleroom.fragment;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import android.view.Gravity;
|
||||
@@ -65,9 +67,15 @@ public class RoomChartsFragment extends BaseMvpDialogFragment<RoomChartsPresente
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
public void onAttach(@NonNull Context context) {
|
||||
super.onAttach(context);
|
||||
mRoomId = getArguments().getString("roomId");
|
||||
// FragmentUtils.add(getChildFragmentManager(), RankingChildFragment.newInstance(mRoomId, childType, type), R.id.fl_content);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
|
||||
FragmentUtils.add(getChildFragmentManager(), RankingChildFragment.newInstance(mRoomId, childType, type), R.id.fl_content);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -84,26 +92,28 @@ public class RoomChartsFragment extends BaseMvpDialogFragment<RoomChartsPresente
|
||||
|
||||
}
|
||||
});
|
||||
// ArrayList<CustomTabEntity> tabItems = new ArrayList<>();
|
||||
// tabItems.add(new TabItem("小时榜"));
|
||||
// tabItems.add(new TabItem("日榜"));
|
||||
// tabItems.add(new TabItem("周榜"));
|
||||
ArrayList<CustomTabEntity> tabItems = new ArrayList<>();
|
||||
tabItems.add(new TabItem("小时榜"));
|
||||
tabItems.add(new TabItem("日榜"));
|
||||
tabItems.add(new TabItem("周榜"));
|
||||
mBinding.slidingTabLayout.setTabData(tabItems);
|
||||
String[] title = new String[]{"小时榜", "日榜", "周榜"};
|
||||
// mBinding.slidingTabLayout.setViewPager(mBinding.vpRankChild, title);
|
||||
|
||||
List<Fragment> fragments = new ArrayList<>();
|
||||
fragments.add(RankingChildFragment.newInstance(mRoomId, childType, type));
|
||||
fragments.add(RankingChildFragment.newInstance(mRoomId, childType, type));
|
||||
fragments.add(RankingChildFragment.newInstance(mRoomId, childType, type));
|
||||
MyFragmentPagerAdapter myFragmentPagerAdapter = new MyFragmentPagerAdapter(fragments, getChildFragmentManager());
|
||||
mBinding.vpRankChild.setAdapter(myFragmentPagerAdapter);
|
||||
mBinding.slidingTabLayout.setViewPager(mBinding.vpRankChild, title);
|
||||
// List<Fragment> fragments = new ArrayList<>();
|
||||
// fragments.add(RankingChildFragment.newInstance(mRoomId, childType, type));
|
||||
// fragments.add(RankingChildFragment.newInstance(mRoomId, childType, type));
|
||||
// fragments.add(RankingChildFragment.newInstance(mRoomId, childType, type));
|
||||
// MyFragmentPagerAdapter myFragmentPagerAdapter = new MyFragmentPagerAdapter(fragments, getChildFragmentManager());
|
||||
// mBinding.vpRankChild.setAdapter(myFragmentPagerAdapter);
|
||||
// mBinding.vpRankChild.setCurrentItem(0);
|
||||
// mBinding.slidingTabLayout.setViewPager(mBinding.vpRankChild, title);
|
||||
|
||||
mBinding.tvCharm.setOnClickListener(this::onViewClicked);
|
||||
mBinding.tvWealth.setOnClickListener(this::onViewClicked);
|
||||
}
|
||||
private void refresh() {
|
||||
// FragmentUtils.replace(getChildFragmentManager(), RankingChildFragment.newInstance(mRoomId, childType, type), R.id.fl_content);
|
||||
FragmentUtils.replace(getChildFragmentManager(), RankingChildFragment.newInstance(mRoomId, childType, type), R.id.fl_content);
|
||||
}
|
||||
|
||||
public static class TabItem implements CustomTabEntity {
|
||||
|
||||
@@ -164,6 +164,20 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
||||
} else if (mRoomInfoResp.getRoom_info().getType_id().equals("6")) {
|
||||
replaceNestedFragment(RoomCabinFragment.newInstance(mRoomInfoResp), R.id.container);
|
||||
setviewyc();
|
||||
}else if (mRoomInfoResp.getRoom_info().getType_id().equals("3")){
|
||||
if (mRoomInfoResp.getRoom_info().getLabel_id().equals("1")) {
|
||||
replaceNestedFragment(SingSongFragment.newInstance(mRoomInfoResp), R.id.container);
|
||||
// replaceNestedFragment(RoomPkFragment.newInstance(mRoomInfoResp), R.id.container);
|
||||
} else if (mRoomInfoResp.getRoom_info().getLabel_id().equals("2")) {
|
||||
replaceNestedFragment(RoomKtvFragment.newInstance(mRoomInfoResp), R.id.container);
|
||||
}
|
||||
}else if (mRoomInfoResp.getRoom_info().getType_id().equals("4")){
|
||||
if (mRoomInfoResp.getRoom_info().getLabel_id().equals("1")) {
|
||||
replaceNestedFragment(SingSongFragment.newInstance(mRoomInfoResp), R.id.container);
|
||||
// replaceNestedFragment(RoomPkFragment.newInstance(mRoomInfoResp), R.id.container);
|
||||
} else if (mRoomInfoResp.getRoom_info().getLabel_id().equals("2")) {
|
||||
replaceNestedFragment(RoomKtvFragment.newInstance(mRoomInfoResp), R.id.container);
|
||||
}
|
||||
}
|
||||
// FragmentUtils.add(getChildFragmentManager(), PublicScreenEaseChatFragment.newInstance(mRoomInfoResp), R.id.ease_container);
|
||||
|
||||
@@ -548,17 +562,17 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
|
||||
isSwith = false;
|
||||
AgoraManager.getInstance(getActivity()).muteLocalAudioStream(false);
|
||||
AgoraManager.getInstance(getActivity()).ClientRole( true);
|
||||
// AgoraManager.getInstance(getActivity()).setLocalAudioEnabled( true);
|
||||
} else {
|
||||
mBinding.ivMic.setImageResource(com.qxcm.moduleutil.R.mipmap.room_microphone_off);
|
||||
AgoraManager.getInstance(getContext()).setLocalAudioEnabled(false,SpUtil.getUserId()+"");
|
||||
AgoraManager.getInstance(getActivity()).muteLocalAudioStream(false);
|
||||
AgoraManager.getInstance(getActivity()).ClientRole( false);
|
||||
// AgoraManager.getInstance(getActivity()).muteLocalAudioStream(false);
|
||||
// AgoraManager.getInstance(getActivity()).ClientRole( false);
|
||||
isSwith = true;
|
||||
// AgoraManager.getInstance(getActivity()).muteLocalAudioStream(true);
|
||||
// AgoraManager.getInstance(getActivity()).setLocalAudioEnabled( false);
|
||||
isMute(1);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.example.moduleroom.fragment;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
|
||||
@@ -128,6 +129,16 @@ public class RoomKtvFragment extends BaseMvpFragment<RoomPresenter, FragmentRoom
|
||||
|
||||
|
||||
if (roomInfoResp.getSong_user_info() != null) {
|
||||
RoomFragment parentFragment = (RoomFragment) getParentFragment();
|
||||
if (parentFragment != null) {
|
||||
if (roomInfoResp.getSong_user_info().getUser_id().equals(SpUtil.getUserId() + "")) {
|
||||
parentFragment.setRoleType(3, -1);
|
||||
parentFragment.switchMic(1);
|
||||
}else {
|
||||
parentFragment.setRoleType(0, -1);
|
||||
parentFragment.switchMic(2);
|
||||
}
|
||||
}
|
||||
AgoraManager.getInstance(getActivity()).stopMuisc();
|
||||
if (roomInfoResp.getSong_user_info().getUser_id().equals(SpUtil.getUserId() + "")) {
|
||||
did = roomInfoResp.getSong_user_info().getDid();
|
||||
@@ -439,13 +450,13 @@ public class RoomKtvFragment extends BaseMvpFragment<RoomPresenter, FragmentRoom
|
||||
RoomFragment parentFragment = (RoomFragment) getParentFragment();
|
||||
if (messageEvent.getMsgType() == 1013) {
|
||||
LogUtils.e("@@", messageEvent);
|
||||
if (messageEvent.getText().getAction() == 3) {
|
||||
if (messageEvent.getText().getAction() == 3) {//下一首变化
|
||||
if (messageEvent.getText().getNextInfo() != null) {
|
||||
mBinding.muXName.setText(messageEvent.getText().getNextInfo().getSong_name());
|
||||
} else {
|
||||
mBinding.muXName.setText("暂无歌曲");
|
||||
}
|
||||
} else if (messageEvent.getText().getAction() == 2) {
|
||||
} else if (messageEvent.getText().getAction() == 2) {//切歌
|
||||
if (messageEvent.getText().getSongInfo() != null) {
|
||||
musicSongBean = messageEvent.getText().getSongInfo();
|
||||
did = messageEvent.getText().getSongInfo().getDid();
|
||||
@@ -462,22 +473,27 @@ public class RoomKtvFragment extends BaseMvpFragment<RoomPresenter, FragmentRoom
|
||||
pitBean.setCharm(messageEvent.getText().getSongInfo().getCharm());
|
||||
roomDefaultWheatView.setData(pitBean);
|
||||
roomInfoResp.setSong_user_info(musicSongBean);
|
||||
if (parentFragment != null) {
|
||||
if (messageEvent.getText().getSongInfo().getUser_id().equals(SpUtil.getUserId() + "")) {
|
||||
parentFragment.setRoleType(3, -1);
|
||||
}else {
|
||||
parentFragment.setRoleType(0, -1);
|
||||
}
|
||||
}
|
||||
|
||||
if (messageEvent.getText().getSongInfo().getUser_id().equals(SpUtil.getUserId() + "")) {
|
||||
AgoraManager.getInstance(getActivity()).stopMuisc();
|
||||
LogUtils.e("推送过来的code", messageEvent.getText().getSongInfo().getSong_code());
|
||||
AgoraManager.getInstance(getActivity()).isPreload(Long.parseLong(messageEvent.getText().getSongInfo().getSong_code()), 1);
|
||||
|
||||
} else {
|
||||
AgoraManager.getInstance(getActivity()).stopMuisc();
|
||||
AgoraManager.getInstance(getActivity()).isPreload(Long.parseLong(messageEvent.getText().getSongInfo().getSong_code()), 2);
|
||||
}
|
||||
|
||||
if (parentFragment != null) {
|
||||
if (messageEvent.getText().getSongInfo().getUser_id().equals(SpUtil.getUserId() + "")) {
|
||||
parentFragment.setRoleType(3, -1);
|
||||
parentFragment.switchMic(1);
|
||||
}else {
|
||||
parentFragment.setRoleType(0, -1);
|
||||
parentFragment.switchMic(2);
|
||||
}
|
||||
}
|
||||
|
||||
if (roomInfoResp.getUser_info().getIs_host() == 1 && roomInfoResp.getUser_info().getPit_number() == 9) {
|
||||
setVisibilityView(1);
|
||||
} else if (messageEvent.getText().getSongInfo().getUser_id().equals(SpUtil.getUserId() + "") && roomInfoResp.getUser_info().getIs_host() == 1 && roomInfoResp.getUser_info().getPit_number() == 9) {
|
||||
|
||||
@@ -539,10 +539,12 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
||||
mBinding.imMkf.setImageResource(com.qxcm.moduleutil.R.mipmap.room_microphone);
|
||||
is_mute=0;
|
||||
aBoolean=false;
|
||||
AgoraManager.getInstance(getActivity()).muteAllRemoteAudioStreamsEx(true);
|
||||
}else {
|
||||
mBinding.imMkf.setImageResource(com.qxcm.moduleutil.R.mipmap.room_microphone_off);
|
||||
is_mute=1;
|
||||
aBoolean=true;
|
||||
AgoraManager.getInstance(getActivity()).muteAllRemoteAudioStreamsEx(false);
|
||||
}
|
||||
RoomMessageEvent.text text=new RoomMessageEvent.text();
|
||||
text.setIs_mute(is_mute);
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
package com.example.moduleroom.presenter;
|
||||
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
|
||||
import com.blankj.utilcode.util.ObjectUtils;
|
||||
import com.example.moduleroom.contacts.DataListContacts;
|
||||
import com.qxcm.moduleutil.base.BaseRoomPresenter;
|
||||
import com.qxcm.moduleutil.bean.CharmRankingResp;
|
||||
import com.qxcm.moduleutil.http.BaseObserver;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -25,7 +27,34 @@ public class DataListPresenter extends BaseRoomPresenter<DataListContacts.View>
|
||||
|
||||
|
||||
@Override
|
||||
public void getCharmListInfo(String roomId, int type) {
|
||||
public void getCharmListInfo(String roomId, String type, String time_type, String page, String page_limit) {
|
||||
|
||||
api.getRoomRank(roomId, type,time_type,page,page_limit, new BaseObserver<List<CharmRankingResp>>() {
|
||||
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
addDisposable(d);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(List<CharmRankingResp> charmRankingResp) {
|
||||
if (!ObjectUtils.isEmpty(charmRankingResp)){
|
||||
if (charmRankingResp.size()>0){
|
||||
MvpRef.get().setNo1(charmRankingResp.get(0));
|
||||
}
|
||||
if (charmRankingResp.size()>1){
|
||||
MvpRef.get().setNo2(charmRankingResp.get(1));
|
||||
}
|
||||
if (charmRankingResp.size()>2){
|
||||
MvpRef.get().setNo3(charmRankingResp.get(2));
|
||||
}
|
||||
if (charmRankingResp.size()>3) {
|
||||
MvpRef.get().setCharmEmpty(charmRankingResp.subList(3, charmRankingResp.size()));
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// ApiClient.getInstance().getCharmList(roomId, type, new BaseObserver<CharmRankingResp>() {
|
||||
// @Override
|
||||
// public void onSubscribe(Disposable d) {
|
||||
|
||||
@@ -15,8 +15,8 @@ public class PublishCommentPresenter extends BasePresenter<PublishCommentContact
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendHeadine(String content, String money) {
|
||||
api.sendHeadine(content, money, new BaseObserver<String>() {
|
||||
public void sendHeadine(String content, String money,String roomId) {
|
||||
api.sendHeadine(content, money,roomId, new BaseObserver<String>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
addDisposable(d);
|
||||
|
||||
@@ -158,8 +158,8 @@
|
||||
|
||||
<com.qxcm.moduleutil.widget.floatingView.FloatingMagnetView
|
||||
android:id="@+id/flaoat_zuoji"
|
||||
android:layout_width="@dimen/dp_240"
|
||||
android:layout_height="@dimen/dp_56"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
@@ -170,78 +170,112 @@
|
||||
>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_46"
|
||||
android:layout_gravity="center|bottom"
|
||||
android:background="@mipmap/headline_bj">
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_65"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cl"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="-5dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/im_hq">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@mipmap/headline_b"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/head_avate"
|
||||
android:layout_width="@dimen/dp_28"
|
||||
android:layout_height="@dimen/dp_28"
|
||||
android:layout_marginStart="@dimen/dp_26"
|
||||
android:src="@mipmap/default_avatar"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:riv_oval="true" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/headName"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_18"
|
||||
android:layout_marginStart="@dimen/dp_4"
|
||||
android:text="名称"
|
||||
android:textColor="@color/color_FFFFF0F0"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintStart_toEndOf="@+id/head_avate"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/head_cone"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_18"
|
||||
android:layout_marginStart="@dimen/dp_4"
|
||||
android:gravity="center"
|
||||
android:text="内容"
|
||||
android:textColor="@color/color_FFFFF0F0"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/head_avate"
|
||||
app:layout_constraintTop_toBottomOf="@+id/headName" />
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_quan_qiang"
|
||||
android:layout_width="@dimen/dp_22"
|
||||
android:layout_height="@dimen/dp_22"
|
||||
android:src="@mipmap/tt_q"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/im_yc"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_quan_c"
|
||||
android:layout_width="@dimen/dp_22"
|
||||
android:layout_height="@dimen/dp_22"
|
||||
android:layout_marginEnd="@dimen/dp_8"
|
||||
android:src="@mipmap/tt_c"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/iv_quan_qiang"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im_yc"
|
||||
android:layout_width="@dimen/dp_22"
|
||||
android:layout_height="@dimen/dp_22"
|
||||
android:src="@mipmap/tt_yc"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im_hq"
|
||||
android:layout_width="@dimen/dp_45"
|
||||
android:layout_height="@dimen/dp_25"
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@mipmap/heab_t"
|
||||
android:visibility="visible"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/head_avate"
|
||||
android:layout_width="@dimen/dp_28"
|
||||
android:layout_height="@dimen/dp_28"
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
android:src="@mipmap/default_avatar"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/im_hq"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:riv_oval="true" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/headName"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_4"
|
||||
android:layout_marginTop="@dimen/dp_7"
|
||||
android:text="名称"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintStart_toEndOf="@+id/head_avate"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/head_cone"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_4"
|
||||
android:text="内容"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintStart_toEndOf="@+id/head_avate"
|
||||
app:layout_constraintTop_toBottomOf="@+id/headName" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/iv_quan_qiang"
|
||||
android:layout_width="@dimen/dp_22"
|
||||
android:layout_height="@dimen/dp_22"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:layout_marginBottom="@dimen/dp_5"
|
||||
android:background="@drawable/bg_r11_333"
|
||||
android:gravity="center"
|
||||
android:text="抢"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/cc"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end"
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
android:src="@mipmap/head_cc" />
|
||||
|
||||
</com.qxcm.moduleutil.widget.floatingView.FloatingMagnetView>
|
||||
|
||||
<FrameLayout
|
||||
@@ -258,12 +292,12 @@
|
||||
android:layout_gravity="start|top"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:layout_marginBottom="@dimen/dp_46"
|
||||
android:layout_marginEnd="@dimen/dp_50"
|
||||
android:layout_marginBottom="@dimen/dp_46"
|
||||
android:src="@mipmap/quan"
|
||||
android:visibility="gone" />
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
||||
@@ -12,6 +12,18 @@
|
||||
android:layout_height="match_parent"
|
||||
android:background="@mipmap/room_rank_bj">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="出价榜单"
|
||||
android:textColor="@color/color_white"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_14"
|
||||
android:textSize="18sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
@@ -20,6 +32,7 @@
|
||||
|
||||
>
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -196,7 +209,7 @@
|
||||
android:drawableStart="@mipmap/rank_h"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_8"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintEnd_toEndOf="@id/view_top1"
|
||||
app:layout_constraintStart_toStartOf="@id/view_top1"
|
||||
app:layout_constraintTop_toBottomOf="@+id/ll_vip1"
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/ccc"
|
||||
android:layout_width="@dimen/dp_343"
|
||||
android:layout_height="@dimen/dp_282"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
@@ -34,6 +35,7 @@
|
||||
android:layout_marginStart="@dimen/dp_12"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:room_make_pic="@mipmap/za_m"
|
||||
app:room_make_wheat_number="9" />
|
||||
|
||||
|
||||
@@ -101,11 +103,37 @@
|
||||
android:layout_width="@dimen/dp_168"
|
||||
android:layout_height="@dimen/dp_208"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:background="@drawable/bg_r16_1c182f"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/room_make_wheat">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/p_b"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:scaleType="fitXY"
|
||||
tools:src="@mipmap/za_t" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_p_b"
|
||||
android:layout_width="@dimen/dp_46"
|
||||
android:layout_height="@dimen/dp_16"
|
||||
android:gravity="center"
|
||||
android:text="0000"
|
||||
android:background="@mipmap/za_s"
|
||||
android:textColor="#FFE8B0"
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:layout_marginTop="@dimen/dp_30"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
/>
|
||||
|
||||
|
||||
<com.qxcm.moduleutil.widget.RoomMakeWheatView
|
||||
android:id="@+id/room_make_wheat2"
|
||||
android:layout_width="@dimen/dp_60"
|
||||
@@ -114,6 +142,7 @@
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:room_make_pic="@mipmap/za_p"
|
||||
app:room_make_wheat_number="888" />
|
||||
|
||||
|
||||
@@ -121,7 +150,7 @@
|
||||
android:id="@+id/container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:layout_marginTop="@dimen/dp_5"
|
||||
app:layout_constraintTop_toBottomOf="@id/room_make_wheat2">
|
||||
|
||||
<!-- 关系 -->
|
||||
@@ -206,7 +235,6 @@
|
||||
android:id="@+id/iv_jp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:src="@mipmap/room_auction_jp"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
@@ -242,6 +270,7 @@
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:room_make_pic="@mipmap/za_m"
|
||||
app:room_make_wheat_number="111" />
|
||||
|
||||
<TextView
|
||||
@@ -283,6 +312,7 @@
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:room_make_pic="@mipmap/za_m"
|
||||
app:room_make_wheat_number="222" />
|
||||
|
||||
<TextView
|
||||
@@ -325,6 +355,7 @@
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:room_make_pic="@mipmap/za_m"
|
||||
app:room_make_wheat_number="333" />
|
||||
|
||||
<TextView
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
android:background="@color/color_1A000000"
|
||||
app:layout_constraintTop_toBottomOf="@+id/cl">
|
||||
|
||||
<com.example.moduletablayout.SlidingTabLayout
|
||||
<com.example.moduletablayout.CommonTabLayout
|
||||
android:id="@+id/sliding_tab_layout"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
@@ -103,18 +103,19 @@
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<!-- <FrameLayout-->
|
||||
<!-- android:id="@+id/fl_content"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="match_parent"-->
|
||||
<!-- app:layout_constraintTop_toBottomOf="@+id/cl2"-->
|
||||
<!-- />-->
|
||||
<FrameLayout
|
||||
android:id="@+id/fl_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/cl2"
|
||||
/>
|
||||
|
||||
<com.qxcm.moduleutil.widget.ScrollViewPager
|
||||
android:id="@+id/vp_rank_child"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/cl2"/>
|
||||
app:layout_constraintTop_toBottomOf="@+id/cl2"
|
||||
android:visibility="gone"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
||||
@@ -77,7 +77,7 @@
|
||||
app:lineSpacing="8dp"
|
||||
app:startOfVerseIndicatorPaddingTop="6dp"
|
||||
app:startOfVerseIndicatorRadius="4dp"
|
||||
app:textSize="12sp" />
|
||||
app:textSize="@dimen/sp_12" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/mu_title"
|
||||
@@ -93,10 +93,11 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/mu_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="@dimen/dp_70"
|
||||
android:layout_height="@dimen/dp_18"
|
||||
android:layout_marginStart="@dimen/dp_12"
|
||||
android:ellipsize="none"
|
||||
android:layout_marginEnd="@dimen/dp_72"
|
||||
android:ellipsize="marquee"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true"
|
||||
android:marqueeRepeatLimit="marquee_forever"
|
||||
|
||||
@@ -54,6 +54,7 @@
|
||||
app:layout_constraintTop_toTopOf="@id/view_top2" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/zt"
|
||||
android:layout_width="@dimen/dp_32"
|
||||
android:layout_height="@dimen/dp_13"
|
||||
android:background="@mipmap/room_status"
|
||||
@@ -75,7 +76,23 @@
|
||||
app:layout_constraintEnd_toEndOf="@id/view_top2"
|
||||
app:layout_constraintStart_toStartOf="@id/view_top2"
|
||||
app:layout_constraintTop_toBottomOf="@+id/view_top2"
|
||||
android:text="sdfdfgfg" />
|
||||
tools:text="sdfdfgfg" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/room_head_top2_label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="34dp"
|
||||
android:drawableStart="@mipmap/rank_h"
|
||||
android:drawablePadding="@dimen/dp_4"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/ll_vip2"
|
||||
app:layout_constraintTop_toBottomOf="@+id/room_top2_name"
|
||||
app:layout_constraintEnd_toEndOf="@id/ll_vip2"
|
||||
app:layout_constraintStart_toStartOf="@id/ll_vip2"
|
||||
tools:text="00000" />
|
||||
|
||||
<View
|
||||
android:id="@+id/view_top1"
|
||||
@@ -97,8 +114,6 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<com.qxcm.moduleutil.widget.GifAvatarOvalView
|
||||
android:id="@+id/room_rank_top1_headIcon"
|
||||
android:layout_width="@dimen/dp_67"
|
||||
@@ -149,7 +164,8 @@
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintEnd_toEndOf="@id/view_top2"
|
||||
app:layout_constraintStart_toStartOf="@id/view_top2"
|
||||
app:layout_constraintTop_toBottomOf="@+id/room_top2_name" />
|
||||
app:layout_constraintTop_toBottomOf="@+id/room_top2_name"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/room_top1_name"
|
||||
@@ -165,7 +181,22 @@
|
||||
app:layout_constraintEnd_toEndOf="@id/view_top1"
|
||||
app:layout_constraintStart_toStartOf="@id/view_top1"
|
||||
app:layout_constraintTop_toBottomOf="@+id/view_top1"
|
||||
android:text="sdfdfgfg" />
|
||||
tools:text="sdfdfgfg" />
|
||||
<TextView
|
||||
android:id="@+id/room_head_top1_label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="43dp"
|
||||
android:drawableStart="@mipmap/rank_h"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/view_top1"
|
||||
app:layout_constraintTop_toBottomOf="@+id/room_top1_name"
|
||||
app:layout_constraintEnd_toEndOf="@id/view_top1"
|
||||
app:layout_constraintStart_toStartOf="@id/view_top1"
|
||||
app:layout_constraintBottom_toTopOf="@+id/ll_vip1"
|
||||
tools:text="00000" />
|
||||
|
||||
<com.qxcm.moduleutil.widget.BeautifulNameView
|
||||
android:id="@+id/bnv_first"
|
||||
@@ -173,7 +204,8 @@
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintEnd_toEndOf="@id/view_top1"
|
||||
app:layout_constraintStart_toStartOf="@id/view_top1"
|
||||
app:layout_constraintTop_toBottomOf="@+id/room_top1_name" />
|
||||
app:layout_constraintTop_toBottomOf="@+id/room_top1_name"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/room_top3_name"
|
||||
@@ -189,7 +221,7 @@
|
||||
app:layout_constraintEnd_toEndOf="@id/view_top3"
|
||||
app:layout_constraintStart_toStartOf="@id/view_top3"
|
||||
app:layout_constraintTop_toBottomOf="@id/view_top3"
|
||||
android:text="sdfdfgfg" />
|
||||
tools:text="sdfdfgfg" />
|
||||
|
||||
<com.qxcm.moduleutil.widget.BeautifulNameView
|
||||
android:id="@+id/bnv_third"
|
||||
@@ -197,25 +229,13 @@
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintEnd_toEndOf="@id/view_top3"
|
||||
app:layout_constraintStart_toStartOf="@id/view_top3"
|
||||
app:layout_constraintTop_toBottomOf="@+id/room_top3_name" />
|
||||
app:layout_constraintTop_toBottomOf="@+id/room_top3_name"
|
||||
android:visibility="gone"/>
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/room_head_top2_label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="34dp"
|
||||
android:drawableStart="@mipmap/rank_h"
|
||||
android:drawablePadding="@dimen/dp_4"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_8"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/ll_vip2"
|
||||
app:layout_constraintBottom_toTopOf="@+id/room_top2_name"
|
||||
app:layout_constraintEnd_toEndOf="@id/ll_vip2"
|
||||
app:layout_constraintStart_toStartOf="@id/ll_vip2"
|
||||
tools:text="00000" />
|
||||
|
||||
<ImageView
|
||||
|
||||
android:layout_width="@dimen/dp_32"
|
||||
android:layout_height="@dimen/dp_13"
|
||||
android:background="@mipmap/room_status"
|
||||
@@ -224,20 +244,7 @@
|
||||
app:layout_constraintEnd_toEndOf="@id/view_top1"
|
||||
app:layout_constraintStart_toStartOf="@id/view_top1"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/room_head_top1_label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="33dp"
|
||||
android:drawableStart="@mipmap/rank_h"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_8"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/view_top1"
|
||||
app:layout_constraintBottom_toTopOf="@+id/room_top1_name"
|
||||
app:layout_constraintEnd_toEndOf="@id/view_top1"
|
||||
app:layout_constraintStart_toStartOf="@id/view_top1"
|
||||
tools:text="00000" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp_32"
|
||||
android:layout_height="@dimen/dp_13"
|
||||
@@ -251,13 +258,13 @@
|
||||
android:id="@+id/room_head_top3_label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="34dp"
|
||||
android:layout_marginTop="64dp"
|
||||
android:drawableStart="@mipmap/rank_h"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_8"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/view_top3"
|
||||
app:layout_constraintBottom_toTopOf="@+id/room_top3_name"
|
||||
app:layout_constraintTop_toBottomOf="@+id/room_top3_name"
|
||||
app:layout_constraintEnd_toEndOf="@id/view_top3"
|
||||
app:layout_constraintStart_toStartOf="@id/view_top3"
|
||||
tools:text="00000" />
|
||||
@@ -277,13 +284,15 @@
|
||||
android:id="@+id/room_top2_grade"
|
||||
android:layout_width="31dp"
|
||||
android:layout_height="24dp"
|
||||
android:scaleType="fitCenter" />
|
||||
android:scaleType="fitCenter"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/room_top2_label"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:scaleType="fitCenter" />
|
||||
android:scaleType="fitCenter"
|
||||
android:visibility="gone"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -302,13 +311,15 @@
|
||||
android:id="@+id/room_top1_grade"
|
||||
android:layout_width="31dp"
|
||||
android:layout_height="24dp"
|
||||
android:scaleType="fitCenter" />
|
||||
android:scaleType="fitCenter"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/room_top1_label"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:scaleType="fitCenter" />
|
||||
android:scaleType="fitCenter"
|
||||
android:visibility="gone"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -327,13 +338,15 @@
|
||||
android:id="@+id/room_top3_grade"
|
||||
android:layout_width="31dp"
|
||||
android:layout_height="24dp"
|
||||
android:scaleType="fitCenter" />
|
||||
android:scaleType="fitCenter"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/room_top3_label"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:scaleType="fitCenter" />
|
||||
android:scaleType="fitCenter"
|
||||
android:visibility="gone"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
@@ -61,7 +61,8 @@
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="5dp">
|
||||
android:layout_marginLeft="5dp"
|
||||
android:visibility="gone">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/room_item_rank"
|
||||
@@ -78,13 +79,25 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<com.qxcm.moduleutil.widget.BeautifulNameView
|
||||
<!-- <com.qxcm.moduleutil.widget.BeautifulNameView-->
|
||||
<!-- android:id="@+id/bnv_rank_list_rich"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginStart="10dp"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="@+id/room_item_head"-->
|
||||
<!-- app:layout_constraintLeft_toRightOf="@+id/room_item_head"-->
|
||||
<!-- android:visibility="gone"/>-->
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/bnv_rank_list_rich"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="3dp"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/room_item_head"
|
||||
app:layout_constraintLeft_toRightOf="@+id/room_item_head" />
|
||||
app:layout_constraintLeft_toRightOf="@+id/room_item_head"
|
||||
app:layout_constraintTop_toTopOf="@+id/room_item_head" />
|
||||
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/room_item_pop"
|
||||
|
||||
@@ -2,20 +2,19 @@ plugins {
|
||||
alias(libs.plugins.android.library)
|
||||
alias(libs.plugins.kotlin.android)
|
||||
}
|
||||
configurations.all {
|
||||
// 解决注解处理器冲突
|
||||
resolutionStrategy {
|
||||
force 'com.alibaba:arouter-compiler:1.5.2'
|
||||
force 'com.google.auto.service:auto-service:1.0'
|
||||
}
|
||||
}
|
||||
//configurations.all {
|
||||
// // 解决注解处理器冲突
|
||||
// resolutionStrategy {
|
||||
// force 'com.alibaba:arouter-compiler:1.5.2'
|
||||
// force 'com.google.auto.service:auto-service:1.0'
|
||||
// }
|
||||
//}
|
||||
android {
|
||||
namespace 'com.example.modulevocal'
|
||||
compileSdk 35
|
||||
|
||||
defaultConfig {
|
||||
minSdk 24
|
||||
targetSdk 35
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
|
||||
|
||||
@@ -97,8 +97,8 @@ public class CreateAlbumActivity extends BaseMvpActivity<MyAlbumPresenter, Activ
|
||||
startChoosePhoto(1, PictureConfig.CHOOSE_REQUEST, false, 1);
|
||||
} else if (view.getId() == R.id.tv_confirm) {
|
||||
if (!Objects.requireNonNull(mBinding.edAlbumName.getText()).toString().trim().isEmpty() || !imageUrl.equals("")) {
|
||||
if (mBinding.edAlbumName.getText().toString().length() < 4) {
|
||||
ToastUtils.showShort("相册名称不能少于4个字");
|
||||
if (mBinding.edAlbumName.getText().toString().length() > 6) {
|
||||
ToastUtils.showShort("相册名称不能多于6个字");
|
||||
return;
|
||||
} else if (aBoolean) {
|
||||
if (mBinding.edAlbumPassword.getText().toString().length() < 4) {
|
||||
|
||||
@@ -19,6 +19,8 @@ import androidx.core.view.ViewCompat;
|
||||
import androidx.core.view.WindowInsetsCompat;
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Autowired;
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.blankj.utilcode.util.PermissionUtils;
|
||||
import com.bumptech.glide.Glide;
|
||||
@@ -35,6 +37,7 @@ import com.luck.picture.lib.config.PictureMimeType;
|
||||
import com.luck.picture.lib.entity.LocalMedia;
|
||||
import com.qxcm.moduleutil.activity.BaseMvpActivity;
|
||||
import com.qxcm.moduleutil.bean.CheckTxtResp;
|
||||
import com.qxcm.moduleutil.bean.room.RoomInfoResp;
|
||||
import com.qxcm.moduleutil.utils.ARouteConstants;
|
||||
import com.qxcm.moduleutil.utils.GlideEngine;
|
||||
import com.qxcm.moduleutil.utils.ImageUtils;
|
||||
@@ -42,6 +45,7 @@ import com.qxcm.moduleutil.utils.MyPictureParameterStyle;
|
||||
import com.qxcm.moduleutil.utils.PermissionCallback;
|
||||
import com.qxcm.moduleutil.utils.PermissionUtil;
|
||||
import com.qxcm.moduleutil.widget.Constants;
|
||||
import com.qxcm.moduleutil.widget.floatingView.IFloatingView;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
@@ -51,9 +55,10 @@ import java.util.List;
|
||||
* @data 2025/5/15
|
||||
* @description: 创建房间
|
||||
*/
|
||||
@Route(path = ARouteConstants.CREATED_ROOM)
|
||||
public class CreatedRoomActivity extends BaseMvpActivity<CreatedRoomPresenter, ActivityCreatedRoomBinding> implements CreatedRoomConactos.View {
|
||||
|
||||
|
||||
@Autowired
|
||||
public RoomInfoResp roomInfoResp;
|
||||
private String roomName;
|
||||
|
||||
public String from;
|
||||
@@ -102,6 +107,14 @@ public class CreatedRoomActivity extends BaseMvpActivity<CreatedRoomPresenter, A
|
||||
|
||||
// MvpPre.roomLabel("create");
|
||||
handler.post(showPopupRunnable);
|
||||
// roomInfoResp = (RoomInfoResp) getIntent().getSerializableExtra("roomInfo");
|
||||
|
||||
if (roomInfoResp!=null){
|
||||
ImageUtils.loadHeadCC(roomInfoResp.getRoom_info().getRoom_cover(), mBinding.ivTrendContent);
|
||||
mBinding.edNickName.setText(roomInfoResp.getRoom_info().getRoom_name());
|
||||
mBinding.etG.setText(roomInfoResp.getRoom_info().getRoom_intro());
|
||||
roomUrl=roomInfoResp.getRoom_info().getRoom_cover();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -175,7 +188,11 @@ public class CreatedRoomActivity extends BaseMvpActivity<CreatedRoomPresenter, A
|
||||
ToastUtils.show("请输入房间名");
|
||||
return;
|
||||
}
|
||||
MvpPre.checkTxt(roomName, roomUrl, mBinding.etG.getText().toString());
|
||||
if (roomInfoResp!=null){
|
||||
MvpPre.editRoom(roomInfoResp.getRoom_info().getRoom_id(), roomName, roomUrl,mBinding.etG.getText().toString(), "");
|
||||
}else {
|
||||
MvpPre.checkTxt(roomName, roomUrl, mBinding.etG.getText().toString());
|
||||
}
|
||||
}
|
||||
} else if (id == R.id.iv_trend_content) {
|
||||
startChoosePhoto(1, PictureConfig.CHOOSE_REQUEST);
|
||||
@@ -261,4 +278,10 @@ public class CreatedRoomActivity extends BaseMvpActivity<CreatedRoomPresenter, A
|
||||
mBinding.edNickName.setText(s);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void editRoom() {
|
||||
ARouter.getInstance().build(ARouteConstants.MY_ROOM).navigation();
|
||||
finish();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -128,7 +128,7 @@ public class PersonalityActivity extends BaseMvpActivity<PersonalityPresenter, A
|
||||
mBinding.topBar.setRightColor(Color.parseColor("#FF8ACC"));
|
||||
mBinding.topBar.getTvRight().setOnClickListener(v -> {
|
||||
Intent intent=new Intent(this, WebViewActivity.class);
|
||||
intent.putExtra("url", "http://vespa.qxmier.com/dist/build/web/index.html#/pages/union/propMall?id="+ SpUtil.getToken());
|
||||
intent.putExtra("url", "https://vespa.qxmier.com/web/index.html#/pages/prop/propMall?id="+SpUtil.getToken());
|
||||
intent.putExtra("title", "道具商城");
|
||||
startActivity(intent);
|
||||
});
|
||||
|
||||
@@ -15,6 +15,7 @@ import androidx.core.graphics.Insets;
|
||||
import androidx.core.view.ViewCompat;
|
||||
import androidx.core.view.WindowInsetsCompat;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.blankj.utilcode.util.RegexUtils;
|
||||
import com.example.modulevocal.R;
|
||||
import com.example.modulevocal.conacts.RealNameConacts;
|
||||
@@ -22,6 +23,7 @@ import com.example.modulevocal.databinding.ActivityRealNameBinding;
|
||||
import com.example.modulevocal.presenter.RealNamePresenter;
|
||||
import com.qxcm.moduleutil.activity.BaseMvpActivity;
|
||||
import com.qxcm.moduleutil.bean.RealNameBean;
|
||||
import com.qxcm.moduleutil.utils.ARouteConstants;
|
||||
import com.qxcm.moduleutil.utils.SpUtil;
|
||||
import com.tencent.cloud.huiyansdkface.facelight.api.WbCloudFaceContant;
|
||||
import com.tencent.cloud.huiyansdkface.facelight.api.WbCloudFaceVerifySdk;
|
||||
@@ -30,7 +32,12 @@ import com.tencent.cloud.huiyansdkface.facelight.api.listeners.WbCloudFaceVerify
|
||||
import com.tencent.cloud.huiyansdkface.facelight.api.result.WbFaceError;
|
||||
import com.tencent.cloud.huiyansdkface.facelight.api.result.WbFaceVerifyResult;
|
||||
import com.tencent.cloud.huiyansdkface.facelight.process.FaceVerifyStatus;
|
||||
|
||||
/**
|
||||
*@author qx
|
||||
*@data 2025/7/15
|
||||
*@description: 实名认证
|
||||
*/
|
||||
@Route(path = ARouteConstants.REAL_NAME_ACTIVITY)
|
||||
public class RealName1Activity extends BaseMvpActivity<RealNamePresenter, ActivityRealNameBinding> implements RealNameConacts.View{
|
||||
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@ import androidx.core.view.ViewCompat;
|
||||
import androidx.core.view.WindowInsetsCompat;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.example.modulevocal.R;
|
||||
import com.example.modulevocal.adapter.PayMethodAdapter;
|
||||
import com.example.modulevocal.conacts.WithdrawalConacts;
|
||||
@@ -36,6 +37,7 @@ import com.qxcm.moduleutil.bean.BindType;
|
||||
import com.qxcm.moduleutil.bean.WalletBean;
|
||||
import com.qxcm.moduleutil.bean.WalletConfig;
|
||||
import com.qxcm.moduleutil.bean.WithdrawalBean;
|
||||
import com.qxcm.moduleutil.utils.ARouteConstants;
|
||||
import com.qxcm.moduleutil.utils.SpUtil;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -46,6 +48,8 @@ import java.util.List;
|
||||
* @data 2025/5/21
|
||||
* @description: 提现
|
||||
*/
|
||||
|
||||
@Route(path = ARouteConstants.WITHDRAWAL_ACTIVITY)
|
||||
public class WithdrawalActivity extends BaseMvpActivity<WithdrawalPresenter, ActivityWithdrawalBinding> implements WithdrawalConacts.View {
|
||||
WalletBean walletBean;
|
||||
private PayMethodAdapter bindTypeAdapter;
|
||||
|
||||
@@ -10,10 +10,12 @@ import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||
import com.chad.library.adapter.base.BaseViewHolder;
|
||||
import com.example.modulevocal.R;
|
||||
import com.qxcm.moduleutil.bean.BlackUserBean;
|
||||
import com.qxcm.moduleutil.utils.ARouteConstants;
|
||||
import com.qxcm.moduleutil.utils.ImageUtils;
|
||||
import com.qxcm.moduleutil.utils.MeHeadView;
|
||||
|
||||
@@ -94,5 +96,14 @@ public class BlackAdapter extends BaseQuickAdapter<BlackUserBean, BaseViewHolder
|
||||
}
|
||||
}
|
||||
|
||||
headView.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (item.getType() !=1){
|
||||
ARouter.getInstance().build(ARouteConstants.USER_HOME_PAGE).withString("userId", item.getUser_id()+"").navigation();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,6 +22,8 @@ public final class CreatedRoomConactos {
|
||||
void upLoadSuccess(String url, int type);
|
||||
|
||||
void suijiRoomName(String s);
|
||||
|
||||
void editRoom();
|
||||
}
|
||||
|
||||
|
||||
@@ -35,5 +37,7 @@ public final class CreatedRoomConactos {
|
||||
void uploadFile(File file, int type);
|
||||
|
||||
void roomName();
|
||||
|
||||
void editRoom(String room_id, String room_name, String room_cover, String room_intro,String room_background_id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -106,7 +106,7 @@ public class CirleListFragment extends BaseMvpFragment<UserHomepagePresenter, Fr
|
||||
|
||||
@Override
|
||||
public void onDiandianClick(CircleListBean item) {
|
||||
ShareDialog shareDialog = new ShareDialog(getContext(), item.getContent(),item.getShare_url(),item.getTopic_id(),1,item.getUser_id()+"", item);
|
||||
ShareDialog shareDialog = new ShareDialog(getContext(), item.getContent(),item.getShare_url(),item.getId()+"",1,item.getUser_id()+"", item);
|
||||
shareDialog.setOnShareDataListener(new ShareDialog.OnShareDataListener() {
|
||||
|
||||
@Override
|
||||
|
||||
@@ -314,6 +314,11 @@ public class VocalRangeFragment extends BaseMvpFragment<MePresenter, FragmentVoc
|
||||
mBinding.tvFollow.setText(data.getFollow_num()+"");
|
||||
mBinding.tvFans.setText(data.getFans_num()+"");
|
||||
mBinding.tvFriends.setText(data.getLook_me_num()+"");
|
||||
if (data.getAuth()==1){
|
||||
SpUtil.setRealName(true);
|
||||
}else {
|
||||
SpUtil.setRealName(false);
|
||||
}
|
||||
|
||||
LinearLayout llContainer = mBinding.llImageContainer;
|
||||
llContainer.removeAllViews(); // 清空旧的 ImageView
|
||||
|
||||