This commit is contained in:
2025-11-06 11:53:23 +08:00
parent ab86340a1b
commit 8c23465af3
28 changed files with 245 additions and 309 deletions

View File

@@ -1,37 +0,0 @@
{
"version": 3,
"artifactType": {
"type": "APK",
"kind": "Directory"
},
"applicationId": "com.qxcm.qxlive",
"variantName": "releasRelease",
"elements": [
{
"type": "SINGLE",
"filters": [],
"attributes": [],
"versionCode": 43,
"versionName": "1.0.5.3",
"outputFile": "羽声_1.0.5.3_43.apk"
}
],
"elementType": "File",
"baselineProfiles": [
{
"minApi": 28,
"maxApi": 30,
"baselineProfiles": [
"baselineProfiles/1/羽声_1.0.5.3_43.dm"
]
},
{
"minApi": 31,
"maxApi": 2147483647,
"baselineProfiles": [
"baselineProfiles/0/羽声_1.0.5.3_43.dm"
]
}
],
"minSdkVersionForDexing": 24
}

View File

@@ -28,21 +28,21 @@ import com.mobile.auth.gatewayauth.PreLoginResultListener;
import com.mobile.auth.gatewayauth.TokenResultListener;
import com.mobile.auth.gatewayauth.model.TokenRet;
import com.qxcm.qxlive.databinding.ActivityPasswordLoginBinding;
import com.tencent.mm.opensdk.modelbase.BaseResp;
import com.tencent.mm.opensdk.modelmsg.SendAuth;
import com.tencent.mm.opensdk.openapi.IWXAPI;
import com.tencent.mm.opensdk.openapi.WXAPIFactory;
import com.xscm.modulemain.BaseMvpActivity;
import com.xscm.modulemain.activity.login.activity.ImproveInfoActivity;
import com.xscm.modulemain.activity.login.present.LoginContacter;
import com.xscm.modulemain.activity.login.present.LoginPresenter;
import com.xscm.modulemain.activity.main.activity.MainActivity;
import com.xscm.modulemain.BaseMvpActivity;
import com.xscm.moduleutil.base.CommonAppContext;
import com.xscm.moduleutil.bean.ThemeBean;
import com.xscm.moduleutil.bean.UserBean;
import com.xscm.moduleutil.utils.BarUtils;
import com.xscm.moduleutil.utils.PreferencesUtils;
import com.xscm.moduleutil.utils.logger.Logger;
import com.tencent.mm.opensdk.modelbase.BaseResp;
import com.tencent.mm.opensdk.modelmsg.SendAuth;
import com.tencent.mm.opensdk.openapi.IWXAPI;
import com.tencent.mm.opensdk.openapi.WXAPIFactory;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
@@ -403,7 +403,7 @@ public class PasswordLoginActivity extends BaseMvpActivity<LoginPresenter, Activ
.setPrivacyTextSize(11)
.setPrivacyAlertContentVerticalMargin(20)
.setPrivacyMargin(39)
.setPrivacyState(true)
.setPrivacyState(false)
.setCheckboxHidden(false)
.setCheckedImgPath("ic_agreement_selected")
.setUncheckedImgPath("ic_agreement_unselect")
@@ -482,20 +482,20 @@ public class PasswordLoginActivity extends BaseMvpActivity<LoginPresenter, Activ
}
String phone = mBinding.edPhone.getText().toString().trim();
if (TextUtils.isEmpty(phone)) {
com.blankj.utilcode.util.ToastUtils.showShort("请输入手机号");
ToastUtils.show("请输入手机号");
return;
}
if (type==1) {
String code = mBinding.edPassword.getText().toString().trim();
if (TextUtils.isEmpty(code)) {
com.blankj.utilcode.util.ToastUtils.showShort("请输入验证码");
ToastUtils.show("请输入验证码");
return;
}
MvpPre.login(phone, "", code, 1);
}else if (type==2) {
String password = mBinding.edPasswordCode.getText().toString().trim();
if (TextUtils.isEmpty(password)) {
com.blankj.utilcode.util.ToastUtils.showShort("请输入密码");
ToastUtils.show("请输入密码");
return;
}
MvpPre.login(phone, password, "", 2);
@@ -522,7 +522,7 @@ public class PasswordLoginActivity extends BaseMvpActivity<LoginPresenter, Activ
} else if (id == R.id.tv_send_code) {
String phone = mBinding.edPhone.getText().toString().trim();
if (TextUtils.isEmpty(phone)) {
com.blankj.utilcode.util.ToastUtils.showShort("请输入手机号");
ToastUtils.show("请输入手机号");
return;
}
sendCodeSuccess(phone);
@@ -547,7 +547,7 @@ public class PasswordLoginActivity extends BaseMvpActivity<LoginPresenter, Activ
api.registerApp(CommonAppContext.getInstance().getCurrentEnvironment().getWxAppId());
if (!api.isWXAppInstalled()){
//todo 提醒未安装微信
com.blankj.utilcode.util.ToastUtils.showShort("请安装微信客户端");
ToastUtils.show("请安装微信客户端");
return;
}
//开始发起登陆请求
@@ -573,7 +573,7 @@ public class PasswordLoginActivity extends BaseMvpActivity<LoginPresenter, Activ
}
public void sendCodeSuccess(String phoneNumber) {
com.blankj.utilcode.util.ToastUtils.showShort("短信验证码发送成功请注意查收");
ToastUtils.show("短信验证码发送成功请注意查收");
mBinding.tvSendCode.setEnabled(false);
mBinding.tvSendCode.setAlpha(0.5f);
releaseTimer();
@@ -627,7 +627,7 @@ public class PasswordLoginActivity extends BaseMvpActivity<LoginPresenter, Activ
LogUtils.e("@@@",s);
CommonAppContext.getInstance();
if (!CommonAppContext.isAlipayInstalled(this)){
com.blankj.utilcode.util.ToastUtils.showShort("请安装支付宝客户端");
ToastUtils.show("请安装支付宝客户端");
return;
}
String authInfo = s;

View File

@@ -1,74 +0,0 @@
if (isBuildModule.toBoolean()) {
//作为独立App应用运行
apply plugin: 'com.android.application'
} else {
//作为组件运行
apply plugin: 'com.android.library'
}
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
android {
compileSdkVersion 35
defaultConfig {
minSdkVersion 24
targetSdkVersion 28
versionCode 1
versionName 1.0
consumerProguardFiles 'consumer-rules.pro'
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
// javaCompileOptions {
// annotationProcessorOptions {
// arguments = [AROUTER_MODULE_NAME: project.getName()]
// }
// }
kapt {
arguments {
arg("AROUTER_MODULE_NAME", project.getName())
}
}
}
buildTypes {
debug {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
sourceSets {
main {
//jni库统一放在libs目录下
// jniLibs.srcDir = ['libs']
if (isBuildModule.toBoolean()) {
//单独运行
manifest.srcFile 'src/main/module/AndroidManifest.xml'
} else {
//合并到宿主中
manifest.srcFile 'src/main/AndroidManifest.xml'
resources {
//正式版本时.剔除debug文件夹下的所有调式文件
exclude 'src/debug/*'
}
}
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
}
dependencies {
implementation deps.arouter_api
kapt deps.arouter_compiler
// kapt deps.arouter_annotation
}

View File

@@ -222,15 +222,5 @@ dependencies {
api project(':Loadinglibrary')
api project(':moduletablayout')
// room数据库
// def room_version = "2.5.0"
// implementation "androidx.room:room-runtime:$room_version"
// implementation "androidx.room:room-ktx:$room_version"
// annotationProcessor "androidx.room:room-compiler:$room_version"
//2. 云normal SDK
//aar的名称例如WbCloudNormal-v5.1.10-123456789.aar填入 'WbCloudNormal-v5.1.10-123456789.aar'
}
//apply plugin: 'com.alibaba.arouter' //

View File

@@ -134,16 +134,10 @@ public class CommonAppContext extends MultiDexApplication implements Applicatio
private boolean isListeningUnreadCount = false;
public boolean onConnectFailed=false;//是否重连
@Getter
@Setter
public Map<String, Integer> onlineMap=new HashMap<>();
public void setOnlineMap(Map<String, Integer> onlineMap) {
this.onlineMap = onlineMap;
}
public Map<String, Integer> getOnlineMap() {
return onlineMap;
}
@Setter
@Getter
public UnreadCountEvent unreadCountEvent;

View File

@@ -3035,6 +3035,7 @@ public class RetrofitClient {
sApiServer.agreeSong(room_id, type).enqueue(new Callback<BaseModel<String>>() {
@Override
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
LogUtils.e("练歌房","练歌房:"+response.body().toString());
onNextRetu(response, observer);
}

View File

@@ -2,14 +2,29 @@ package com.xscm.moduleutil.utils;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.ColorMatrix;
import android.graphics.ColorMatrixColorFilter;
import android.graphics.Paint;
import android.graphics.PorterDuff;
import android.text.TextUtils;
import android.view.View;
import android.widget.ImageView;
import androidx.annotation.NonNull;
import com.bumptech.glide.Glide;
import com.bumptech.glide.load.engine.DiskCacheStrategy;
import com.bumptech.glide.load.engine.bitmap_recycle.BitmapPool;
import com.bumptech.glide.load.resource.bitmap.BitmapTransformation;
import com.bumptech.glide.request.RequestOptions;
import com.xscm.moduleutil.R;
import com.xscm.moduleutil.widget.GrayscaleTransformation;
import java.nio.charset.StandardCharsets;
import java.security.MessageDigest;
/**
@@ -35,7 +50,16 @@ public class ImageLoader {
}
public static void loadImage(Context context, ImageView view, String url) {
Glide.with(context).load(url).error(R.mipmap.default_image).placeholder(R.mipmap.default_image).diskCacheStrategy(DiskCacheStrategy.ALL).into(view);
Glide.with(context).load(url).error(R.mipmap.default_image).placeholder(R.mipmap.default_image)
.diskCacheStrategy(DiskCacheStrategy.ALL).into(view);
}
// 可调节灰度程度的方法
public static void loadGrayscaleImage(Context context, String url, ImageView imageView, float saturation) {
Glide.with(context)
.load(url)
.apply(RequestOptions.bitmapTransform(new GrayscaleTransformation(saturation)))
.into(imageView);
}
public static void loadIcon(Context context, ImageView view, String url) {

View File

@@ -49,7 +49,7 @@ public enum EnvironmentEnum {
private final String mqttUrl;//MQTT服务器地址
private final String H5Url;//h5地址
private final int shelf;//是否上架0平台更新1上架发布到对应的应用商城
private final int shelf;//是否上架0平台更新1上架发布到对应的应用商城上架的初始是没有趣味的需要点击6次才可以打开趣味
EnvironmentEnum(String serverUrl, String ALI_AUTH_KEY, String ossEndPoint, String ossaAcessKeyId,
String ossAccessKeySecret, String ossBucketName, String ossBaseUrl, String wxAppId,

View File

@@ -0,0 +1,42 @@
package com.xscm.moduleutil.widget;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.ColorMatrix;
import android.graphics.ColorMatrixColorFilter;
import android.graphics.Paint;
import androidx.annotation.NonNull;
import com.bumptech.glide.load.engine.bitmap_recycle.BitmapPool;
import com.bumptech.glide.load.resource.bitmap.BitmapTransformation;
import java.nio.charset.StandardCharsets;
import java.security.MessageDigest;
public class GrayscaleTransformation extends BitmapTransformation {
private Float saturation;
public GrayscaleTransformation(float saturation) {
super();
this.saturation = saturation;
}
@Override
protected Bitmap transform(@NonNull BitmapPool pool, @NonNull Bitmap toTransform, int outWidth, int outHeight) {
Bitmap result = pool.get(toTransform.getWidth(), toTransform.getHeight(), Bitmap.Config.ARGB_8888);
Canvas canvas = new Canvas(result);
ColorMatrix colorMatrix = new ColorMatrix();
colorMatrix.setSaturation(saturation); // 设置为灰度
Paint paint = new Paint();
paint.setColorFilter(new ColorMatrixColorFilter(colorMatrix));
canvas.drawBitmap(toTransform, 0, 0, paint);
return result;
}
@Override
public void updateDiskCacheKey(@NonNull MessageDigest messageDigest) {
messageDigest.update("grayscale transformation".getBytes(StandardCharsets.UTF_8));
}
}

View File

@@ -9,9 +9,7 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clipChildren="false"
android:clipToPadding="false">
android:layout_height="wrap_content">
<!--说话动态图-->
<com.xscm.moduleutil.widget.GifAvatarOvalView
android:id="@+id/riv"
@@ -37,9 +35,9 @@
android:scaleType="fitCenter"
android:visibility="gone"
tools:visibility="visible"
android:layout_marginTop="@dimen/dp_12"
app:layout_constraintHeight_percent="1.1"
app:layout_constraintWidth_percent="1"
android:layout_marginTop="@dimen/dp_10"
app:layout_constraintHeight_percent="0.9"
app:layout_constraintWidth_percent="0.8"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"

View File

@@ -4,7 +4,6 @@ import android.Manifest
import android.annotation.SuppressLint
import android.app.ActivityManager
import android.app.AlertDialog
import android.app.ComponentCaller
import android.content.Context
import android.content.DialogInterface
import android.content.Intent
@@ -234,7 +233,6 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
private var qxRedPacketManager: QXRedPacketManager? = null
override fun onKeyDown(keyCode: Int, event: KeyEvent): Boolean {
if (keyCode == KeyEvent.KEYCODE_BACK && event.action == KeyEvent.ACTION_DOWN) {
// 拦截返回键,显示退出对话框而不是直接退出
@@ -254,8 +252,10 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
taskId = intent.getStringExtra("taskId")
}
override fun onNewIntent(intent: Intent, caller: ComponentCaller) {
super.onNewIntent(intent, caller)
@SuppressLint("MissingSuperCall")
override fun onNewIntent(intent: Intent) {
super.onNewIntent(intent)
if ((intent.flags or Intent.FLAG_ACTIVITY_REORDER_TO_FRONT) > 0) {
if (!isTaskRoot) {
val tasksManager = getSystemService(ACTIVITY_SERVICE) as ActivityManager
@@ -273,6 +273,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
}
override fun onCreate(savedInstanceState: Bundle?) {
// 在super.onCreate之前设置主题以避免闪白屏
setTheme(com.xscm.moduleutil.R.style.BaseAppTheme) // 设置你的主主题
@@ -952,7 +953,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
mBinding!!.rlMisc.visibility = View.GONE
}
if (mRoomInfoResp!!.gift_cycle != null && mRoomInfoResp!!.gift_cycle.xlh_info != null && mRoomInfoResp!!.gift_cycle.xlh_info.xlh_status != null && mRoomInfoResp!!.gift_cycle.xlh_info.xlh_status == "1") {
if (mRoomInfoResp?.gift_cycle?.xlh_info?.xlh_status == "1") {
mBinding?.xlhRk?.visibility = View.VISIBLE
xlhDjs(mRoomInfoResp!!.gift_cycle.xlh_info.end_time)
} else {
@@ -966,7 +967,6 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
mBinding!!.clXsb.visibility = View.GONE
}
// 使用Handler延迟执行确保Fragment视图已完全创建
if (publicScreenFragment != null && publicScreenFragment!!.isAdded && publicScreenFragment!!.view != null) {
publicScreenFragment!!.upRoomInfo(resp)
@@ -1614,7 +1614,6 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
}
AgoraManager.getInstance(this@RoomActivity).desMusic()
// stub.setVisibility(View.GONE);
if ((mRoomInfoResp!!.room_info.type_id == "1" || mRoomInfoResp!!.room_info.type_id == "4" ||
mRoomInfoResp!!.room_info.type_id == "3" || mRoomInfoResp!!.room_info.type_id == "8") &&
mRoomInfoResp!!.room_info.label_id == "2"
@@ -3251,7 +3250,6 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
@Subscribe(threadMode = ThreadMode.MAIN)
fun onEventMain(event: BaseEvent?) {
when (event) {
is MusicEvent -> {
if (!isMusic) {
@@ -3681,88 +3679,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
}
this.mRoomInfoResp = resp
val roomBean = resp.room_info
if (roomBean!!.type_id.equals("6")) {
if (!isFinishing && !isDestroyed) {
resetFragment()
upHeight()
} else {
Log.e("Fragment", "Fragment transaction skipped due to state loss.")
}
return
}
this.mRoomBean = roomBean
this.mRoomUserBean = resp.user_info
this.mRoomOwnerBean = resp.room_owner
this.mPitList = mRoomBean!!.pit_list!!
ImageUtils.loadHeadCC(resp.room_info.room_cover, mBinding!!.roomTop.avatar)
mBinding!!.roomTop.name.text = roomBean.room_name
mBinding!!.roomTop.idVal.text = roomBean.room_number
if (mRoomUserBean?.getIs_room_owner() == 1) {
mBinding!!.roomTop.btnFollow.visibility = View.GONE
} else {
mBinding!!.roomTop.btnFollow.visibility = View.VISIBLE
if (resp.isCollect) {
mBinding!!.roomTop.btnFollow.background =
resources.getDrawable(com.xscm.moduleutil.R.mipmap.collected)
mBinding!!.roomTop.btnFollow.text = ""
}
}
if (!isFinishing && !isDestroyed) {
resetFragment()
upHeight()
} else {
Log.e("Fragment", "Fragment transaction skipped due to state loss.")
}
if (mRoomUserBean?.is_collect == 1) {
mBinding!!.roomTop.btnFollow.background =
resources.getDrawable(com.xscm.moduleutil.R.mipmap.yishouc)
mBinding!!.roomTop.btnFollow.text = ""
} else {
// mBinding.roomTop.btnFollow.setBackground(getResources().getDrawable(com.xscm.moduleutil.R.mipmap.collect));
ThemeableDrawableUtils.setThemeableRoundedBackground(
mBinding!!.roomTop.btnFollow,
ColorManager.getInstance().primaryColorInt,
53
)
mBinding!!.roomTop.btnFollow.setTextColor(ColorManager.getInstance().buttonColorInt)
mBinding!!.roomTop.btnFollow.text = "收藏"
}
if ((resp.room_info.type_id == "3" || resp.room_info.type_id == "1" || resp.room_info.type_id == "4") && resp.room_info.label_id == "2") {
AgoraManager.getInstance(this).isBjMusic = false
} else {
AgoraManager.getInstance(this).isBjMusic = true
}
AgoraManager.stopMuisc()
if (!CommonAppContext.getInstance().isMai) {
initializeAudio()
}
if (mRoomInfoResp!!.room_info.label_id == "2" || mRoomInfoResp!!.room_info.type_id == "7") {
mBinding!!.rlMore.visibility = View.GONE
// mBinding.rlMisc.setVisibility(GONE);
} else if (mRoomInfoResp!!.room_info.label_id == "1" || mRoomInfoResp!!.room_info.type_id == "3" || mRoomInfoResp!!.room_info.type_id == "4" ||
mRoomInfoResp!!.room_info.type_id == "8"
) {
mBinding!!.rlMore.visibility = View.GONE
mBinding!!.rlMisc.visibility = View.VISIBLE
}
if (resp.room_info.type_id == "7" || resp.room_info.type_id == "2") {
mBinding!!.rlMore.visibility = View.GONE
mBinding!!.rlMisc.visibility = View.GONE
}
if (mRoomInfoResp!!.hour_ranking_open == 1) {
mBinding!!.clXsb.visibility = View.VISIBLE
} else {
mBinding!!.clXsb.visibility = View.GONE
}
setView(resp)
}
fun upHeight() {

View File

@@ -11,6 +11,8 @@ public class RoomSettingContacts {
void changeRoomSuccess(String s,int position,RoomSettingBean bean);
void changeRoomType(String s);
void agreeSong(String s);
}
public interface IRoomPre extends IPresenter {

View File

@@ -215,9 +215,6 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
@Override
public void onStart() {
super.onStart();
if (!EventBus.getDefault().isRegistered(this)) {
EventBus.getDefault().register(this);
}
LogUtils.e("lxj", "创建room时间" + TimeUtils.date2String(new Date()));
}
@@ -541,7 +538,6 @@ public class RoomFragment extends BaseMvpFragment<RoomPresenter, FragmentRoomBin
}
private void instView() {//隐藏视图
if (mRoomInfoResp.getUser_info().getPit_number() != 0) {
aBoolean = false;
((RoomActivity) getActivity()).ivWheatFeeding(com.xscm.moduleutil.R.mipmap.room_wheat_feeding_up);

View File

@@ -218,7 +218,7 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
// 初始化 PopupWindow
if (roomInfoResp != null) {
if (roomInfoResp.getPk_info() != null) {
upWheter();
upWhether();
updateWheatData();
} else {
isWhether2();
@@ -425,7 +425,26 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
}
private void isWhether2() {
mBinding.flexboxLayout.setVisibility(View.VISIBLE);
// 判断是否包含
boolean isContained = false;
for (int i = 0; i < flexboxLayout.getChildCount(); i++) {
if (flexboxLayout.getChildAt(i) == WheatLayoutSingManager.Companion.getInstance().getRootContainer()) {
isContained = true;
break;
}
}
if (isContained) {
Log.d("FlexboxLayout", "包含 wheatContainer");
// 执行相关操作
} else {
Log.d("FlexboxLayout", "不包含 wheatContainer");
// 可以添加
flexboxLayout.addView(WheatLayoutSingManager.Companion.getInstance().getRootContainer());
}
flexboxLayout.setVisibility(View.VISIBLE);
mBinding.cl.setVisibility(View.GONE);
if (!ObjectUtils.isEmpty(roomInfoResp.getRoom_info().getPit_list()) && roomInfoResp.getRoom_info().getPit_list().size() == 10) {
@@ -433,13 +452,13 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
}
}
private void upWheter() {
private void upWhether() {
if (roomInfoResp.getPk_info() == null) {
if (!ObjectUtils.isEmpty(roomInfoResp.getRoom_info().getPit_list()) && roomInfoResp.getRoom_info().getPit_list().size() == 10) {
wheatLayoutSingManager.setWheatData(roomInfoResp.getRoom_info().getPit_list());
}
} else {
mBinding.flexboxLayout.setVisibility(View.GONE);
flexboxLayout.setVisibility(View.GONE);
mBinding.cl.setVisibility(View.VISIBLE);
MvpPre.postRoomInfo(roomInfoResp.getPk_info().getPk_room_id(), roomInfoResp.getUser_info().getPit_number() + "", 1);
}
@@ -490,7 +509,7 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
roomInfoResp = resp;
roomId = roomInfoResp == null ? "" : roomInfoResp.getRoom_info().getRoom_id();
// isWhether();
upWheter();
upWhether();
updateWheatData();
}
@@ -674,10 +693,10 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
if (wheatLayoutSingManager != null) {
wheatLayoutSingManager.release();
}
mBinding.flexboxLayout.setVisibility(View.GONE);
flexboxLayout.setVisibility(View.GONE);
mBinding.cl.setVisibility(VISIBLE);
FlexboxLayout flexboxLayout = mBinding.flexboxLayout1;
wheatLayoutManager1 = new WheatLayoutManager(requireContext(), flexboxLayout);
FlexboxLayout flexboxLayout1 = mBinding.flexboxLayout1;
wheatLayoutManager1 = new WheatLayoutManager(requireContext(), flexboxLayout1);
wheatLayoutManager1.setOnWheatClickListener(new WheatLayoutManager.OnWheatClickListener() {
@Override
public void onWheatClick(RoomDefaultWheatView view, int pitNumber1) {
@@ -999,7 +1018,7 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
}
public void event1021(RoomMessageEvent message) {
if (roomInfoRespPk != null || roomInfoRespPk.getPk_info() != null) {
if (roomInfoRespPk != null && roomInfoRespPk.getPk_info() != null) {
for (RoomPitBean pitBean : roomInfoResp.getRoom_info().getPit_list()){
pitBean.setCharm("0");
if (pitBean.getUser_id()!=null && !pitBean.getUser_id().isEmpty() && !pitBean.getUser_id().equals("0")) {
@@ -1196,7 +1215,6 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
/// 1030
public void event1030(RoomMessageEvent message) {
MvpPre.postRoomInfo(message.getRoomId(), roomInfoResp.getUser_info().getPit_number() + "", 3);
if (message.getText().getType() == 1) {
MvpPre.postRoomInfo(message.getText().getRoom_id(), roomInfoResp.getUser_info().getPit_number() + "", 1);
@@ -1232,6 +1250,7 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
mBinding.imStart2.setVisibility(GONE);
mBinding.imStart.setVisibility(GONE);
roomInfoRespPk = null;
}
/// 1037

View File

@@ -84,6 +84,10 @@ public class RoomSettingPresenter extends BasePresenter<RoomSettingContacts.View
@Override
public void onNext(String s) {
if (MvpRef==null){
MvpRef = new WeakReference<>(mView);
}
MvpRef.get().agreeSong(s);
}
});
}

View File

@@ -27,7 +27,8 @@ public class UserGiftWallAdapter extends BaseQuickAdapter<CombinedGiftBean, Base
protected void convert(BaseViewHolder helper, CombinedGiftBean item) {
helper.setText(R.id.tv_gift_name, item.getGift_name());
helper.setText(R.id.tv_gift_price, item.getGift_price());
ImageLoader.loadImage(mContext, helper.getView(R.id.iv_gift_pic), item.getBase_image());
//
TextView tv_number = helper.getView(R.id.tv_number);
if (item.is_liang()) {
// helper.getView(R.id.cl_iv_down_on).setBackgroundColor(Color.parseColor("#E6E6E6"));
@@ -39,7 +40,7 @@ public class UserGiftWallAdapter extends BaseQuickAdapter<CombinedGiftBean, Base
helper.setVisible(R.id.tv_number, true);
// helper.setVisible(R.id.riv_user_head, true);
helper.setVisible(R.id.iv_gift_pic_overlay, false);
ImageLoader.loadGrayscaleImage(mContext, item.getBase_image(),helper.getView(R.id.iv_gift_pic),1);
// 显示送礼物的用户列表
RecyclerView recyclerView = helper.getView(R.id.rv_gift_user_list);
// recyclerView.setLayoutManager(new GridLayoutManager(mContext,2,LinearLayoutManager.HORIZONTAL,false));
@@ -69,10 +70,11 @@ public class UserGiftWallAdapter extends BaseQuickAdapter<CombinedGiftBean, Base
// 未点亮的礼物只显示图片、名称和金额,不高亮
helper.setVisible(R.id.tv_number, false);
// helper.setVisible(R.id.riv_user_head, false);
helper.setVisible(R.id.iv_gift_pic_overlay, true);
helper.setVisible(R.id.iv_gift_pic_overlay, false);
ImageLoader.loadGrayscaleImage(mContext, item.getBase_image(),helper.getView(R.id.iv_gift_pic),0);
// 隐藏送礼物的用户列表
helper.setVisible(R.id.rv_gift_user_list, false);
helper.getView(R.id.iv_gift_pic).setAlpha(0.2f);
// helper.getView(R.id.iv_gift_pic).setAlpha(0.2f);
}
}
}

View File

@@ -369,11 +369,13 @@ public class RoomSettingFragment extends BaseMvpDialogFragment<RoomSettingPresen
// 房主显示全部
if (roleLevel == 1) {
if (onMic) {
if (type == RoomSettingBean.QXRoomSettingTypeRoomBgMusic || type == RoomSettingBean.QXRoomSettingTypeRoomSubsidy|| type == RoomSettingBean.QXRoomSettingTypeRoomMyDress ) {
if (type == RoomSettingBean.QXRoomSettingTypeRoomBgMusic || type == RoomSettingBean.QXRoomSettingTypeRoomSubsidy
|| type == RoomSettingBean.QXRoomSettingTypeRoomMyDress ) {
return false;
}
} else {
if (type == RoomSettingBean.QXRoomSettingTypeRoomBgMusic || type == RoomSettingBean.QXRoomSettingTypeRoomSubsidy|| type == RoomSettingBean.QXRoomSettingTypeRoomMyDress ) {
if (type == RoomSettingBean.QXRoomSettingTypeRoomBgMusic || type == RoomSettingBean.QXRoomSettingTypeRoomSubsidy
|| type == RoomSettingBean.QXRoomSettingTypeRoomMyDress ) {
return false;
}
}
@@ -385,45 +387,51 @@ public class RoomSettingFragment extends BaseMvpDialogFragment<RoomSettingPresen
type == RoomSettingBean.QXRoomSettingTypeRoomTypeLianG ||
type == RoomSettingBean.QXRoomSettingTypeRoomClearMessage || type == QXRoomSettingTypeRoomOrderMic || type == RoomSettingBean.QXRoomSettingTypeRoomFloatingScreen
|| type == RoomSettingBean.QXRoomSettingTypeRoomBgMusic || type == RoomSettingBean.QXRoomSettingTypeRoomBgImage || type == -1) {
if (onMic) {
if (type == RoomSettingBean.QXRoomSettingTypeRoomBgMusic || type == RoomSettingBean.QXRoomSettingTypeRoomSubsidy || type == RoomSettingBean.QXRoomSettingTypeRoomMyDress ) {
if (type == RoomSettingBean.QXRoomSettingTypeRoomBgMusic || type == RoomSettingBean.QXRoomSettingTypeRoomSubsidy
|| type == RoomSettingBean.QXRoomSettingTypeRoomMyDress ) {
return false;
}
} else {
if (type == RoomSettingBean.QXRoomSettingTypeRoomBgMusic || type == RoomSettingBean.QXRoomSettingTypeRoomSubsidy || type == RoomSettingBean.QXRoomSettingTypeRoomMyDress ) {
if (type == RoomSettingBean.QXRoomSettingTypeRoomBgMusic || type == RoomSettingBean.QXRoomSettingTypeRoomSubsidy
|| type == RoomSettingBean.QXRoomSettingTypeRoomMyDress ) {
return false;
}
}
// if (onMic) {
// if (type == RoomSettingBean.QXRoomSettingTypeRoomBgMusic || type == RoomSettingBean.QXRoomSettingTypeRoomSubsidy
// || type == RoomSettingBean.QXRoomSettingTypeRoomMyDress /*|| type == RoomSettingBean.QXRoomSettingTypeRoomTypeLianG*/) {
// return false;
// }
// } else {
// if (type == RoomSettingBean.QXRoomSettingTypeRoomBgMusic || type == RoomSettingBean.QXRoomSettingTypeRoomSubsidy
// || type == RoomSettingBean.QXRoomSettingTypeRoomMyDress /*|| type == RoomSettingBean.QXRoomSettingTypeRoomTypeLianG*/) {
// return false;
// }
// }
return true;
}
if (type >= RoomSettingBean.QXRoomSettingTypeRoomLeave &&
type <= RoomSettingBean.QXRoomSettingTypeRoomReport || type == RoomSettingBean.QXRoomSettingTypeRoomFloatingRed
) {
type <= RoomSettingBean.QXRoomSettingTypeRoomReport || type == RoomSettingBean.QXRoomSettingTypeRoomFloatingRed) {
return true;
} else {
if (type == RoomSettingBean.QXRoomSettingTypeRoomBgMusic || type == RoomSettingBean.QXRoomSettingTypeRoomSubsidy || type == RoomSettingBean.QXRoomSettingTypeRoomMyDress ) {
if (type == RoomSettingBean.QXRoomSettingTypeRoomBgMusic || type == RoomSettingBean.QXRoomSettingTypeRoomSubsidy
|| type == RoomSettingBean.QXRoomSettingTypeRoomMyDress ) {
return false;
}
// if (type == RoomSettingBean.QXRoomSettingTypeRoomBgMusic || type == RoomSettingBean.QXRoomSettingTypeRoomSubsidy
// || type == RoomSettingBean.QXRoomSettingTypeRoomMyDress /*|| type == RoomSettingBean.QXRoomSettingTypeRoomTypeLianG*/) {
// return false;
// }
}
return false;
}
// else if (roleLevel == 3 ) {// 主持且在麦位上
// if (type== RoomSettingBean.QXRoomSettingTypeRoomTypeSing || type == RoomSettingBean.QXRoomSettingTypeRoomTypeAuction ||
// type == RoomSettingBean.QXRoomSettingTypeRoomTypeBoy || type == RoomSettingBean.QXRoomSettingTypeRoomTypeGirl||
// type== RoomSettingBean.QXRoomSettingTypeRoomClearMessage || type == QXRoomSettingTypeRoomOrderMic
// || type == RoomSettingBean.QXRoomSettingTypeRoomBgMusic || type == RoomSettingBean.QXRoomSettingTypeRoomBgImage) {
// return true;
// }
// // 更多操作条目也显示
// if (type >= RoomSettingBean.QXRoomSettingTypeRoomLeave &&
// type <= RoomSettingBean.QXRoomSettingTypeRoomReport) {
// return true;
// }
// return false;
// }
// else if (roleLevel == 3 && !onMic && type == RoomSettingBean.QXRoomSettingTypeRoomBgMusic) { // 主持但不在麦位上时,隐藏背景音乐
// return false;
// }
else { // 普通用户只显示更多操作中的特定条目
return type == RoomSettingBean.QXRoomSettingTypeRoomLeave ||
type == RoomSettingBean.QXRoomSettingTypeRoomShare ||
@@ -496,4 +504,10 @@ public class RoomSettingFragment extends BaseMvpDialogFragment<RoomSettingPresen
ToastUtils.show(s);
dismiss();
}
@Override
public void agreeSong(String s) {
ToastUtils.show(s);
dismiss();
}
}

View File

@@ -5,7 +5,6 @@ import android.content.Context
import android.graphics.Canvas
import android.util.Log
import android.view.Gravity
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.LinearLayout
@@ -149,7 +148,7 @@ class WheatLayoutSingManager private constructor(
// 清空现有视图(保留缓存逻辑)
val screenWidth = getScreenWidth()
val itemWidth = screenWidth / 4
val itemWidth = screenWidth / 4.2
var row = createHorizontalRow()
@@ -173,7 +172,27 @@ class WheatLayoutSingManager private constructor(
}
multiWheatViews.add(wheatView)
val params = getLayoutParams(i, itemWidth)
var params: LinearLayout.LayoutParams? = null
if (i == 0) {
val fixedHeightInDp = 110 // 固定高度为 100dp
val fixedHeightInPx = dpToPx(fixedHeightInDp) // 调用已有的 dpToPx 方法
// 第一个控件:左边距 86dp右边距 100dp
params = LinearLayout.LayoutParams(itemWidth.toInt(), fixedHeightInPx)
params.rightMargin = dpToPx(50)
} else if (i == 1) {
val fixedHeightInDp = 110 // 固定高度为 100dp
val fixedHeightInPx = dpToPx(fixedHeightInDp) // 调用已有的 dpToPx 方法
// 第二个控件:右边距 86dp
params = LinearLayout.LayoutParams(itemWidth.toInt(), fixedHeightInPx)
} else {
val fixedHeightInDp = 90 // 固定高度为 100dp
val fixedHeightInPx = dpToPx(fixedHeightInDp) // 调用已有的 dpToPx 方法
params = LinearLayout.LayoutParams(itemWidth.toInt() - 30, fixedHeightInPx + 30)
// 其他控件保持原有逻辑
params.setMargins(0, 0, 0, 0) // 不设右边距,由 row padding 控制
}
// val params = getLayoutParams(i, itemWidth.toInt())
wheatView.layoutParams = params
// 设置点击事件
@@ -335,19 +354,20 @@ class WheatLayoutSingManager private constructor(
private fun getLayoutParams(index: Int, itemWidth: Int): LinearLayout.LayoutParams {
return when (index) {
0 -> {
LinearLayout.LayoutParams(itemWidth, dpToPx(110)).apply {
LinearLayout.LayoutParams((itemWidth * 1.7).toInt(), dpToPx(110)).apply {
// 移除右间距,通过容器居中自动平衡
rightMargin = (getScreenWidth() - (dpToPx(110) * 2)) / 2
rightMargin = (getScreenWidth() - ((itemWidth * 1.7).toInt() * 2)) / 2
}
}
1 -> {
LinearLayout.LayoutParams(itemWidth, dpToPx(110))
LinearLayout.LayoutParams((itemWidth * 1.7).toInt(), dpToPx(110))
}
else -> {
val margin = (getScreenWidth() - (itemWidth * 4)) / 4 / 2
// 统一边距逻辑
LinearLayout.LayoutParams(itemWidth - 30, dpToPx(90) + 30).apply {
LinearLayout.LayoutParams((itemWidth *1.3).toInt() , dpToPx(110)).apply {
setMargins(0, 0, 0, 0)
}
}

View File

@@ -2,7 +2,7 @@
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<!-- 用item标签限制整体尺寸maxWidth=100dpheight=10dp与tabIndicatorHeight一致 -->
<item
android:height="@dimen/dp_8"
android:height="@dimen/dp_6"
android:gravity="center"
android:maxWidth="@dimen/dp_40">
<!-- 最大宽度(根据需求调整) -->

View File

@@ -286,7 +286,29 @@
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_40"
android:layout_marginTop="@dimen/dp_24"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="邀请码"
android:textColor="#73000000"
android:textSize="16sp"
android:textStyle="bold" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=" (非必填)"
android:textColor="#33000000"
android:textSize="12sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"

View File

@@ -28,9 +28,7 @@
android:layout_marginRight="@dimen/dp_10"
app:tabIndicator="@drawable/tab_indicator_bottom"
app:tabIndicatorColor="@null"
app:tabIndicatorFullWidth="false"
app:tabIndicatorGravity="bottom"
app:tabIndicatorHeight="10dp"
app:tabMode="fixed"
app:tabSelectedTextColor="@color/white"
app:tabTextAppearance="@style/CustomTabTextAppearance"

View File

@@ -3,12 +3,12 @@ plugins {
}
android {
compileSdkVersion 30
compileSdk 35
// buildToolsVersion "30.0.3"
namespace "com.tencent.qcloud.tuikit.timcommon"
defaultConfig {
minSdkVersion 19
targetSdkVersion 30
minSdkVersion 24
targetSdk 35
}
buildFeatures {
buildConfig = true

View File

@@ -7,12 +7,12 @@ plugins {
apply plugin: 'kotlin-android'
android {
compileSdkVersion 30
compileSdk 35
// buildToolsVersion "30.0.3"
namespace "com.tencent.qcloud.tuikit.tuichat"
defaultConfig {
minSdkVersion 19
targetSdkVersion 35
minSdkVersion 24
targetSdk 35
renderscriptSupportModeEnabled false
renderscriptTargetApi 30

View File

@@ -102,7 +102,7 @@ public class TUIC2CChatFragment extends TUIBaseChatFragment {
@Override
public boolean onMenuItemClick(android.view.MenuItem item) {
if ("举报".equals(item.getTitle())) {
ARouter.getInstance().build("/moduleUtil/WebViewActivity").withString("url", "https://vespa.qxyushen.top/h5/web/index.html#/pages/feedback/report?id=?id="+getToken()+"&fromType=1&fromId="+ getUserInfo().getUser_id()).navigation();
ARouter.getInstance().build("/moduleUtil/WebViewActivity").withString("url", "https://vespa.qxyushen.top/h5/web/index.html#/pages/feedback/report?id="+getToken()+"&fromType=1&fromId="+ getUserInfo().getUser_id()).navigation();
return true;
}
return false;

View File

@@ -177,7 +177,7 @@ class VoiceWaveView @JvmOverloads constructor(
}
}
override fun onDraw(canvas: Canvas?) {
override fun onDraw(canvas: Canvas) {
super.onDraw(canvas)
waveList.clear()

View File

@@ -28,6 +28,7 @@ import com.tencent.qcloud.tuikit.tuichat.bean.message.TextMessageBean;
import com.tencent.qcloud.tuikit.tuichat.bean.message.VideoMessageBean;
import com.tencent.qcloud.tuikit.tuichat.config.TUIChatConfigs;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@@ -135,10 +136,9 @@ public class ChatMessageBuilder {
messageBean.setImgWidth(bitmap.getWidth());
messageBean.setImgHeight(bitmap.getHeight());
mmr.release();
} catch (Exception ex) {
TUIChatLog.e(TAG, "MediaMetadataRetriever exception " + ex);
} finally {
mmr.release();
}
return messageBean;
}
@@ -168,7 +168,11 @@ public class ChatMessageBuilder {
} catch (Exception ex) {
TUIChatLog.e(TAG, "MediaMetadataRetriever exception " + ex);
} finally {
mmr.release();
try {
mmr.release();
}catch (IOException e){
TUIChatLog.e(TAG, "MediaMetadataRetriever release exception " + e);
}
}
return null;

View File

@@ -3,12 +3,12 @@ plugins {
}
android {
compileSdkVersion 30
// buildToolsVersion "30.0.3"
compileSdk 35
namespace "com.tencent.qcloud.tuikit.tuiconversation"
defaultConfig {
minSdkVersion 19
targetSdkVersion 30
minSdkVersion 24
targetSdk 35
}
buildFeatures {
buildConfig = true

View File

@@ -4,12 +4,12 @@ plugins {
android {
compileSdkVersion 30
compileSdk 35
// buildToolsVersion "30.0.3"
namespace "com.tencent.qcloud.tuicore"
defaultConfig {
minSdkVersion 19
targetSdkVersion 30
minSdkVersion 24
targetSdk 35
consumerProguardFiles "consumer-rules.pro"
}