1.修改BUG
2.礼物添加一键全送功能 3.转盘修改底部按钮展示、音效和特效功能
This commit is contained in:
4
.idea/deploymentTargetSelector.xml
generated
4
.idea/deploymentTargetSelector.xml
generated
@@ -4,10 +4,10 @@
|
|||||||
<selectionStates>
|
<selectionStates>
|
||||||
<SelectionState runConfigName="app">
|
<SelectionState runConfigName="app">
|
||||||
<option name="selectionMode" value="DROPDOWN" />
|
<option name="selectionMode" value="DROPDOWN" />
|
||||||
<DropdownSelection timestamp="2025-09-06T07:32:40.687375600Z">
|
<DropdownSelection timestamp="2025-09-09T08:46:46.893032600Z">
|
||||||
<Target type="DEFAULT_BOOT">
|
<Target type="DEFAULT_BOOT">
|
||||||
<handle>
|
<handle>
|
||||||
<DeviceId pluginId="Default" identifier="serial=emulator-5554;connection=3358318f" />
|
<DeviceId pluginId="PhysicalDevice" identifier="serial=34V0224723026458" />
|
||||||
</handle>
|
</handle>
|
||||||
</Target>
|
</Target>
|
||||||
</DropdownSelection>
|
</DropdownSelection>
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ isBuildModule=false
|
|||||||
android.injected.testOnly=false
|
android.injected.testOnly=false
|
||||||
|
|
||||||
APP_VERSION_NAME=1.0.0
|
APP_VERSION_NAME=1.0.0
|
||||||
APP_VERSION_CODE=117
|
APP_VERSION_CODE=118
|
||||||
|
|
||||||
org.gradle.jvm.toolchain.useLegacyAdapters=false
|
org.gradle.jvm.toolchain.useLegacyAdapters=false
|
||||||
#org.gradle.java.home=C\:\\Users\\qx\\.jdks\\ms-17.0.15
|
#org.gradle.java.home=C\:\\Users\\qx\\.jdks\\ms-17.0.15
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ import android.net.Uri;
|
|||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.provider.Settings;
|
import android.provider.Settings;
|
||||||
|
import android.view.Gravity;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.MotionEvent;
|
import android.view.MotionEvent;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
@@ -38,6 +39,7 @@ import androidx.databinding.ViewDataBinding;
|
|||||||
import com.alibaba.android.arouter.launcher.ARouter;
|
import com.alibaba.android.arouter.launcher.ARouter;
|
||||||
import com.blankj.utilcode.util.ActivityUtils;
|
import com.blankj.utilcode.util.ActivityUtils;
|
||||||
import com.blankj.utilcode.util.BarUtils;
|
import com.blankj.utilcode.util.BarUtils;
|
||||||
|
import com.blankj.utilcode.util.LogUtils;
|
||||||
import com.hjq.toast.ToastUtils;
|
import com.hjq.toast.ToastUtils;
|
||||||
import com.tencent.qcloud.tuikit.tuichat.bean.ChatInfo;
|
import com.tencent.qcloud.tuikit.tuichat.bean.ChatInfo;
|
||||||
import com.xscm.moduleutil.R;
|
import com.xscm.moduleutil.R;
|
||||||
@@ -47,6 +49,7 @@ import com.xscm.moduleutil.event.MqttBean;
|
|||||||
import com.xscm.moduleutil.utils.ARouteConstants;
|
import com.xscm.moduleutil.utils.ARouteConstants;
|
||||||
import com.xscm.moduleutil.utils.BackgroundManager;
|
import com.xscm.moduleutil.utils.BackgroundManager;
|
||||||
import com.xscm.moduleutil.utils.ColorManager;
|
import com.xscm.moduleutil.utils.ColorManager;
|
||||||
|
import com.xscm.moduleutil.utils.DialogUtils;
|
||||||
import com.xscm.moduleutil.utils.DisplayUtil;
|
import com.xscm.moduleutil.utils.DisplayUtil;
|
||||||
import com.xscm.moduleutil.utils.ImageUtils;
|
import com.xscm.moduleutil.utils.ImageUtils;
|
||||||
import com.xscm.moduleutil.utils.LanguageUtil;
|
import com.xscm.moduleutil.utils.LanguageUtil;
|
||||||
@@ -279,6 +282,36 @@ public abstract class BaseAppCompatActivity<VDB extends ViewDataBinding> extends
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onDestroy() {
|
protected void onDestroy() {
|
||||||
|
|
||||||
|
// 清理MQTT相关资源
|
||||||
|
synchronized (mqttQueueLock) {
|
||||||
|
mqttMessageQueue.clear();
|
||||||
|
isMqttPlaying = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 清理XLH相关资源
|
||||||
|
synchronized (xlhQueueLock) {
|
||||||
|
xlhMessageQueue.clear();
|
||||||
|
isXlhPlaying = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 移除当前显示的视图
|
||||||
|
try {
|
||||||
|
if (currentMqttView != null && currentMqttView.getParent() != null) {
|
||||||
|
ViewGroup parent = (ViewGroup) currentMqttView.getParent();
|
||||||
|
parent.removeView(currentMqttView);
|
||||||
|
}
|
||||||
|
currentMqttView = null;
|
||||||
|
|
||||||
|
if (currentXlhView != null && currentXlhView.getParent() != null) {
|
||||||
|
ViewGroup parent = (ViewGroup) currentXlhView.getParent();
|
||||||
|
parent.removeView(currentXlhView);
|
||||||
|
}
|
||||||
|
currentXlhView = null;
|
||||||
|
} catch (Exception e) {
|
||||||
|
LogUtils.e("清理飘屏视图失败", e);
|
||||||
|
}
|
||||||
|
|
||||||
// 移除背景更新监听器
|
// 移除背景更新监听器
|
||||||
BackgroundManager.getInstance().removeListener(this);
|
BackgroundManager.getInstance().removeListener(this);
|
||||||
// 移除颜色变化监听器
|
// 移除颜色变化监听器
|
||||||
@@ -289,6 +322,12 @@ public abstract class BaseAppCompatActivity<VDB extends ViewDataBinding> extends
|
|||||||
if (EventBus.getDefault().isRegistered(this)) {
|
if (EventBus.getDefault().isRegistered(this)) {
|
||||||
EventBus.getDefault().unregister(this);
|
EventBus.getDefault().unregister(this);
|
||||||
}
|
}
|
||||||
|
try {
|
||||||
|
unregisterReceiver(mLogoutReceiver);
|
||||||
|
} catch (Exception e) {
|
||||||
|
// 忽略异常
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
unregisterReceiver(mLogoutReceiver);
|
unregisterReceiver(mLogoutReceiver);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
@@ -363,164 +402,255 @@ public abstract class BaseAppCompatActivity<VDB extends ViewDataBinding> extends
|
|||||||
// 在类中添加以下成员变量
|
// 在类中添加以下成员变量
|
||||||
private final List<MqttBean> messageQueue = new ArrayList<>(); // 消息队列
|
private final List<MqttBean> messageQueue = new ArrayList<>(); // 消息队列
|
||||||
private boolean isPlaying = false; // 播放状态标志
|
private boolean isPlaying = false; // 播放状态标志
|
||||||
|
private boolean isPlaying2 = false; // 播放状态标志
|
||||||
private final Object queueLock = new Object(); // 队列同步锁
|
private final Object queueLock = new Object(); // 队列同步锁
|
||||||
|
|
||||||
/// 礼物特效
|
/// 礼物特效
|
||||||
|
// 在类中添加以下成员变量
|
||||||
|
private final List<MqttBean> mqttMessageQueue = new ArrayList<>(); // MQTT消息队列
|
||||||
|
private final List<XLHBean> xlhMessageQueue = new ArrayList<>(); // XLH消息队列
|
||||||
|
private boolean isMqttPlaying = false; // MQTT播放状态标志
|
||||||
|
private boolean isXlhPlaying = false; // XLH播放状态标志
|
||||||
|
private final Object mqttQueueLock = new Object(); // MQTT队列同步锁
|
||||||
|
private final Object xlhQueueLock = new Object(); // XLH队列同步锁
|
||||||
|
private View currentMqttView = null; // 当前正在播放的MQTT视图
|
||||||
|
private View currentXlhView = null; // 当前正在播放的XLH视图
|
||||||
|
|
||||||
|
/// 礼物特效 - MQTT消息处理
|
||||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||||
public void onMessageReceived(MqttBean mqttBean) {
|
public void onMessageReceived(MqttBean mqttBean) {
|
||||||
if (mqttBean == null) {
|
LogUtils.e("收到MQTT", mqttBean);
|
||||||
return;
|
if (mqttBean == null) return;
|
||||||
}
|
|
||||||
|
|
||||||
// 将消息添加到队列
|
synchronized (mqttQueueLock) {
|
||||||
synchronized (queueLock) {
|
mqttMessageQueue.add(mqttBean);
|
||||||
messageQueue.add(mqttBean);
|
if (!isMqttPlaying) {
|
||||||
|
isMqttPlaying = true;
|
||||||
|
processNextMqttMessage();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// 尝试播放下一个消息
|
|
||||||
processNextMessage();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// XLH消息处理
|
||||||
|
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||||
|
public void onEvent(XLHBean event) {
|
||||||
|
LogUtils.e("收到XLH", event);
|
||||||
|
if (event == null) return;
|
||||||
|
|
||||||
private void processNextMessage() {
|
synchronized (xlhQueueLock) {
|
||||||
synchronized (queueLock) {
|
xlhMessageQueue.add(event);
|
||||||
// 如果正在播放或队列为空,则不处理
|
if (!isXlhPlaying) {
|
||||||
if (isPlaying || messageQueue.isEmpty()) {
|
isXlhPlaying = true;
|
||||||
|
processNextXlhMessage();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 处理下一个MQTT消息
|
||||||
|
private void processNextMqttMessage() {
|
||||||
|
MqttBean mqttBean;
|
||||||
|
synchronized (mqttQueueLock) {
|
||||||
|
if (mqttMessageQueue.isEmpty()) {
|
||||||
|
isMqttPlaying = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
mqttBean = mqttMessageQueue.remove(0);
|
||||||
// 标记为正在播放
|
|
||||||
isPlaying = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MqttBean mqttBean;
|
|
||||||
synchronized (queueLock) {
|
|
||||||
mqttBean = messageQueue.remove(0); // 取出队列中的第一个消息
|
|
||||||
}
|
|
||||||
|
|
||||||
// 显示飘屏消息
|
|
||||||
showFloatingMessage(mqttBean);
|
showFloatingMessage(mqttBean);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 处理下一个XLH消息
|
||||||
private void showFloatingMessage(MqttBean mqttBean) {
|
private void processNextXlhMessage() {
|
||||||
ViewGroup decorView = (ViewGroup) this.getWindow().getDecorView();
|
XLHBean xlhBean;
|
||||||
// 如果浮动视图未创建,则创建一次
|
synchronized (xlhQueueLock) {
|
||||||
View floatingView = LayoutInflater.from(this).inflate(R.layout.item_piaoping, null);
|
if (xlhMessageQueue.isEmpty()) {
|
||||||
|
isXlhPlaying = false;
|
||||||
// 设置布局参数
|
return;
|
||||||
FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(
|
}
|
||||||
FrameLayout.LayoutParams.MATCH_PARENT,
|
xlhBean = xlhMessageQueue.remove(0);
|
||||||
FrameLayout.LayoutParams.WRAP_CONTENT
|
}
|
||||||
);
|
showPiaoPingMessageXlh(xlhBean);
|
||||||
layoutParams.topMargin = com.sunfusheng.marqueeview.DisplayUtil.dip2px(this, 70);
|
|
||||||
layoutParams.gravity = android.view.Gravity.TOP | android.view.Gravity.CENTER_HORIZONTAL;
|
|
||||||
floatingView.setLayoutParams(layoutParams);
|
|
||||||
|
|
||||||
// 初始化动画监听器
|
|
||||||
setupAnimationListener(floatingView, decorView);
|
|
||||||
|
|
||||||
// 更新视图数据
|
|
||||||
updateFloatingViewData(floatingView, mqttBean);
|
|
||||||
|
|
||||||
// 如果浮动视图未添加到 decorView,则添加
|
|
||||||
decorView.addView(floatingView);
|
|
||||||
|
|
||||||
// 重置视图位置并开始动画
|
|
||||||
resetAndStartAnimation(floatingView);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setupAnimationListener(View floatingView, ViewGroup decorView) {
|
ViewGroup decorView;
|
||||||
// 为视图添加一个全局布局监听器,确保在视图完全加载后再设置动画
|
ViewGroup decorView1;
|
||||||
floatingView.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
|
|
||||||
@Override
|
|
||||||
public void onGlobalLayout() {
|
|
||||||
// 移除监听器,避免重复调用
|
|
||||||
floatingView.getViewTreeObserver().removeOnGlobalLayoutListener(this);
|
|
||||||
|
|
||||||
// 确保初始位置在屏幕右侧外部
|
private void showFloatingMessage(MqttBean mqttBean) {
|
||||||
floatingView.setTranslationX(floatingView.getWidth());
|
try {
|
||||||
|
// 清理之前的视图(如果存在)
|
||||||
|
if (currentMqttView != null && currentMqttView.getParent() != null) {
|
||||||
|
ViewGroup parent = (ViewGroup) currentMqttView.getParent();
|
||||||
|
parent.removeView(currentMqttView);
|
||||||
|
}
|
||||||
|
|
||||||
// 第一阶段:从右到屏幕右侧边缘(缓慢进入)
|
if (decorView == null) {
|
||||||
ObjectAnimator animator1 = ObjectAnimator.ofFloat(floatingView, "translationX",
|
decorView = (ViewGroup) getWindow().getDecorView();
|
||||||
floatingView.getWidth(), 0f);
|
}
|
||||||
animator1.setDuration(1500); // 延长动画时间到1.5秒
|
|
||||||
animator1.setInterpolator(new DecelerateInterpolator(2.0f)); // 更平缓的减速效果
|
|
||||||
animator1.start();
|
|
||||||
|
|
||||||
// 第二阶段:延迟1秒后从当前位置向左滑出
|
currentMqttView = LayoutInflater.from(this).inflate(R.layout.item_piaoping, null);
|
||||||
floatingView.postDelayed(() -> {
|
FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(
|
||||||
ObjectAnimator animator2 = ObjectAnimator.ofFloat(floatingView, "translationX",
|
FrameLayout.LayoutParams.MATCH_PARENT,
|
||||||
0f, -floatingView.getWidth());
|
FrameLayout.LayoutParams.WRAP_CONTENT);
|
||||||
animator2.setDuration(1500); // 延长动画时间到1.5秒
|
layoutParams.topMargin = com.sunfusheng.marqueeview.DisplayUtil.dip2px(this, 70);
|
||||||
animator2.setInterpolator(new DecelerateInterpolator(2.0f)); // 更平缓的减速效果
|
layoutParams.gravity = Gravity.TOP | Gravity.CENTER_HORIZONTAL;
|
||||||
|
currentMqttView.setLayoutParams(layoutParams);
|
||||||
|
decorView.addView(currentMqttView);
|
||||||
|
|
||||||
|
updateFloatingViewData(currentMqttView, mqttBean);
|
||||||
|
resetAndStartMqttAnimation(currentMqttView, () -> {
|
||||||
|
// 清理当前视图
|
||||||
|
if (currentMqttView != null && currentMqttView.getParent() != null) {
|
||||||
|
ViewGroup parent = (ViewGroup) currentMqttView.getParent();
|
||||||
|
parent.removeView(currentMqttView);
|
||||||
|
}
|
||||||
|
currentMqttView = null;
|
||||||
|
|
||||||
|
// 处理队列中的下一条消息
|
||||||
|
synchronized (mqttQueueLock) {
|
||||||
|
isMqttPlaying = false;
|
||||||
|
processNextMqttMessage();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} catch (Exception e) {
|
||||||
|
LogUtils.e("显示MQTT飘屏失败", e);
|
||||||
|
// 出现异常时继续处理队列
|
||||||
|
synchronized (mqttQueueLock) {
|
||||||
|
isMqttPlaying = false;
|
||||||
|
processNextMqttMessage();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void showPiaoPingMessageXlh(XLHBean event) {
|
||||||
|
try {
|
||||||
|
// 清理之前的视图(如果存在)
|
||||||
|
if (currentXlhView != null && currentXlhView.getParent() != null) {
|
||||||
|
ViewGroup parent = (ViewGroup) currentXlhView.getParent();
|
||||||
|
parent.removeView(currentXlhView);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (decorView1 == null) {
|
||||||
|
decorView1 = (ViewGroup) getWindow().getDecorView();
|
||||||
|
}
|
||||||
|
|
||||||
|
currentXlhView = LayoutInflater.from(this).inflate(R.layout.item_piaoping_xlh, null);
|
||||||
|
FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(
|
||||||
|
FrameLayout.LayoutParams.MATCH_PARENT,
|
||||||
|
FrameLayout.LayoutParams.WRAP_CONTENT);
|
||||||
|
layoutParams.topMargin = com.sunfusheng.marqueeview.DisplayUtil.dip2px(this, 100);
|
||||||
|
layoutParams.gravity = Gravity.TOP | Gravity.CENTER_HORIZONTAL;
|
||||||
|
currentXlhView.setLayoutParams(layoutParams);
|
||||||
|
decorView1.addView(currentXlhView);
|
||||||
|
|
||||||
|
updateXlhFloatingViewData(currentXlhView, event);
|
||||||
|
resetAndStartXlhAnimation(currentXlhView, () -> {
|
||||||
|
// 清理当前视图
|
||||||
|
if (currentXlhView != null && currentXlhView.getParent() != null) {
|
||||||
|
ViewGroup parent = (ViewGroup) currentXlhView.getParent();
|
||||||
|
parent.removeView(currentXlhView);
|
||||||
|
}
|
||||||
|
currentXlhView = null;
|
||||||
|
|
||||||
|
// 处理队列中的下一条消息
|
||||||
|
synchronized (xlhQueueLock) {
|
||||||
|
isXlhPlaying = false;
|
||||||
|
processNextXlhMessage();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} catch (Exception e) {
|
||||||
|
LogUtils.e("显示XLH飘屏失败", e);
|
||||||
|
// 出现异常时继续处理队列
|
||||||
|
synchronized (xlhQueueLock) {
|
||||||
|
isXlhPlaying = false;
|
||||||
|
processNextXlhMessage();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void resetAndStartMqttAnimation(View view, Runnable onAnimationEnd) {
|
||||||
|
try {
|
||||||
|
view.setTranslationX(view.getWidth());
|
||||||
|
ObjectAnimator animator1 = ObjectAnimator.ofFloat(view, "translationX", view.getWidth(), 0f);
|
||||||
|
animator1.setDuration(1500);
|
||||||
|
animator1.setInterpolator(new DecelerateInterpolator(2.0f));
|
||||||
|
animator1.start();
|
||||||
|
|
||||||
|
view.postDelayed(() -> {
|
||||||
|
try {
|
||||||
|
ObjectAnimator animator2 = ObjectAnimator.ofFloat(view, "translationX", 0f, -view.getWidth());
|
||||||
|
animator2.setDuration(1500);
|
||||||
|
animator2.setInterpolator(new DecelerateInterpolator(2.0f));
|
||||||
animator2.addListener(new AnimatorListenerAdapter() {
|
animator2.addListener(new AnimatorListenerAdapter() {
|
||||||
@Override
|
@Override
|
||||||
public void onAnimationEnd(Animator animation) {
|
public void onAnimationEnd(Animator animation) {
|
||||||
// 动画结束后移除悬浮窗
|
onAnimationEnd.run();
|
||||||
decorView.removeView(floatingView);
|
}
|
||||||
|
|
||||||
// 标记播放结束并处理下一个消息
|
@Override
|
||||||
synchronized (queueLock) {
|
public void onAnimationCancel(Animator animation) {
|
||||||
isPlaying = false;
|
onAnimationEnd.run();
|
||||||
}
|
|
||||||
processNextMessage();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
animator2.start();
|
animator2.start();
|
||||||
}, 3000); // 停留1秒
|
} catch (Exception e) {
|
||||||
}
|
LogUtils.e("MQTT动画执行失败", e);
|
||||||
});
|
onAnimationEnd.run();
|
||||||
|
}
|
||||||
|
}, 3000);
|
||||||
|
} catch (Exception e) {
|
||||||
|
LogUtils.e("MQTT动画启动失败", e);
|
||||||
|
onAnimationEnd.run();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void resetAndStartAnimation(View floatingView) {
|
private void resetAndStartXlhAnimation(View view, Runnable onAnimationEnd) {
|
||||||
// 重置视图位置并开始动画
|
try {
|
||||||
floatingView.setTranslationX(floatingView.getWidth());
|
view.setTranslationX(view.getWidth());
|
||||||
|
ObjectAnimator animator1 = ObjectAnimator.ofFloat(view, "translationX", view.getWidth(), 0f);
|
||||||
|
animator1.setDuration(1500);
|
||||||
|
animator1.setInterpolator(new DecelerateInterpolator(2.0f));
|
||||||
|
animator1.start();
|
||||||
|
|
||||||
// 第一阶段:从右到屏幕右侧边缘(缓慢进入)
|
view.postDelayed(() -> {
|
||||||
ObjectAnimator animator1 = ObjectAnimator.ofFloat(floatingView, "translationX",
|
try {
|
||||||
floatingView.getWidth(), 0f);
|
ObjectAnimator animator2 = ObjectAnimator.ofFloat(view, "translationX", 0f, -view.getWidth());
|
||||||
animator1.setDuration(1500);
|
animator2.setDuration(1500);
|
||||||
animator1.setInterpolator(new DecelerateInterpolator(2.0f));
|
animator2.setInterpolator(new DecelerateInterpolator(2.0f));
|
||||||
animator1.start();
|
animator2.addListener(new AnimatorListenerAdapter() {
|
||||||
|
@Override
|
||||||
|
public void onAnimationEnd(Animator animation) {
|
||||||
|
onAnimationEnd.run();
|
||||||
|
}
|
||||||
|
|
||||||
// 第二阶段:延迟1秒后从当前位置向左滑出
|
@Override
|
||||||
floatingView.postDelayed(() -> {
|
public void onAnimationCancel(Animator animation) {
|
||||||
ObjectAnimator animator2 = ObjectAnimator.ofFloat(floatingView, "translationX",
|
onAnimationEnd.run();
|
||||||
0f, -floatingView.getWidth());
|
}
|
||||||
animator2.setDuration(1500);
|
});
|
||||||
animator2.setInterpolator(new DecelerateInterpolator(2.0f));
|
animator2.start();
|
||||||
animator2.start();
|
} catch (Exception e) {
|
||||||
}, 3000);
|
LogUtils.e("XLH动画执行失败", e);
|
||||||
|
onAnimationEnd.run();
|
||||||
|
}
|
||||||
|
}, 3000);
|
||||||
|
} catch (Exception e) {
|
||||||
|
LogUtils.e("XLH动画启动失败", e);
|
||||||
|
onAnimationEnd.run();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateFloatingViewData(View floatingView, MqttBean mqttBean) {
|
private void updateFloatingViewData(View view, MqttBean mqttBean) {
|
||||||
TextView textView = floatingView.findViewById(R.id.tv_name);
|
TextView textView = view.findViewById(R.id.tv_name);
|
||||||
TextView textView2 = floatingView.findViewById(R.id.tv_to_name);
|
TextView textView2 = view.findViewById(R.id.tv_to_name);
|
||||||
TextView tv_time = floatingView.findViewById(R.id.tv_num);
|
TextView tv_time = view.findViewById(R.id.tv_num);
|
||||||
|
|
||||||
if (mqttBean.getList() != null) {
|
if (mqttBean.getList() != null) {
|
||||||
if (mqttBean.getList().getToUserName() != null) {
|
textView2.setText("送给" + (mqttBean.getList().getToUserName() != null ? mqttBean.getList().getToUserName() : ""));
|
||||||
textView2.setText("送给" + mqttBean.getList().getToUserName());
|
textView.setText(mqttBean.getList().getFromUserName() != null ? mqttBean.getList().getFromUserName() : "");
|
||||||
} else {
|
|
||||||
textView2.setText("送给");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (mqttBean.getList().getFromUserName() != null) {
|
|
||||||
textView.setText(mqttBean.getList().getFromUserName());
|
|
||||||
} else {
|
|
||||||
textView.setText("");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (mqttBean.getList().getGift_picture() != null) {
|
if (mqttBean.getList().getGift_picture() != null) {
|
||||||
ImageUtils.loadHeadCC(mqttBean.getList().getGift_picture(), floatingView.findViewById(R.id.iv_piaoping));
|
ImageUtils.loadHeadCC(mqttBean.getList().getGift_picture(), view.findViewById(R.id.iv_piaoping));
|
||||||
}
|
|
||||||
|
|
||||||
if (mqttBean.getList().getNumber() != null) {
|
|
||||||
tv_time.setText("x" + mqttBean.getList().getNumber());
|
|
||||||
} else {
|
|
||||||
tv_time.setText("x1");
|
|
||||||
}
|
}
|
||||||
|
tv_time.setText("x" + (mqttBean.getList().getNumber() != null ? mqttBean.getList().getNumber() : "1"));
|
||||||
} else {
|
} else {
|
||||||
textView2.setText("送给");
|
textView2.setText("送给");
|
||||||
textView.setText("");
|
textView.setText("");
|
||||||
@@ -528,207 +658,34 @@ public abstract class BaseAppCompatActivity<VDB extends ViewDataBinding> extends
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// private void showFloatingMessage(MqttBean mqttBean) {
|
private void updateXlhFloatingViewData(View view, XLHBean xlhBean) {
|
||||||
// ViewGroup decorView = (ViewGroup) this.getWindow().getDecorView();
|
TextView textView = view.findViewById(R.id.tv_name);
|
||||||
// View floatingView = LayoutInflater.from(this).inflate(R.layout.item_piaoping, null);
|
ImageView xlh_image = view.findViewById(R.id.im_xlh);
|
||||||
//
|
|
||||||
// // 设置布局参数,使整个布局显示在屏幕顶部并距离顶部100dp
|
|
||||||
// FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(
|
|
||||||
// FrameLayout.LayoutParams.MATCH_PARENT,
|
|
||||||
// FrameLayout.LayoutParams.WRAP_CONTENT
|
|
||||||
// );
|
|
||||||
// layoutParams.topMargin = com.sunfusheng.marqueeview.DisplayUtil.dip2px(this, 100); // 距离顶部100dp
|
|
||||||
// layoutParams.gravity = android.view.Gravity.TOP | android.view.Gravity.CENTER_HORIZONTAL; // 顶部居中
|
|
||||||
// floatingView.setLayoutParams(layoutParams);
|
|
||||||
//
|
|
||||||
// TextView textView = floatingView.findViewById(R.id.tv_name);
|
|
||||||
// TextView textView2 = floatingView.findViewById(R.id.tv_to_name);
|
|
||||||
// TextView tv_time = floatingView.findViewById(R.id.tv_num);
|
|
||||||
//
|
|
||||||
// // 添加对 getList() 返回值的空值检查
|
|
||||||
// if (mqttBean.getList() != null) {
|
|
||||||
// // 检查各个字段是否为 null
|
|
||||||
// if (mqttBean.getList().getToUserName() != null) {
|
|
||||||
// textView2.setText("送给" + mqttBean.getList().getToUserName());
|
|
||||||
// } else {
|
|
||||||
// textView2.setText("送给");
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// if (mqttBean.getList().getFromUserName() != null) {
|
|
||||||
// textView.setText(mqttBean.getList().getFromUserName());
|
|
||||||
// } else {
|
|
||||||
// textView.setText("");
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// // 检查礼物图片
|
|
||||||
// if (mqttBean.getList().getGift_picture() != null) {
|
|
||||||
// ImageUtils.loadHeadCC(mqttBean.getList().getGift_picture(), floatingView.findViewById(R.id.iv_piaoping));
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// // 检查数量
|
|
||||||
// if (mqttBean.getList().getNumber() != null) {
|
|
||||||
// tv_time.setText("x" + mqttBean.getList().getNumber());
|
|
||||||
// } else {
|
|
||||||
// tv_time.setText("x1");
|
|
||||||
// }
|
|
||||||
// } else {
|
|
||||||
// // 如果 getList() 返回 null,设置默认值
|
|
||||||
// textView2.setText("送给");
|
|
||||||
// textView.setText("");
|
|
||||||
// tv_time.setText("x1");
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// floatingView.setTranslationX(10000); // 先放到屏幕外
|
|
||||||
//
|
|
||||||
// floatingView.post(() -> {
|
|
||||||
// // 确保初始位置在屏幕右侧外部
|
|
||||||
// floatingView.setTranslationX(floatingView.getWidth());
|
|
||||||
//
|
|
||||||
// // 第一阶段:从右到屏幕右侧边缘(缓慢进入)
|
|
||||||
// ObjectAnimator animator1 = ObjectAnimator.ofFloat(floatingView, "translationX",
|
|
||||||
// floatingView.getWidth(), 0f);
|
|
||||||
// animator1.setDuration(1500); // 延长动画时间到1.5秒
|
|
||||||
// animator1.setInterpolator(new DecelerateInterpolator(2.0f)); // 更平缓的减速效果
|
|
||||||
// animator1.start();
|
|
||||||
//
|
|
||||||
// // 第二阶段:延迟1秒后从当前位置向左滑出
|
|
||||||
// floatingView.postDelayed(() -> {
|
|
||||||
// ObjectAnimator animator2 = ObjectAnimator.ofFloat(floatingView, "translationX",
|
|
||||||
// 0f, -floatingView.getWidth());
|
|
||||||
// animator2.setDuration(1500); // 延长动画时间到1.5秒
|
|
||||||
// animator2.setInterpolator(new DecelerateInterpolator(2.0f)); // 更平缓的减速效果
|
|
||||||
// animator2.addListener(new AnimatorListenerAdapter() {
|
|
||||||
// @Override
|
|
||||||
// public void onAnimationEnd(Animator animation) {
|
|
||||||
// // 动画结束后移除悬浮窗
|
|
||||||
// decorView.removeView(floatingView);
|
|
||||||
//
|
|
||||||
// // 标记播放结束并处理下一个消息
|
|
||||||
// synchronized (queueLock) {
|
|
||||||
// isPlaying = false;
|
|
||||||
// }
|
|
||||||
// processNextMessage();
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
// animator2.start();
|
|
||||||
// }, 3000); // 停留1秒
|
|
||||||
// });
|
|
||||||
// decorView.addView(floatingView);
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
// 在类中添加新的成员变量
|
|
||||||
|
|
||||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
|
||||||
public void onEvent(XLHBean event) {
|
|
||||||
showPiaoPingMessageXlh(event);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void showPiaoPingMessageXlh(XLHBean event) {
|
|
||||||
// 创建 FloatingX 配置
|
|
||||||
ViewGroup decorView = (ViewGroup) this.getWindow().getDecorView();
|
|
||||||
|
|
||||||
// 如果XLH浮动视图未创建,则创建一次
|
|
||||||
View xlhFloatingView = LayoutInflater.from(this).inflate(R.layout.item_piaoping_xlh, null);
|
|
||||||
|
|
||||||
// 设置布局参数
|
|
||||||
FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(
|
|
||||||
FrameLayout.LayoutParams.MATCH_PARENT,
|
|
||||||
FrameLayout.LayoutParams.WRAP_CONTENT
|
|
||||||
);
|
|
||||||
layoutParams.topMargin = com.sunfusheng.marqueeview.DisplayUtil.dip2px(this, 100);
|
|
||||||
layoutParams.gravity = android.view.Gravity.TOP | android.view.Gravity.CENTER_HORIZONTAL;
|
|
||||||
xlhFloatingView.setLayoutParams(layoutParams);
|
|
||||||
|
|
||||||
// 初始化动画监听器
|
|
||||||
setupXlhAnimationListener(xlhFloatingView, decorView);
|
|
||||||
updateXlhFloatingViewData(xlhFloatingView, event);
|
|
||||||
|
|
||||||
// 如果浮动视图未添加到 decorView,则添加
|
|
||||||
decorView.addView(xlhFloatingView);
|
|
||||||
|
|
||||||
// 重置视图位置并开始动画
|
|
||||||
resetAndStartXlhAnimation(xlhFloatingView);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void setupXlhAnimationListener(View floatingView, ViewGroup decorView) {
|
|
||||||
// 为视图添加一个全局布局监听器,确保在视图完全加载后再设置动画
|
|
||||||
floatingView.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
|
|
||||||
@Override
|
|
||||||
public void onGlobalLayout() {
|
|
||||||
// 移除监听器,避免重复调用
|
|
||||||
floatingView.getViewTreeObserver().removeOnGlobalLayoutListener(this);
|
|
||||||
|
|
||||||
// 确保初始位置在屏幕右侧外部
|
|
||||||
floatingView.setTranslationX(floatingView.getWidth());
|
|
||||||
|
|
||||||
// 第一阶段:从右到屏幕右侧边缘(缓慢进入)
|
|
||||||
ObjectAnimator animator1 = ObjectAnimator.ofFloat(floatingView, "translationX",
|
|
||||||
floatingView.getWidth(), 0f);
|
|
||||||
animator1.setDuration(1500); // 延长动画时间到1.5秒
|
|
||||||
animator1.setInterpolator(new DecelerateInterpolator(2.0f)); // 更平缓的减速效果
|
|
||||||
animator1.start();
|
|
||||||
|
|
||||||
// 第二阶段:延迟1秒后从当前位置向左滑出
|
|
||||||
floatingView.postDelayed(() -> {
|
|
||||||
ObjectAnimator animator2 = ObjectAnimator.ofFloat(floatingView, "translationX",
|
|
||||||
0f, -floatingView.getWidth());
|
|
||||||
animator2.setDuration(1500); // 延长动画时间到1.5秒
|
|
||||||
animator2.setInterpolator(new DecelerateInterpolator(2.0f)); // 更平缓的减速效果
|
|
||||||
animator2.addListener(new AnimatorListenerAdapter() {
|
|
||||||
@Override
|
|
||||||
public void onAnimationEnd(Animator animation) {
|
|
||||||
// 动画结束后移除悬浮窗
|
|
||||||
decorView.removeView(floatingView);
|
|
||||||
|
|
||||||
// 标记播放结束并处理下一个消息
|
|
||||||
synchronized (queueLock) {
|
|
||||||
isPlaying = false;
|
|
||||||
}
|
|
||||||
processNextMessage();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
animator2.start();
|
|
||||||
}, 3000); // 停留1秒
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
private void resetAndStartXlhAnimation(View floatingView) {
|
|
||||||
// 重置视图位置并开始动画
|
|
||||||
floatingView.setTranslationX(floatingView.getWidth());
|
|
||||||
|
|
||||||
// 第一阶段:从右到屏幕右侧边缘(缓慢进入)
|
|
||||||
ObjectAnimator animator1 = ObjectAnimator.ofFloat(floatingView, "translationX",
|
|
||||||
floatingView.getWidth(), 0f);
|
|
||||||
animator1.setDuration(1500);
|
|
||||||
animator1.setInterpolator(new DecelerateInterpolator(2.0f));
|
|
||||||
animator1.start();
|
|
||||||
|
|
||||||
// 第二阶段:延迟1秒后从当前位置向左滑出
|
|
||||||
floatingView.postDelayed(() -> {
|
|
||||||
ObjectAnimator animator2 = ObjectAnimator.ofFloat(floatingView, "translationX",
|
|
||||||
0f, -floatingView.getWidth());
|
|
||||||
animator2.setDuration(1500);
|
|
||||||
animator2.setInterpolator(new DecelerateInterpolator(2.0f));
|
|
||||||
animator2.start();
|
|
||||||
}, 3000);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void updateXlhFloatingViewData(View xlhFloatingView, XLHBean xlhBean) {
|
|
||||||
TextView textView = xlhFloatingView.findViewById(R.id.tv_name);
|
|
||||||
ImageView xlh_image = xlhFloatingView.findViewById(R.id.im_xlh);
|
|
||||||
|
|
||||||
if (xlhBean != null) {
|
if (xlhBean != null) {
|
||||||
xlh_image.setImageDrawable(xlhBean.getFrom_type() == 1 ? getResources().getDrawable(R.mipmap.xlh_jjks) : getResources().getDrawable(R.mipmap.xlh_zsks));
|
xlh_image.setImageDrawable(xlhBean.getFrom_type() == 1 ?
|
||||||
|
getResources().getDrawable(R.mipmap.xlh_jjks) :
|
||||||
|
getResources().getDrawable(R.mipmap.xlh_zsks));
|
||||||
textView.setText(xlhBean.getText());
|
textView.setText(xlhBean.getText());
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
textView.setText("");
|
textView.setText("");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
view.setOnClickListener(v -> {
|
||||||
|
// 点击时执行跳转操作
|
||||||
|
handleItemClick(xlhBean);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void handleItemClick(XLHBean xlhBean) {
|
||||||
|
// 这里可以根据实际需求实现跳转逻辑
|
||||||
|
// 例如:跳转到礼物详情页面、用户主页等
|
||||||
|
|
||||||
|
ARouter.getInstance().build(ARouteConstants.ROOM_DETAILS).withString("from", "我的界面").withString("roomId", xlhBean.getRoom_id()).navigation();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||||
public void onEvent(ChatInfo event) {
|
public void onEvent(ChatInfo event) {
|
||||||
String id = event.getId().replace("g", "");
|
String id = event.getId().replace("g", "");
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ public class GiftTwoDetailsFragment extends BaseMvpFragment<RewardGiftPresenter,
|
|||||||
private List<RoonGiftModel> giftList = new ArrayList<>();
|
private List<RoonGiftModel> giftList = new ArrayList<>();
|
||||||
private List<GiftPackBean> giftPackList = new ArrayList<>();
|
private List<GiftPackBean> giftPackList = new ArrayList<>();
|
||||||
private String roomId;
|
private String roomId;
|
||||||
|
private String bdgiftId;
|
||||||
|
|
||||||
public static GiftTwoDetailsFragment newInstance(String id, int type, String roomId) {
|
public static GiftTwoDetailsFragment newInstance(String id, int type, String roomId) {
|
||||||
|
|
||||||
@@ -92,6 +93,12 @@ public class GiftTwoDetailsFragment extends BaseMvpFragment<RewardGiftPresenter,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||||
|
public void onString(String giftId){
|
||||||
|
bdgiftId=giftId;
|
||||||
|
MvpPre.giftPack();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void initData() {
|
protected void initData() {
|
||||||
if (id.equals("0")) {
|
if (id.equals("0")) {
|
||||||
@@ -176,6 +183,15 @@ public class GiftTwoDetailsFragment extends BaseMvpFragment<RewardGiftPresenter,
|
|||||||
@Override
|
@Override
|
||||||
public void giftPack(List<GiftPackBean> giftPackBean) {
|
public void giftPack(List<GiftPackBean> giftPackBean) {
|
||||||
giftPackList = new ArrayList<>();
|
giftPackList = new ArrayList<>();
|
||||||
|
if (bdgiftId!=null){
|
||||||
|
for (GiftPackBean item : giftPackBean){
|
||||||
|
if (item.getGift_id().equals(bdgiftId)){
|
||||||
|
item.setChecked(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
giftPackList.addAll(giftPackBean);
|
giftPackList.addAll(giftPackBean);
|
||||||
pageCount = (int) Math.ceil(giftPackBean.size() * 1.0 / pageSize);
|
pageCount = (int) Math.ceil(giftPackBean.size() * 1.0 / pageSize);
|
||||||
for (int j = 0; j < pageCount; j++) {
|
for (int j = 0; j < pageCount; j++) {
|
||||||
@@ -186,6 +202,11 @@ public class GiftTwoDetailsFragment extends BaseMvpFragment<RewardGiftPresenter,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void getGiftPack(String s) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void getRewardList(List<RewardUserBean> rewardUserBeanList) {
|
public void getRewardList(List<RewardUserBean> rewardUserBeanList) {
|
||||||
|
|
||||||
|
|||||||
@@ -4,27 +4,23 @@ import android.app.Dialog;
|
|||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.content.res.AssetFileDescriptor;
|
import android.content.res.AssetFileDescriptor;
|
||||||
|
import android.graphics.drawable.Drawable;
|
||||||
import android.media.MediaPlayer;
|
import android.media.MediaPlayer;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.os.Looper;
|
import android.os.Looper;
|
||||||
import android.text.TextUtils;
|
|
||||||
import android.view.Gravity;
|
import android.view.Gravity;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.view.Window;
|
import android.view.Window;
|
||||||
import android.widget.GridView;
|
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
import androidx.core.content.ContextCompat;
|
||||||
import androidx.fragment.app.FragmentManager;
|
import androidx.fragment.app.FragmentManager;
|
||||||
import androidx.recyclerview.widget.GridLayoutManager;
|
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
|
||||||
|
|
||||||
import com.alibaba.android.arouter.launcher.ARouter;
|
import com.alibaba.android.arouter.launcher.ARouter;
|
||||||
import com.blankj.utilcode.util.ToastUtils;
|
|
||||||
import com.xscm.moduleutil.R;
|
import com.xscm.moduleutil.R;
|
||||||
import com.xscm.moduleutil.activity.IPresenter;
|
|
||||||
import com.xscm.moduleutil.base.BaseMvpDialogFragment;
|
import com.xscm.moduleutil.base.BaseMvpDialogFragment;
|
||||||
import com.xscm.moduleutil.bean.GiftBean;
|
import com.xscm.moduleutil.bean.GiftBean;
|
||||||
import com.xscm.moduleutil.bean.RoomMessageEvent;
|
import com.xscm.moduleutil.bean.RoomMessageEvent;
|
||||||
@@ -35,7 +31,6 @@ import com.xscm.moduleutil.bean.blindboxwheel.XlhDrawBean;
|
|||||||
import com.xscm.moduleutil.databinding.DialogGiftLotteryBinding;
|
import com.xscm.moduleutil.databinding.DialogGiftLotteryBinding;
|
||||||
import com.xscm.moduleutil.dialog.WebViewDialog;
|
import com.xscm.moduleutil.dialog.WebViewDialog;
|
||||||
import com.xscm.moduleutil.event.LotteryEvent;
|
import com.xscm.moduleutil.event.LotteryEvent;
|
||||||
import com.xscm.moduleutil.http.RetrofitClient;
|
|
||||||
import com.xscm.moduleutil.utils.ARouteConstants;
|
import com.xscm.moduleutil.utils.ARouteConstants;
|
||||||
import com.xscm.moduleutil.widget.CircularProgressView;
|
import com.xscm.moduleutil.widget.CircularProgressView;
|
||||||
import com.xscm.moduleutil.widget.GiftCardView;
|
import com.xscm.moduleutil.widget.GiftCardView;
|
||||||
@@ -94,6 +89,7 @@ public class GiftLotteryDialog extends BaseMvpDialogFragment<GiftLotteryPresente
|
|||||||
private GiftLotteryDialogFragment giftLotteryDialogFragment;
|
private GiftLotteryDialogFragment giftLotteryDialogFragment;
|
||||||
private String blind_box_turntable_id = "";//本次抽奖标识id
|
private String blind_box_turntable_id = "";//本次抽奖标识id
|
||||||
private BlindBoxBean.XlhData xlhData;
|
private BlindBoxBean.XlhData xlhData;
|
||||||
|
private int icon;//金币金额
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected GiftLotteryPresenter bindPresenter() {
|
protected GiftLotteryPresenter bindPresenter() {
|
||||||
@@ -310,8 +306,8 @@ public class GiftLotteryDialog extends BaseMvpDialogFragment<GiftLotteryPresente
|
|||||||
int id = view.getId();
|
int id = view.getId();
|
||||||
if (id == R.id.ll_one) {
|
if (id == R.id.ll_one) {
|
||||||
if (!isDrawing) {
|
if (!isDrawing) {
|
||||||
isDrawing=true;
|
isDrawing = true;
|
||||||
init(1);
|
// init(1);
|
||||||
startType = 1;
|
startType = 1;
|
||||||
MvpPre.drawGiftList(giftBagId, userIds, roomId, "1");
|
MvpPre.drawGiftList(giftBagId, userIds, roomId, "1");
|
||||||
} else {
|
} else {
|
||||||
@@ -320,8 +316,8 @@ public class GiftLotteryDialog extends BaseMvpDialogFragment<GiftLotteryPresente
|
|||||||
}
|
}
|
||||||
} else if (id == R.id.ll_ten) {
|
} else if (id == R.id.ll_ten) {
|
||||||
if (!isDrawing) {
|
if (!isDrawing) {
|
||||||
isDrawing=true;
|
isDrawing = true;
|
||||||
init(2);
|
// init(2);
|
||||||
startType = 2;
|
startType = 2;
|
||||||
MvpPre.drawGiftList(giftBagId, userIds, roomId, "10");
|
MvpPre.drawGiftList(giftBagId, userIds, roomId, "10");
|
||||||
|
|
||||||
@@ -330,8 +326,8 @@ public class GiftLotteryDialog extends BaseMvpDialogFragment<GiftLotteryPresente
|
|||||||
}
|
}
|
||||||
} else if (id == R.id.ll_hundred) {//抽奖100次
|
} else if (id == R.id.ll_hundred) {//抽奖100次
|
||||||
if (!isDrawing) {
|
if (!isDrawing) {
|
||||||
isDrawing=true;
|
isDrawing = true;
|
||||||
init(3);
|
// init(3);
|
||||||
startType = 3;
|
startType = 3;
|
||||||
MvpPre.drawGiftList(giftBagId, userIds, roomId, "100");
|
MvpPre.drawGiftList(giftBagId, userIds, roomId, "100");
|
||||||
} else {
|
} else {
|
||||||
@@ -366,23 +362,94 @@ public class GiftLotteryDialog extends BaseMvpDialogFragment<GiftLotteryPresente
|
|||||||
|
|
||||||
giftLotteryDialogFragment = GiftLotteryDialogFragment.newInstance(giftBagId);
|
giftLotteryDialogFragment = GiftLotteryDialogFragment.newInstance(giftBagId);
|
||||||
giftLotteryDialogFragment.show(getChildFragmentManager(), "GiftLotteryDialogFragment");
|
giftLotteryDialogFragment.show(getChildFragmentManager(), "GiftLotteryDialogFragment");
|
||||||
}else if (id == R.id.tv_start){
|
} else if (id == R.id.tv_start) {
|
||||||
if (xlhData!=null){
|
if (xlhData != null) {
|
||||||
if (xlhData.getStatus()==1){
|
if (xlhData.getStatus() == 1) {
|
||||||
FragmentManager fm = getParentFragmentManager();
|
FragmentManager fm = getParentFragmentManager();
|
||||||
if (fm != null && !fm.isDestroyed()) {
|
if (fm != null && !fm.isDestroyed()) {
|
||||||
TourClubDialogFragment newDialog = TourClubDialogFragment.newInstance(
|
TourClubDialogFragment newDialog = TourClubDialogFragment.newInstance(
|
||||||
roomId);
|
roomId);
|
||||||
newDialog.show(fm, "TourClubDialogFragment");
|
newDialog.show(fm, "TourClubDialogFragment");
|
||||||
}
|
}
|
||||||
this.dismissAllowingStateLoss();
|
this.dismissAllowingStateLoss();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else if (id == R.id.exchange_layout){
|
} else if (id == R.id.exchange_layout) {
|
||||||
ARouter.getInstance().build(ARouteConstants.CURRENCY).navigation();
|
ARouter.getInstance().build(ARouteConstants.CURRENCY).navigation();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void setBackground() {
|
||||||
|
// 预加载资源
|
||||||
|
Drawable drawableX = ContextCompat.getDrawable(getContext(), R.mipmap.chou_x);
|
||||||
|
Drawable drawableW = ContextCompat.getDrawable(getContext(), R.mipmap.chou_w);
|
||||||
|
|
||||||
|
if (icon > 0 && box_price > 0) {
|
||||||
|
if (type == 10) {
|
||||||
|
updateBackground(mBinding.mirroeSky.llOne, icon > box_price, drawableX, drawableW);
|
||||||
|
updateBackground(mBinding.mirroeSky.llTen, icon > box_price * 10, drawableX, drawableW);
|
||||||
|
updateBackground(mBinding.mirroeSky.llHundred, icon > box_price * 100, drawableX, drawableW);
|
||||||
|
} else if (type == 11) {
|
||||||
|
updateBackground(mBinding.cityTime.llOne, icon > box_price, drawableX, drawableW);
|
||||||
|
updateBackground(mBinding.cityTime.llTen, icon > box_price * 10, drawableX, drawableW);
|
||||||
|
updateBackground(mBinding.cityTime.llHundred, icon > box_price * 100, drawableX, drawableW);
|
||||||
|
} else if (type == 12) {
|
||||||
|
updateBackground(mBinding.pinnacleTime.llOne, icon > box_price, drawableX, drawableW);
|
||||||
|
updateBackground(mBinding.pinnacleTime.llTen, icon > box_price * 10, drawableX, drawableW);
|
||||||
|
updateBackground(mBinding.pinnacleTime.llHundred, icon > box_price * 100, drawableX, drawableW);
|
||||||
|
} else {
|
||||||
|
// 兜底处理:未知 type 时全部设为不可点击 + 默认背景
|
||||||
|
setAllBackgroundToDefault(drawableW);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// icon 或 box_price <= 0 时全部置灰不可点击
|
||||||
|
setAllBackgroundToDefault(drawableW);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void updateBackground(View view, boolean clickable, Drawable drawableX, Drawable drawableW) {
|
||||||
|
if (clickable) {
|
||||||
|
view.setBackground(drawableX);
|
||||||
|
view.setClickable(true);
|
||||||
|
} else {
|
||||||
|
view.setBackground(drawableW);
|
||||||
|
view.setClickable(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setAllBackgroundToDefault(Drawable defaultDrawable) {
|
||||||
|
switch (type) {
|
||||||
|
case 10:
|
||||||
|
mBinding.mirroeSky.llOne.setBackground(defaultDrawable);
|
||||||
|
mBinding.mirroeSky.llTen.setBackground(defaultDrawable);
|
||||||
|
mBinding.mirroeSky.llHundred.setBackground(defaultDrawable);
|
||||||
|
mBinding.mirroeSky.llOne.setClickable(false);
|
||||||
|
mBinding.mirroeSky.llTen.setClickable(false);
|
||||||
|
mBinding.mirroeSky.llHundred.setClickable(false);
|
||||||
|
break;
|
||||||
|
case 11:
|
||||||
|
mBinding.cityTime.llOne.setBackground(defaultDrawable);
|
||||||
|
mBinding.cityTime.llTen.setBackground(defaultDrawable);
|
||||||
|
mBinding.cityTime.llHundred.setBackground(defaultDrawable);
|
||||||
|
mBinding.cityTime.llOne.setClickable(false);
|
||||||
|
mBinding.cityTime.llTen.setClickable(false);
|
||||||
|
mBinding.cityTime.llHundred.setClickable(false);
|
||||||
|
break;
|
||||||
|
case 12:
|
||||||
|
mBinding.pinnacleTime.llOne.setBackground(defaultDrawable);
|
||||||
|
mBinding.pinnacleTime.llTen.setBackground(defaultDrawable);
|
||||||
|
mBinding.pinnacleTime.llHundred.setBackground(defaultDrawable);
|
||||||
|
mBinding.pinnacleTime.llOne.setClickable(false);
|
||||||
|
mBinding.pinnacleTime.llTen.setClickable(false);
|
||||||
|
mBinding.pinnacleTime.llHundred.setClickable(false);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
// 忽略未知类型
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private void init(int type) {
|
private void init(int type) {
|
||||||
if (type == 1) {
|
if (type == 1) {
|
||||||
mBinding.mirroeSky.llOne.setBackground(getResources().getDrawable(R.mipmap.chou_x));
|
mBinding.mirroeSky.llOne.setBackground(getResources().getDrawable(R.mipmap.chou_x));
|
||||||
@@ -515,7 +582,7 @@ public class GiftLotteryDialog extends BaseMvpDialogFragment<GiftLotteryPresente
|
|||||||
finishTargetArrayIndex.add(index);
|
finishTargetArrayIndex.add(index);
|
||||||
foundTarget = true;
|
foundTarget = true;
|
||||||
if (!isOpenSpecial || !isOpenSound) {
|
if (!isOpenSpecial || !isOpenSound) {
|
||||||
playSound("draw.mp3");
|
playSound("xuanz.mp3");
|
||||||
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -605,11 +672,12 @@ public class GiftLotteryDialog extends BaseMvpDialogFragment<GiftLotteryPresente
|
|||||||
}
|
}
|
||||||
|
|
||||||
private String getRule_url;
|
private String getRule_url;
|
||||||
|
private int box_price;//服务器返回的单次抽奖价格
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void getGiftListSuccess(BlindBoxBean blindBoxBean) {
|
public void getGiftListSuccess(BlindBoxBean blindBoxBean) {
|
||||||
if (blindBoxBean != null && blindBoxBean.getGift_list() != null) {
|
if (blindBoxBean != null && blindBoxBean.getGift_list() != null) {
|
||||||
|
box_price = blindBoxBean.getBox_price();
|
||||||
upTitle(blindBoxBean.getBox_price());
|
upTitle(blindBoxBean.getBox_price());
|
||||||
giftLists = blindBoxBean.getGift_list();
|
giftLists = blindBoxBean.getGift_list();
|
||||||
getRule_url = blindBoxBean.getRule_url();
|
getRule_url = blindBoxBean.getRule_url();
|
||||||
@@ -647,23 +715,24 @@ public class GiftLotteryDialog extends BaseMvpDialogFragment<GiftLotteryPresente
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
setBackground();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void upTitle(int boxPrice){
|
private void upTitle(int boxPrice) {
|
||||||
if (type==10){
|
if (type == 10) {
|
||||||
mBinding.mirroeSky.oneTitle.setText(boxPrice+"币一次");
|
mBinding.mirroeSky.oneTitle.setText(boxPrice + "币一次");
|
||||||
mBinding.mirroeSky.tenTitle.setText((boxPrice*10)+"币十次");
|
mBinding.mirroeSky.tenTitle.setText((boxPrice * 10) + "币十次");
|
||||||
mBinding.mirroeSky.hundredTitle.setText((boxPrice*100)+"币十次");
|
mBinding.mirroeSky.hundredTitle.setText((boxPrice * 100) + "币百次");
|
||||||
}else if (type==11){
|
} else if (type == 11) {
|
||||||
mBinding.cityTime.oneTitle.setText(boxPrice+"币一次");
|
mBinding.cityTime.oneTitle.setText(boxPrice + "币一次");
|
||||||
mBinding.cityTime.tenTitle.setText((boxPrice*10)+"币十次");
|
mBinding.cityTime.tenTitle.setText((boxPrice * 10) + "币十次");
|
||||||
mBinding.cityTime.hundredTitle.setText((boxPrice*100)+"币十次");
|
mBinding.cityTime.hundredTitle.setText((boxPrice * 100) + "币百次");
|
||||||
|
|
||||||
}else if (type==12){
|
} else if (type == 12) {
|
||||||
mBinding.pinnacleTime.oneTitle.setText(boxPrice+"币一次");
|
mBinding.pinnacleTime.oneTitle.setText(boxPrice + "币一次");
|
||||||
mBinding.pinnacleTime.tenTitle.setText((boxPrice*10)+"币十次");
|
mBinding.pinnacleTime.tenTitle.setText((boxPrice * 10) + "币十次");
|
||||||
mBinding.pinnacleTime.hundredTitle.setText((boxPrice*100)+"币十次");
|
mBinding.pinnacleTime.hundredTitle.setText((boxPrice * 100) + "币百次");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -713,11 +782,17 @@ public class GiftLotteryDialog extends BaseMvpDialogFragment<GiftLotteryPresente
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawGiftListSuccess(BlindReslutBean blindReslutBean) {
|
public void drawGiftListSuccess(BlindReslutBean blindReslutBean) {
|
||||||
if (blindReslutBean != null && blindReslutBean.getReslut_list() != null &&
|
if (blindReslutBean != null && blindReslutBean.getReslut_list() != null &&
|
||||||
!blindReslutBean.getReslut_list().isEmpty()) {
|
!blindReslutBean.getReslut_list().isEmpty()) {
|
||||||
|
|
||||||
|
for (GiftCardView gridView : allViewsArray) {
|
||||||
|
gridView.setSelected(false);
|
||||||
|
gridView.stopPulseAnimationWithLayer();
|
||||||
|
gridView.setVisibilitymResultTextView(false);
|
||||||
|
}
|
||||||
// 清空之前的数据
|
// 清空之前的数据
|
||||||
targetArrayIndex.clear();
|
targetArrayIndex.clear();
|
||||||
finishTargetArrayIndex.clear();
|
finishTargetArrayIndex.clear();
|
||||||
@@ -739,10 +814,10 @@ public class GiftLotteryDialog extends BaseMvpDialogFragment<GiftLotteryPresente
|
|||||||
if (!isOpenSpecial) {
|
if (!isOpenSpecial) {
|
||||||
giftCardView.setVisibilitymResultTextView(true);
|
giftCardView.setVisibilitymResultTextView(true);
|
||||||
giftCardView.setSelected(true);
|
giftCardView.setSelected(true);
|
||||||
playSound("draw.mp3");
|
playSound("xuanz.mp3");
|
||||||
// 不要设置isDrawing=true,这会影响动画控制
|
// 不要设置isDrawing=true,这会影响动画控制
|
||||||
MvpPre.wallet();
|
MvpPre.wallet();
|
||||||
isDrawing=false;
|
isDrawing = false;
|
||||||
MvpPre.giftSend(blind_box_turntable_id);
|
MvpPre.giftSend(blind_box_turntable_id);
|
||||||
}
|
}
|
||||||
giftCardView.bindGiftData(giftBean);
|
giftCardView.bindGiftData(giftBean);
|
||||||
@@ -775,6 +850,11 @@ public class GiftLotteryDialog extends BaseMvpDialogFragment<GiftLotteryPresente
|
|||||||
@Override
|
@Override
|
||||||
public void wallet(WalletBean walletBean) {
|
public void wallet(WalletBean walletBean) {
|
||||||
if (walletBean != null) {
|
if (walletBean != null) {
|
||||||
|
icon = (int) Double.parseDouble(
|
||||||
|
(walletBean.getCoin() != null && !walletBean.getCoin().isEmpty())
|
||||||
|
? walletBean.getCoin()
|
||||||
|
: "0"
|
||||||
|
);
|
||||||
if (type == 10) {
|
if (type == 10) {
|
||||||
mBinding.mirroeSky.tvIcon.setText(walletBean.getCoin());
|
mBinding.mirroeSky.tvIcon.setText(walletBean.getCoin());
|
||||||
} else if (type == 11) {
|
} else if (type == 11) {
|
||||||
@@ -783,6 +863,7 @@ public class GiftLotteryDialog extends BaseMvpDialogFragment<GiftLotteryPresente
|
|||||||
mBinding.pinnacleTime.tvIcon.setText(walletBean.getCoin());
|
mBinding.pinnacleTime.tvIcon.setText(walletBean.getCoin());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
setBackground();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -793,11 +874,11 @@ public class GiftLotteryDialog extends BaseMvpDialogFragment<GiftLotteryPresente
|
|||||||
|
|
||||||
// TODO: 2025/8/29 接收im推送过来的消息
|
// TODO: 2025/8/29 接收im推送过来的消息
|
||||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||||
public void onMusicPlay(RoomMessageEvent message) {
|
public void onMusicPlay(RoomMessageEvent message) {
|
||||||
if (message.getMsgType() == 1056){
|
if (message.getMsgType() == 1056) {
|
||||||
UpView(message.getText().getXlh_data());
|
UpView(message.getText().getXlh_data());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDestroyView() {
|
public void onDestroyView() {
|
||||||
@@ -855,7 +936,7 @@ public class GiftLotteryDialog extends BaseMvpDialogFragment<GiftLotteryPresente
|
|||||||
player.release();
|
player.release();
|
||||||
player = null;
|
player = null;
|
||||||
}
|
}
|
||||||
if (!EventBus.getDefault().isRegistered( this)){
|
if (!EventBus.getDefault().isRegistered(this)) {
|
||||||
EventBus.getDefault().unregister(this);
|
EventBus.getDefault().unregister(this);
|
||||||
}
|
}
|
||||||
// 建议进行垃圾回收
|
// 建议进行垃圾回收
|
||||||
|
|||||||
@@ -763,4 +763,9 @@ public interface ApiServer {
|
|||||||
|
|
||||||
@GET(Constants.GET_XLH_MY_RECORD)
|
@GET(Constants.GET_XLH_MY_RECORD)
|
||||||
Call<BaseModel<List<GiftBean>>> xlhMyRecord(@Query("room_id") String room_id, @Query("page") String page, @Query("page_size") String page_size);
|
Call<BaseModel<List<GiftBean>>> xlhMyRecord(@Query("room_id") String room_id, @Query("page") String page, @Query("page_size") String page_size);
|
||||||
|
|
||||||
|
@FormUrlEncoded
|
||||||
|
@POST(Constants.POST_GIFT_ALL_CLEAR)
|
||||||
|
Call<BaseModel<String>> getGiftPack(@Field("room_id") String roomId,@Field("to_uid") String user_id);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -457,6 +457,27 @@ public class RetrofitClient {
|
|||||||
sApiServer.giftPack().compose(new DefaultTransformer<>()).subscribe(observer);
|
sApiServer.giftPack().compose(new DefaultTransformer<>()).subscribe(observer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void getGiftPack(String roomId, String userId,BaseObserver<String> observer){
|
||||||
|
sApiServer.getGiftPack(roomId,userId).enqueue(new Callback<BaseModel<String>>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
||||||
|
if (response.code() == 200){
|
||||||
|
BaseModel<String> baseModel = response.body();
|
||||||
|
if (baseModel.getCode() == 1){
|
||||||
|
observer.onNext(baseModel.getMsg());
|
||||||
|
}else {
|
||||||
|
observer.onNext(null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||||
|
t.printStackTrace();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
public void tasksLihen(BaseObserver<GiftBoxBean> observer) {
|
public void tasksLihen(BaseObserver<GiftBoxBean> observer) {
|
||||||
sApiServer.tasksLihen().enqueue(new Callback<ResponseBody>() {
|
sApiServer.tasksLihen().enqueue(new Callback<ResponseBody>() {
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -27,6 +27,8 @@ public class RewardGiftContacts {
|
|||||||
void reward_zone();
|
void reward_zone();
|
||||||
void roomAuctionJoin(RoomAuction.AuctionListBean auctionListBean);
|
void roomAuctionJoin(RoomAuction.AuctionListBean auctionListBean);
|
||||||
void giftPack(List<GiftPackBean> giftPackBean);
|
void giftPack(List<GiftPackBean> giftPackBean);
|
||||||
|
|
||||||
|
void getGiftPack(String s);
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface IIndexPre extends IPresenter {
|
public interface IIndexPre extends IPresenter {
|
||||||
@@ -48,5 +50,7 @@ public class RewardGiftContacts {
|
|||||||
|
|
||||||
void roomAuctionJoin(String auction_id,String user_id, String gift_id, String num,String type);
|
void roomAuctionJoin(String auction_id,String user_id, String gift_id, String num,String type);
|
||||||
void giftPack();
|
void giftPack();
|
||||||
|
|
||||||
|
void getGiftPack(String roomId,String userId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -208,4 +208,26 @@ public class RewardGiftPresenter extends BasePresenter<RewardGiftContacts.View>
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void getGiftPack(String roomId,String userId) {
|
||||||
|
api.getGiftPack(roomId,userId, new BaseObserver<String>() {
|
||||||
|
@Override
|
||||||
|
public void onSubscribe(Disposable d) {
|
||||||
|
addDisposable(d);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onNext(String s) {
|
||||||
|
if (MvpRef==null){
|
||||||
|
MvpRef = new WeakReference<>(mView);
|
||||||
|
}
|
||||||
|
if (s==null){
|
||||||
|
MvpRef.get().getGiftPack(null);
|
||||||
|
}else {
|
||||||
|
MvpRef.get().getGiftPack(s);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ public class MqttInitCallback implements MqttCallback {
|
|||||||
@Override
|
@Override
|
||||||
public void connectionLost(Throwable cause) {
|
public void connectionLost(Throwable cause) {
|
||||||
Log.d(Tag,"mqtt连接断开,执行重连");
|
Log.d(Tag,"mqtt连接断开,执行重连");
|
||||||
ToastUtils.show("mqtt连接断开,执行重连");
|
// ToastUtils.show("mqtt连接断开,执行重连");
|
||||||
mqttConnect = MqttConnect.getInstance(context, HOST, clientId);
|
mqttConnect = MqttConnect.getInstance(context, HOST, clientId);
|
||||||
mqttConnect.mqttClient();
|
mqttConnect.mqttClient();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1284,14 +1284,14 @@ public class AvatarFrameView extends FrameLayout implements IAnimListener {
|
|||||||
// 清空队列
|
// 清空队列
|
||||||
clearQueue();
|
clearQueue();
|
||||||
// 释放资源
|
// 释放资源
|
||||||
releaseResources();
|
// releaseResources();
|
||||||
//清空队列
|
// 清空队列
|
||||||
// playQueue.clear();
|
// playQueue.clear();
|
||||||
//关闭动画
|
// 关闭动画
|
||||||
// if (mBinding.image != null && isPlaying && mBinding.image.isAnimating()) {
|
// if (mBinding.playView != null && isPlaying && mBinding.playView.isRunning()) {
|
||||||
// mBinding.image.setAnimation(null);
|
// mBinding.playView.setAnimation(null);
|
||||||
// mBinding.image.clearAnimation();
|
// mBinding.playView.clearAnimation();
|
||||||
// mBinding.image.stopAnimation();
|
// mBinding.playView.stopPlay();
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -384,6 +384,7 @@ public class Constants {
|
|||||||
public static final String POST_DRAW_GIFT_LIST_XLH = "/api/BlindBoxTurntable/xlh_draw_gift";///巡乐会抽奖
|
public static final String POST_DRAW_GIFT_LIST_XLH = "/api/BlindBoxTurntable/xlh_draw_gift";///巡乐会抽奖
|
||||||
public static final String POST_XLH_ALL_RECORD = "/api/BlindBoxTurntable/get_xlh_all_record";///巡乐会榜单
|
public static final String POST_XLH_ALL_RECORD = "/api/BlindBoxTurntable/get_xlh_all_record";///巡乐会榜单
|
||||||
public static final String GET_XLH_MY_RECORD = "/api/BlindBoxTurntable/get_xlh_my_record";///巡乐会记录
|
public static final String GET_XLH_MY_RECORD = "/api/BlindBoxTurntable/get_xlh_my_record";///巡乐会记录
|
||||||
|
public static final String POST_GIFT_ALL_CLEAR = "/api/Room/room_gift_all_clear";///背包礼物全清
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -191,4 +191,9 @@ public class RewardDialogFragment extends BaseMvpDialogFragment<RewardGiftPresen
|
|||||||
public void giftPack(List<GiftPackBean> giftPackBean) {
|
public void giftPack(List<GiftPackBean> giftPackBean) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void getGiftPack(String s) {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -287,6 +287,11 @@ public class RewardGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPr
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void getGiftPack(String s) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
private static class MyFragmentPagerAdapter extends FragmentStatePagerAdapter {
|
private static class MyFragmentPagerAdapter extends FragmentStatePagerAdapter {
|
||||||
|
|
||||||
private List<GiftLabelBean> list;
|
private List<GiftLabelBean> list;
|
||||||
|
|||||||
BIN
moduleUtil/src/main/res/mipmap-xxxhdpi/qgrml.png
Normal file
BIN
moduleUtil/src/main/res/mipmap-xxxhdpi/qgrml.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.6 KiB |
@@ -80,7 +80,7 @@
|
|||||||
|
|
||||||
<View
|
<View
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="@dimen/dp_20"/>
|
android:layout_height="@dimen/dp_45"/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</androidx.core.widget.NestedScrollView>
|
</androidx.core.widget.NestedScrollView>
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".activity.MainActivity"
|
android:name=".activity.MainActivity"
|
||||||
android:launchMode="singleTask"
|
android:launchMode="singleTop"
|
||||||
android:exported="true"
|
android:exported="true"
|
||||||
/>
|
/>
|
||||||
</application>
|
</application>
|
||||||
|
|||||||
@@ -366,6 +366,11 @@ public class MainActivity extends BaseMvpActivity<HomePresenter, ActivityMainBin
|
|||||||
@Override
|
@Override
|
||||||
protected void onResume() {
|
protected void onResume() {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
|
|
||||||
|
if (isTaskRoot() &&CommonAppContext.getInstance().isPlaying && CommonAppContext.getInstance().isShow) {
|
||||||
|
ARouter.getInstance().build(ARouteConstants.ROOM_DETAILS).withString("form", "首页").withString("roomId", CommonAppContext.getInstance().playId).navigation();
|
||||||
|
}
|
||||||
|
|
||||||
MvpPre.loginIm();
|
MvpPre.loginIm();
|
||||||
Logger.i("MainActivity", "onResume");
|
Logger.i("MainActivity", "onResume");
|
||||||
// Beta.checkAppUpgrade(false, false);
|
// Beta.checkAppUpgrade(false, false);
|
||||||
@@ -380,9 +385,7 @@ public class MainActivity extends BaseMvpActivity<HomePresenter, ActivityMainBin
|
|||||||
} else {
|
} else {
|
||||||
mBinding.ll.setVisibility(View.INVISIBLE);
|
mBinding.ll.setVisibility(View.INVISIBLE);
|
||||||
}
|
}
|
||||||
if (CommonAppContext.getInstance().isPlaying && CommonAppContext.getInstance().isShow) {
|
|
||||||
ARouter.getInstance().build(ARouteConstants.ROOM_DETAILS).withString("form", "首页").withString("roomId", CommonAppContext.getInstance().playId).navigation();
|
|
||||||
}
|
|
||||||
|
|
||||||
V2TIMManager.getConversationManager().getTotalUnreadMessageCount(new V2TIMValueCallback<Long>() {
|
V2TIMManager.getConversationManager().getTotalUnreadMessageCount(new V2TIMValueCallback<Long>() {
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -159,6 +159,7 @@ import org.greenrobot.eventbus.ThreadMode;
|
|||||||
import java.lang.ref.WeakReference;
|
import java.lang.ref.WeakReference;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -212,7 +213,7 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
|||||||
private PublicScreenEaseChatFragment publicScreenFragment; // 添加成员变量
|
private PublicScreenEaseChatFragment publicScreenFragment; // 添加成员变量
|
||||||
// 添加成员变量
|
// 添加成员变量
|
||||||
private boolean isLayoutAdjusted = false;
|
private boolean isLayoutAdjusted = false;
|
||||||
private ViewStub stub;
|
// private ViewStub stub;
|
||||||
private static WeakReference<RoomActivity> sActivityRef;
|
private static WeakReference<RoomActivity> sActivityRef;
|
||||||
// 存储当前显示的弹框引用
|
// 存储当前显示的弹框引用
|
||||||
private List<DialogInterface> activeDialogs = new ArrayList<>();
|
private List<DialogInterface> activeDialogs = new ArrayList<>();
|
||||||
@@ -457,7 +458,7 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
|||||||
ThemeableDrawableUtils.setThemeableRoundedBackground(mBinding.roomTop.btnFollow, ColorManager.getInstance().getPrimaryColorInt(), 53);
|
ThemeableDrawableUtils.setThemeableRoundedBackground(mBinding.roomTop.btnFollow, ColorManager.getInstance().getPrimaryColorInt(), 53);
|
||||||
mBinding.roomTop.btnFollow.setTextColor(ColorManager.getInstance().getButtonColorInt());
|
mBinding.roomTop.btnFollow.setTextColor(ColorManager.getInstance().getButtonColorInt());
|
||||||
initPublicScreenFragment();
|
initPublicScreenFragment();
|
||||||
stub = mBinding.roomTop.stubButtons.getViewStub();
|
// stub = mBinding.roomTop.stubButtons.getViewStub();
|
||||||
|
|
||||||
// 为透明 View 设置触摸监听
|
// 为透明 View 设置触摸监听
|
||||||
mBinding.roomTop.rlTop.setOnTouchListener(new View.OnTouchListener() {
|
mBinding.roomTop.rlTop.setOnTouchListener(new View.OnTouchListener() {
|
||||||
@@ -473,10 +474,10 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
|||||||
layoutParams.height = SystemUtils.getWidth(74); // 示例高度
|
layoutParams.height = SystemUtils.getWidth(74); // 示例高度
|
||||||
mBinding.roomTop.getRoot().setLayoutParams(layoutParams);
|
mBinding.roomTop.getRoot().setLayoutParams(layoutParams);
|
||||||
|
|
||||||
ViewGroup.LayoutParams layoutParams2 = mBinding.vpRoomPager.getLayoutParams();
|
// ViewGroup.LayoutParams layoutParams2 = mBinding.vpRoomPager.getLayoutParams();
|
||||||
layoutParams.width = WindowManager.LayoutParams.MATCH_PARENT; // 使用你定义的getWidth方法
|
// layoutParams.width = WindowManager.LayoutParams.MATCH_PARENT; // 使用你定义的getWidth方法
|
||||||
layoutParams.height = SystemUtils.getWidth(74); // 示例高度
|
// layoutParams.height = SystemUtils.getWidth(74); // 示例高度
|
||||||
mBinding.roomTop.getRoot().setLayoutParams(layoutParams);
|
// mBinding.roomTop.getRoot().setLayoutParams(layoutParams);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onGiftGiveProgressClcik() {
|
private void onGiftGiveProgressClcik() {
|
||||||
@@ -919,6 +920,18 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
|||||||
});
|
});
|
||||||
|
|
||||||
mRoomInfoResp.getRoom_info().setPit_list(pitList);
|
mRoomInfoResp.getRoom_info().setPit_list(pitList);
|
||||||
|
|
||||||
|
// 更新当前用户的 pit_number(如果当前用户参与了换麦)
|
||||||
|
if (mRoomInfoResp.getUser_info() != null) {
|
||||||
|
String currentUserId = String.valueOf(SpUtil.getUserId());
|
||||||
|
if (fromBean.getUser_id().equals(currentUserId)) {
|
||||||
|
// 当前用户原来在 fromBean 位置,现在换到了 toBean 位置
|
||||||
|
mRoomInfoResp.getUser_info().setPit_number(Integer.parseInt(toBean.getPit_number()));
|
||||||
|
} else if (toBean.getUser_id().equals(currentUserId)) {
|
||||||
|
// 当前用户原来在 toBean 位置,现在换到了 fromBean 位置
|
||||||
|
mRoomInfoResp.getUser_info().setPit_number(Integer.parseInt(fromBean.getPit_number()));
|
||||||
|
}
|
||||||
|
}
|
||||||
roomFragment.updateSeatViewExchangedWithPitArray(mRoomInfoResp);
|
roomFragment.updateSeatViewExchangedWithPitArray(mRoomInfoResp);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1023,7 +1036,7 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
|||||||
customMusicFloatingView.destroy();
|
customMusicFloatingView.destroy();
|
||||||
}
|
}
|
||||||
AgoraManager.getInstance(RoomActivity.this).desMusic();
|
AgoraManager.getInstance(RoomActivity.this).desMusic();
|
||||||
stub.setVisibility(View.GONE);
|
// stub.setVisibility(View.GONE);
|
||||||
MvpPre.postRoomInfo(roomId);
|
MvpPre.postRoomInfo(roomId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1673,6 +1686,7 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
|||||||
if (event.isEffectOn()) {//特效开启
|
if (event.isEffectOn()) {//特效开启
|
||||||
mBinding.svgaGift.setVisibility(View.VISIBLE);
|
mBinding.svgaGift.setVisibility(View.VISIBLE);
|
||||||
} else {
|
} else {
|
||||||
|
// mBinding.svgaGift.closeEffect();
|
||||||
mBinding.svgaGift.closeEffect();
|
mBinding.svgaGift.closeEffect();
|
||||||
mBinding.svgaGift.setVisibility(View.GONE);
|
mBinding.svgaGift.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
@@ -1712,7 +1726,7 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
|||||||
addActiveDialog(roomNoticeDialogFragment);
|
addActiveDialog(roomNoticeDialogFragment);
|
||||||
} else if (id == R.id.btn_ranking) {//排行榜
|
} else if (id == R.id.btn_ranking) {//排行榜
|
||||||
// RoomChartsFragment.newInstance(roomId).show(getSupportFragmentManager(), "RoomChartsFragment");
|
// RoomChartsFragment.newInstance(roomId).show(getSupportFragmentManager(), "RoomChartsFragment");
|
||||||
RoomChartsFragment fragment = RoomChartsFragment.newInstance(roomId);
|
RoomChartsFragment fragment = RoomChartsFragment.newInstance(roomId,mRoomInfoResp);
|
||||||
fragment.show(getSupportFragmentManager(), "RoomChartsFragment");
|
fragment.show(getSupportFragmentManager(), "RoomChartsFragment");
|
||||||
addActiveDialogFragment(fragment);
|
addActiveDialogFragment(fragment);
|
||||||
} else if (id == R.id.btn_close_live) {
|
} else if (id == R.id.btn_close_live) {
|
||||||
@@ -1942,34 +1956,54 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void setRoleType(int roleType, int pit_number) {
|
public void setRoleType(int roleType, int pit_number) {
|
||||||
RelativeLayout rl_voive = mBinding.rlVoive;
|
RelativeLayout rl_voice = mBinding.rlVoive; // 注意:原拼写错误已修正
|
||||||
RelativeLayout rl_mic = mBinding.rlMic;
|
RelativeLayout rl_mic = mBinding.rlMic;
|
||||||
RelativeLayout rl_more = mBinding.rlMore;
|
RelativeLayout rl_more = mBinding.rlMore;
|
||||||
RelativeLayout rl_misc = mBinding.rlMisc;
|
RelativeLayout rl_misc = mBinding.rlMisc;
|
||||||
|
|
||||||
// 默认隐藏所有按钮
|
// 默认隐藏所有按钮
|
||||||
rl_voive.setVisibility(View.GONE);
|
rl_voice.setVisibility(View.GONE);
|
||||||
rl_more.setVisibility(View.GONE);
|
rl_more.setVisibility(View.GONE);
|
||||||
rl_misc.setVisibility(View.GONE);
|
rl_misc.setVisibility(View.GONE);
|
||||||
rl_mic.setVisibility(View.GONE);
|
rl_mic.setVisibility(View.GONE);
|
||||||
|
|
||||||
|
// 空指针保护
|
||||||
|
if (mRoomInfoResp == null || mRoomInfoResp.getRoom_info() == null || mRoomInfoResp.getUser_info() == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
String typeId = mRoomInfoResp.getRoom_info().getType_id();
|
||||||
|
String labelId = mRoomInfoResp.getRoom_info().getLabel_id();
|
||||||
|
int userPitNumber = mRoomInfoResp.getUser_info().getPit_number();
|
||||||
|
|
||||||
|
// 特殊房间类型处理(优先级最高)
|
||||||
|
if ("6".equals(typeId)) {
|
||||||
|
mBinding.rlMessage.setVisibility(View.GONE);
|
||||||
|
return; // 全部隐藏,无需继续处理
|
||||||
|
}
|
||||||
|
|
||||||
|
if ("7".equals(typeId)) {
|
||||||
|
rl_more.setVisibility(View.GONE);
|
||||||
|
rl_misc.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
|
|
||||||
// 根据角色类型显示按钮
|
// 根据角色类型显示按钮
|
||||||
switch (roleType) {
|
switch (roleType) {
|
||||||
case 2: // 主持人
|
|
||||||
case 1: // 房主
|
case 1: // 房主
|
||||||
|
case 2: // 主持人
|
||||||
case 3: // 麦上用户
|
case 3: // 麦上用户
|
||||||
rl_voive.setVisibility(View.VISIBLE);
|
rl_voice.setVisibility(View.VISIBLE);
|
||||||
rl_mic.setVisibility(pit_number != 0 ? View.VISIBLE : View.GONE);
|
rl_mic.setVisibility(pit_number != 0 ? View.VISIBLE : View.GONE);
|
||||||
rl_more.setVisibility(pit_number == 9 ? View.VISIBLE : View.GONE);
|
rl_more.setVisibility(pit_number == 9 ? View.VISIBLE : View.GONE);
|
||||||
rl_misc.setVisibility(View.VISIBLE);
|
rl_misc.setVisibility(View.VISIBLE);
|
||||||
break;
|
break;
|
||||||
case 0: // 观众
|
case 0: // 观众
|
||||||
rl_voive.setVisibility(View.VISIBLE);
|
rl_voice.setVisibility(View.VISIBLE);
|
||||||
rl_mic.setVisibility(pit_number != 0 ? View.VISIBLE : View.GONE);
|
rl_mic.setVisibility(pit_number != 0 ? View.VISIBLE : View.GONE);
|
||||||
rl_misc.setVisibility(View.VISIBLE);
|
rl_misc.setVisibility(View.VISIBLE);
|
||||||
break;
|
break;
|
||||||
case 5: // 房间管理员
|
case 5: // 房间管理员
|
||||||
rl_voive.setVisibility(View.VISIBLE);
|
rl_voice.setVisibility(View.VISIBLE);
|
||||||
rl_more.setVisibility(View.GONE);
|
rl_more.setVisibility(View.GONE);
|
||||||
rl_misc.setVisibility(View.GONE);
|
rl_misc.setVisibility(View.GONE);
|
||||||
break;
|
break;
|
||||||
@@ -1977,51 +2011,41 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ("2".equals(mRoomInfoResp.getRoom_info().getType_id())) {
|
// 类型房间规则覆盖
|
||||||
|
if ("2".equals(typeId)) {
|
||||||
rl_misc.setVisibility(View.GONE);
|
rl_misc.setVisibility(View.GONE);
|
||||||
rl_more.setVisibility(View.GONE);
|
rl_more.setVisibility(View.GONE);
|
||||||
} else if (roleType != 5) {
|
} else if (roleType != 5) {
|
||||||
rl_misc.setVisibility(View.VISIBLE);
|
rl_misc.setVisibility(View.VISIBLE);
|
||||||
if (mRoomInfoResp.getUser_info().getPit_number() == 9) {
|
if (userPitNumber == 9) {
|
||||||
rl_more.setVisibility(View.VISIBLE);
|
rl_more.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (("1".equals(mRoomInfoResp.getRoom_info().getType_id()) ||
|
// label_id 和 type_id 联合判断
|
||||||
"4".equals(mRoomInfoResp.getRoom_info().getType_id()) ||
|
if (Arrays.asList("1", "3", "4").contains(typeId) && "2".equals(labelId)) {
|
||||||
"3".equals(mRoomInfoResp.getRoom_info().getType_id())) &&
|
|
||||||
"2".equals(mRoomInfoResp.getRoom_info().getLabel_id())) {
|
|
||||||
rl_more.setVisibility(View.GONE);
|
rl_more.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mRoomInfoResp.getUser_info().getPit_number() > 0) {
|
// mic 显示逻辑
|
||||||
|
if (userPitNumber > 0) {
|
||||||
rl_mic.setVisibility(View.VISIBLE);
|
rl_mic.setVisibility(View.VISIBLE);
|
||||||
switchMic(2);
|
switchMic(2);
|
||||||
} else {
|
} else {
|
||||||
if (pit_number == 888) {
|
if (pit_number == 888) {
|
||||||
rl_mic.setVisibility(View.VISIBLE);
|
rl_mic.setVisibility(View.VISIBLE);
|
||||||
switchMic(2);
|
switchMic(2);
|
||||||
} else if (pit_number== -1) {
|
} else if (pit_number == -1) {
|
||||||
|
rl_mic.setVisibility(View.VISIBLE); // 原代码此处缺少 View. 前缀,已补全
|
||||||
switchMic(1);
|
switchMic(1);
|
||||||
rl_mic.setVisibility(VISIBLE);
|
} else {
|
||||||
}else {
|
|
||||||
switchMic(2);
|
|
||||||
rl_mic.setVisibility(View.GONE);
|
rl_mic.setVisibility(View.GONE);
|
||||||
|
switchMic(2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ("6".equals(mRoomInfoResp.getRoom_info().getType_id())) {
|
|
||||||
rl_voive.setVisibility(View.GONE);
|
|
||||||
rl_more.setVisibility(View.GONE);
|
|
||||||
rl_misc.setVisibility(View.GONE);
|
|
||||||
rl_mic.setVisibility(View.GONE);
|
|
||||||
mBinding.rlMessage.setVisibility(View.GONE);
|
|
||||||
} else if ("7".equals(mRoomInfoResp.getRoom_info().getType_id())) {
|
|
||||||
rl_more.setVisibility(View.GONE);
|
|
||||||
rl_misc.setVisibility(View.GONE);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void isMute(int is_mute) {
|
public void isMute(int is_mute) {
|
||||||
RoomMessageEvent.text text = new RoomMessageEvent.text();
|
RoomMessageEvent.text text = new RoomMessageEvent.text();
|
||||||
text.setIs_mute(is_mute);
|
text.setIs_mute(is_mute);
|
||||||
@@ -2748,6 +2772,14 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
|||||||
}
|
}
|
||||||
AgoraManager.getInstance(this).stopMuisc();
|
AgoraManager.getInstance(this).stopMuisc();
|
||||||
initializeAudio();
|
initializeAudio();
|
||||||
|
|
||||||
|
if (mRoomInfoResp.getRoom_info().getLabel_id().equals("2") || mRoomInfoResp.getRoom_info().getType_id().equals("7")){
|
||||||
|
mBinding.rlMore.setVisibility(GONE);
|
||||||
|
mBinding.rlMisc.setVisibility(GONE);
|
||||||
|
}else if (mRoomInfoResp.getRoom_info().getLabel_id().equals("1") || mRoomInfoResp.getRoom_info().getType_id().equals("3") || mRoomInfoResp.getRoom_info().getType_id().equals("4")){
|
||||||
|
mBinding.rlMore.setVisibility(VISIBLE);
|
||||||
|
mBinding.rlMisc.setVisibility(VISIBLE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -2760,7 +2792,7 @@ public class RoomActivity extends BaseMvpActivity<RoomPresenter, ActivityRoomBin
|
|||||||
}
|
}
|
||||||
|
|
||||||
}else if (mRoomInfoResp.getRoom_info().getType_id().equals("2")){
|
}else if (mRoomInfoResp.getRoom_info().getType_id().equals("2")){
|
||||||
maxHeightDp=287;
|
maxHeightDp=297;
|
||||||
} if (mRoomInfoResp.getRoom_info().getType_id().equals("6")){
|
} if (mRoomInfoResp.getRoom_info().getType_id().equals("6")){
|
||||||
maxHeightDp=333;
|
maxHeightDp=333;
|
||||||
}else if (mRoomInfoResp.getRoom_info().getType_id().equals("7")){
|
}else if (mRoomInfoResp.getRoom_info().getType_id().equals("7")){
|
||||||
|
|||||||
@@ -44,9 +44,9 @@ public class GiftUserAdapter extends BaseQuickAdapter<RewardUserBean, BaseViewHo
|
|||||||
} else {
|
} else {
|
||||||
helper.setVisible(R.id.tv_pit, true);
|
helper.setVisible(R.id.tv_pit, true);
|
||||||
int pitNumber = Integer.parseInt(item.getPit_number());
|
int pitNumber = Integer.parseInt(item.getPit_number());
|
||||||
if (pitNumber>10){
|
if (pitNumber > 10) {
|
||||||
helper.setText(R.id.tv_pit, item.getNickname());
|
helper.setText(R.id.tv_pit, item.getNickname());
|
||||||
}else {
|
} else {
|
||||||
helper.setText(R.id.tv_pit, String.format("%s号麦", item.getPit_number()));
|
helper.setText(R.id.tv_pit, String.format("%s号麦", item.getPit_number()));
|
||||||
}
|
}
|
||||||
if (item.getPit_number().equals("10")) {
|
if (item.getPit_number().equals("10")) {
|
||||||
@@ -92,12 +92,29 @@ public class GiftUserAdapter extends BaseQuickAdapter<RewardUserBean, BaseViewHo
|
|||||||
int count = 1;
|
int count = 1;
|
||||||
List<RewardUserBean> data = getData();
|
List<RewardUserBean> data = getData();
|
||||||
for (RewardUserBean item : data) {
|
for (RewardUserBean item : data) {
|
||||||
if (item.isSelect()) {
|
if (!item.getUser_id().equals(SpUtil.getUserId() + "")) {
|
||||||
count++;
|
if (item.isSelect()) {
|
||||||
|
count++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
///获取当前选中的人数
|
||||||
|
public int getUserIdCount(){
|
||||||
|
int count = 0;
|
||||||
|
List<RewardUserBean> data = getData();
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
for (int i = 0; i < data.size(); i++) {
|
||||||
|
if (!data.get(i).getUser_id().equals(SpUtil.getUserId() + "")) {
|
||||||
|
if (data.get(i).isSelect()) {
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public List<RewardUserBean> getSelectRoomPitUserModel() {
|
public List<RewardUserBean> getSelectRoomPitUserModel() {
|
||||||
List<RewardUserBean> selects = getData();
|
List<RewardUserBean> selects = getData();
|
||||||
@@ -114,7 +131,7 @@ public class GiftUserAdapter extends BaseQuickAdapter<RewardUserBean, BaseViewHo
|
|||||||
List<RewardUserBean> data = getData();
|
List<RewardUserBean> data = getData();
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
for (int i = 0; i < data.size(); i++) {
|
for (int i = 0; i < data.size(); i++) {
|
||||||
if (!data.get(i).getUser_id().equals(SpUtil.getUserId()+"")) {
|
if (!data.get(i).getUser_id().equals(SpUtil.getUserId() + "")) {
|
||||||
if (data.get(i).isSelect()) {
|
if (data.get(i).isSelect()) {
|
||||||
if (sb.length() > 0) {//该步即不会第一位有逗号,也防止最后一位拼接逗号!
|
if (sb.length() > 0) {//该步即不会第一位有逗号,也防止最后一位拼接逗号!
|
||||||
sb.append(",");
|
sb.append(",");
|
||||||
@@ -134,9 +151,9 @@ public class GiftUserAdapter extends BaseQuickAdapter<RewardUserBean, BaseViewHo
|
|||||||
if (sb.length() > 0) {//该步即不会第一位有逗号,也防止最后一位拼接逗号!
|
if (sb.length() > 0) {//该步即不会第一位有逗号,也防止最后一位拼接逗号!
|
||||||
sb.append(",");
|
sb.append(",");
|
||||||
}
|
}
|
||||||
if (data!=null && data.get(i)!=null && data.get(i).getPit_number()!=null) {
|
if (data != null && data.get(i) != null && data.get(i).getPit_number() != null) {
|
||||||
sb.append(data.get(i).getPit_number());
|
sb.append(data.get(i).getPit_number());
|
||||||
}else {
|
} else {
|
||||||
sb.append("");
|
sb.append("");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -183,7 +200,7 @@ public class GiftUserAdapter extends BaseQuickAdapter<RewardUserBean, BaseViewHo
|
|||||||
for (RewardUserBean item : data) {
|
for (RewardUserBean item : data) {
|
||||||
if (item.isSelect()) {
|
if (item.isSelect()) {
|
||||||
|
|
||||||
ids.add(item.getUser_id());
|
ids.add(item.getUser_id());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return ids;
|
return ids;
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import android.view.LayoutInflater;
|
|||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.view.Window;
|
import android.view.Window;
|
||||||
|
import android.view.WindowManager;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
@@ -35,6 +36,7 @@ import com.google.android.material.tabs.TabLayout;
|
|||||||
import com.google.android.material.tabs.TabLayoutMediator;
|
import com.google.android.material.tabs.TabLayoutMediator;
|
||||||
import com.hjq.toast.ToastUtils;
|
import com.hjq.toast.ToastUtils;
|
||||||
import com.xscm.moduleutil.adapter.GiftTwoDetailsFragment;
|
import com.xscm.moduleutil.adapter.GiftTwoDetailsFragment;
|
||||||
|
import com.xscm.moduleutil.adapter.MyFragmentPagerAdapter;
|
||||||
import com.xscm.moduleutil.base.BaseMvpDialogFragment;
|
import com.xscm.moduleutil.base.BaseMvpDialogFragment;
|
||||||
import com.xscm.moduleutil.bean.GiftLabelBean;
|
import com.xscm.moduleutil.bean.GiftLabelBean;
|
||||||
import com.xscm.moduleutil.bean.GiftNumBean;
|
import com.xscm.moduleutil.bean.GiftNumBean;
|
||||||
@@ -58,6 +60,7 @@ import com.xscm.moduleutil.presenter.RewardGiftPresenter;
|
|||||||
import com.xscm.moduleutil.utils.ARouteConstants;
|
import com.xscm.moduleutil.utils.ARouteConstants;
|
||||||
import com.xscm.moduleutil.utils.ColorManager;
|
import com.xscm.moduleutil.utils.ColorManager;
|
||||||
import com.xscm.moduleutil.utils.SpUtil;
|
import com.xscm.moduleutil.utils.SpUtil;
|
||||||
|
import com.xscm.moduleutil.utils.SystemUtils;
|
||||||
import com.xscm.moduleutil.widget.dialog.KeyboardPopupWindow;
|
import com.xscm.moduleutil.widget.dialog.KeyboardPopupWindow;
|
||||||
import com.xscm.moduleutil.widget.dialog.SelectGiftNumPopupWindow;
|
import com.xscm.moduleutil.widget.dialog.SelectGiftNumPopupWindow;
|
||||||
|
|
||||||
@@ -245,7 +248,7 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
|||||||
for (RoomPitBean bean : pitList) {
|
for (RoomPitBean bean : pitList) {
|
||||||
if (bean.getPit_number().equals(targetPit) &&
|
if (bean.getPit_number().equals(targetPit) &&
|
||||||
!bean.getUser_id().equals("0") && !bean.getUser_id().equals("") &&
|
!bean.getUser_id().equals("0") && !bean.getUser_id().equals("") &&
|
||||||
!bean.getUser_id().equals(SpUtil.getUserId())) {
|
!bean.getUser_id().equals(SpUtil.getUserId()+"")) {
|
||||||
|
|
||||||
RewardUserBean rewardUserBean = new RewardUserBean();
|
RewardUserBean rewardUserBean = new RewardUserBean();
|
||||||
rewardUserBean.setUser_id(bean.getUser_id());
|
rewardUserBean.setUser_id(bean.getUser_id());
|
||||||
@@ -299,6 +302,18 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
|||||||
mBinding.tvGive.setTextColor(ColorManager.getInstance().getButtonColorInt());
|
mBinding.tvGive.setTextColor(ColorManager.getInstance().getButtonColorInt());
|
||||||
mBinding.cz.setTextColor(ColorManager.getInstance().getPrimaryColorInt());
|
mBinding.cz.setTextColor(ColorManager.getInstance().getPrimaryColorInt());
|
||||||
|
|
||||||
|
|
||||||
|
ViewGroup.LayoutParams layoutParams = mBinding.llGiftRule.getLayoutParams();
|
||||||
|
layoutParams.width = WindowManager.LayoutParams.MATCH_PARENT; // 使用你定义的getWidth方法
|
||||||
|
layoutParams.height = SystemUtils.getWidth(74); // 示例高度
|
||||||
|
mBinding.llGiftRule.setLayoutParams(layoutParams);
|
||||||
|
|
||||||
|
|
||||||
|
float[] corners2 = {56f, 56f, 56f, 56f};
|
||||||
|
ThemeableDrawableUtils.setThemeableRoundedBackground(mBinding.tvBbQs, ColorManager.getInstance().getPrimaryColorInt(), corners2);
|
||||||
|
mBinding.tvBbQs.setTextColor(ColorManager.getInstance().getButtonColorInt());
|
||||||
|
|
||||||
|
mBinding.tvBbQs.setOnClickListener(this::onClisk);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onClisk(View view1) {
|
private void onClisk(View view1) {
|
||||||
@@ -334,9 +349,9 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
|||||||
giftNumber = mGiftNumList.get(i).getNumber();
|
giftNumber = mGiftNumList.get(i).getNumber();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (packType==1) {
|
if (packType == 1) {
|
||||||
giveGift(giftNumber);
|
giveGift(giftNumber);
|
||||||
}else {
|
} else {
|
||||||
giveGift(giftNumber);
|
giveGift(giftNumber);
|
||||||
}
|
}
|
||||||
} else if (view1.getId() == R.id.cz) {
|
} else if (view1.getId() == R.id.cz) {
|
||||||
@@ -352,6 +367,17 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
|||||||
all = !all;
|
all = !all;
|
||||||
oldSelectedIds.clear();
|
oldSelectedIds.clear();
|
||||||
oldSelectedIds.addAll(gifyuseradapter.getAllSelectedIds());
|
oldSelectedIds.addAll(gifyuseradapter.getAllSelectedIds());
|
||||||
|
}else if (view1.getId() == R.id.tv_bb_qs){
|
||||||
|
int count =gifyuseradapter.getSelectCount();
|
||||||
|
if (count<0){
|
||||||
|
ToastUtils.show("请选择打赏的用户");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (gifyuseradapter.getUserIdCount()>1){
|
||||||
|
ToastUtils.show("一键全送只能选择一个用户");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
MvpPre.getGiftPack(roomId,gifyuseradapter.getUserIdToString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -363,7 +389,7 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
|||||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||||
public void onGiftDoubleClickEvent(GiftDoubleClickEvent event) {
|
public void onGiftDoubleClickEvent(GiftDoubleClickEvent event) {
|
||||||
getSelectedGift();
|
getSelectedGift();
|
||||||
packType=1;
|
packType = 1;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -486,24 +512,24 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
|||||||
// return;
|
// return;
|
||||||
// }
|
// }
|
||||||
// } else {
|
// } else {
|
||||||
if (roonGiftModel == null) {
|
if (roonGiftModel == null) {
|
||||||
ToastUtils.show("请选择礼物");
|
ToastUtils.show("请选择礼物");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
int count = gifyuseradapter.getSelectCount();
|
int count = gifyuseradapter.getSelectCount();
|
||||||
if (count <= 0) {
|
if (count <= 0) {
|
||||||
ToastUtils.show("请选择打赏对象");
|
ToastUtils.show("请选择打赏对象");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (TextUtils.isEmpty(num)) {
|
if (TextUtils.isEmpty(num)) {
|
||||||
ToastUtils.show("请选择打赏礼物数量");
|
ToastUtils.show("请选择打赏礼物数量");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (Integer.valueOf(num) <= 0) {
|
if (Integer.valueOf(num) <= 0) {
|
||||||
ToastUtils.show("请选择打赏礼物数量");
|
ToastUtils.show("请选择打赏礼物数量");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// }
|
// }
|
||||||
if (roonGiftModel != null && roonGiftModel.getGift_id() != null) {
|
if (roonGiftModel != null && roonGiftModel.getGift_id() != null) {
|
||||||
if (currentItem != 0) {
|
if (currentItem != 0) {
|
||||||
@@ -541,7 +567,9 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
|||||||
}
|
}
|
||||||
} else if (currentItem == 0) {
|
} else if (currentItem == 0) {
|
||||||
giftNumber = num;
|
giftNumber = num;
|
||||||
|
beibaoId = roonGiftModel.getGift_id();
|
||||||
MvpPre.roomGift(roomId, roonGiftModel.getGift_id(), giftNumber, userId, "2", pit, heart_id);
|
MvpPre.roomGift(roomId, roonGiftModel.getGift_id(), giftNumber, userId, "2", pit, heart_id);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
//背包礼物打赏
|
//背包礼物打赏
|
||||||
// giftNumber = num;
|
// giftNumber = num;
|
||||||
@@ -555,6 +583,8 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private String beibaoId;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int getLayoutId() {
|
protected int getLayoutId() {
|
||||||
return R.layout.room_gift_dialog;
|
return R.layout.room_gift_dialog;
|
||||||
@@ -572,10 +602,12 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
|||||||
mBinding.rvGiftUser.setVisibility(View.INVISIBLE);
|
mBinding.rvGiftUser.setVisibility(View.INVISIBLE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private List<GiftLabelBean> giftLabelBeanList;
|
|
||||||
|
private List<GiftLabelBean> giftLabelBeanList;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void getGiftLabel(List<GiftLabelBean> giftLabelBeans) {
|
public void getGiftLabel(List<GiftLabelBean> giftLabelBeans) {
|
||||||
giftLabelBeanList=new ArrayList<>();
|
giftLabelBeanList = new ArrayList<>();
|
||||||
giftLabelBeanList.addAll(giftLabelBeans);
|
giftLabelBeanList.addAll(giftLabelBeans);
|
||||||
GiftLabelBean giftLabelBean = new GiftLabelBean();
|
GiftLabelBean giftLabelBean = new GiftLabelBean();
|
||||||
giftLabelBean.setId("0");
|
giftLabelBean.setId("0");
|
||||||
@@ -585,25 +617,43 @@ private List<GiftLabelBean> giftLabelBeanList;
|
|||||||
mBinding.viewPager.setOffscreenPageLimit(0);
|
mBinding.viewPager.setOffscreenPageLimit(0);
|
||||||
mBinding.slidingTabLayout.setViewPager(mBinding.viewPager);
|
mBinding.slidingTabLayout.setViewPager(mBinding.viewPager);
|
||||||
mBinding.slidingTabLayout.setCurrentTab(1);
|
mBinding.slidingTabLayout.setCurrentTab(1);
|
||||||
|
mBinding.viewPager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {
|
||||||
|
@Override
|
||||||
|
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
// // 在 initView() 方法中添加
|
@Override
|
||||||
// mBinding.viewPager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {
|
public void onPageSelected(int position) {
|
||||||
// @Override
|
// 当页面切换时,控制 tv_bb_qs 按钮的显示
|
||||||
// public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
|
updateTvBbQsVisibility(position);
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// @Override
|
@Override
|
||||||
// public void onPageSelected(int position) {
|
public void onPageScrollStateChanged(int state) {
|
||||||
// // 页面切换时更新选中状态
|
|
||||||
// updateGiftSelection(position);
|
}
|
||||||
// }
|
});
|
||||||
//
|
// 初始化时设置按钮可见性
|
||||||
// @Override
|
updateTvBbQsVisibility(1);
|
||||||
// public void onPageScrollStateChanged(int state) {
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 控制 tv_bb_qs 按钮显示的方法
|
||||||
|
private void updateTvBbQsVisibility(int currentPosition) {
|
||||||
|
// 假设你希望在特定位置(例如位置1)显示按钮
|
||||||
|
if (currentPosition == 0) { // 根据你的需求调整位置
|
||||||
|
// 显示按钮
|
||||||
|
if (mBinding.tvBbQs != null) {
|
||||||
|
mBinding.tvBbQs.setVisibility(View.VISIBLE);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// 隐藏按钮
|
||||||
|
if (mBinding.tvBbQs != null) {
|
||||||
|
mBinding.tvBbQs.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setGiftList(List<RoonGiftModel> roonGiftModels, int type) {
|
public void setGiftList(List<RoonGiftModel> roonGiftModels, int type) {
|
||||||
|
|
||||||
@@ -612,6 +662,13 @@ private List<GiftLabelBean> giftLabelBeanList;
|
|||||||
@Override
|
@Override
|
||||||
public void giveGift() {
|
public void giveGift() {
|
||||||
// dismiss();
|
// dismiss();
|
||||||
|
|
||||||
|
if (mBinding.viewPager.getCurrentItem() == 0) {
|
||||||
|
MvpPre.wallet();
|
||||||
|
EventBus.getDefault().post(beibaoId);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (roomGiftGiveEvent != null) {
|
if (roomGiftGiveEvent != null) {
|
||||||
EventBus.getDefault().post(roomGiftGiveEvent);
|
EventBus.getDefault().post(roomGiftGiveEvent);
|
||||||
roomGiftGiveEvent = null;
|
roomGiftGiveEvent = null;
|
||||||
@@ -649,7 +706,17 @@ private List<GiftLabelBean> giftLabelBeanList;
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static class MyFragmentPagerAdapter extends FragmentStatePagerAdapter {
|
@Override
|
||||||
|
public void getGiftPack(String s) {
|
||||||
|
if (s!=null){
|
||||||
|
com.hjq.toast.ToastUtils.show( s);
|
||||||
|
dismiss();
|
||||||
|
}else {
|
||||||
|
com.hjq.toast.ToastUtils.show("一键全清背包礼物失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private class MyFragmentPagerAdapter extends FragmentStatePagerAdapter {
|
||||||
|
|
||||||
private List<GiftLabelBean> list;
|
private List<GiftLabelBean> list;
|
||||||
private List<Fragment> fragmentList;
|
private List<Fragment> fragmentList;
|
||||||
@@ -678,11 +745,9 @@ private List<GiftLabelBean> giftLabelBeanList;
|
|||||||
if (position < fragmentList.size() && fragmentList.get(position) != null) {
|
if (position < fragmentList.size() && fragmentList.get(position) != null) {
|
||||||
return fragmentList.get(position);
|
return fragmentList.get(position);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 创建新的 Fragment
|
// 创建新的 Fragment
|
||||||
GiftLabelBean model = list.get(position);
|
GiftLabelBean model = list.get(position);
|
||||||
Fragment fragment = GiftTwoDetailsFragment.newInstance(model.getId(), 1, roomId);
|
Fragment fragment = GiftTwoDetailsFragment.newInstance(model.getId(), 1, roomId);
|
||||||
|
|
||||||
// 确保 fragmentList 有足够的空间
|
// 确保 fragmentList 有足够的空间
|
||||||
while (fragmentList.size() <= position) {
|
while (fragmentList.size() <= position) {
|
||||||
fragmentList.add(null);
|
fragmentList.add(null);
|
||||||
|
|||||||
@@ -126,16 +126,12 @@ public class RoomUserInfoFragment extends BaseMvpDialogFragment<RoomUserPresente
|
|||||||
} else {
|
} else {
|
||||||
mBinding.roomDian.setVisibility(View.VISIBLE);
|
mBinding.roomDian.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressLint("UseCompatLoadingForDrawables")
|
@SuppressLint("UseCompatLoadingForDrawables")
|
||||||
@Override
|
@Override
|
||||||
protected void initView() {
|
protected void initView() {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
mBinding.ivAvatar.setOnClickListener(this::onClick);
|
mBinding.ivAvatar.setOnClickListener(this::onClick);
|
||||||
mBinding.roomMCz.setOnClickListener(this::onClick);
|
mBinding.roomMCz.setOnClickListener(this::onClick);
|
||||||
mBinding.roomDian.setOnClickListener(this::onClick);
|
mBinding.roomDian.setOnClickListener(this::onClick);
|
||||||
@@ -151,6 +147,7 @@ public class RoomUserInfoFragment extends BaseMvpDialogFragment<RoomUserPresente
|
|||||||
mBinding.textView1.setOnClickListener(this::onClick);
|
mBinding.textView1.setOnClickListener(this::onClick);
|
||||||
mBinding.textView2.setOnClickListener(this::onClick);
|
mBinding.textView2.setOnClickListener(this::onClick);
|
||||||
mBinding.moreButton.setOnClickListener(this::onClick);
|
mBinding.moreButton.setOnClickListener(this::onClick);
|
||||||
|
mBinding.imQml.setOnClickListener(this::onClick);
|
||||||
|
|
||||||
ThemeableDrawableUtils.setThemeableRoundedBackground(mBinding.roomMCz, ColorManager.getInstance().getPrimaryColorInt(), 65);
|
ThemeableDrawableUtils.setThemeableRoundedBackground(mBinding.roomMCz, ColorManager.getInstance().getPrimaryColorInt(), 65);
|
||||||
mBinding.roomMCz.setTextColor(ColorManager.getInstance().getButtonColorInt());
|
mBinding.roomMCz.setTextColor(ColorManager.getInstance().getButtonColorInt());
|
||||||
@@ -224,6 +221,8 @@ public class RoomUserInfoFragment extends BaseMvpDialogFragment<RoomUserPresente
|
|||||||
dianj(1);
|
dianj(1);
|
||||||
}else if (id==R.id.textView2){
|
}else if (id==R.id.textView2){
|
||||||
dianj(2);
|
dianj(2);
|
||||||
|
}else if (id==R.id.im_qml){
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -215,6 +215,11 @@ public class RoomWheatGiftSettingFragment extends BaseMvpDialogFragment<RewardGi
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void getGiftPack(String s) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
private static class MyFragmentPagerAdapter extends FragmentStatePagerAdapter {
|
private static class MyFragmentPagerAdapter extends FragmentStatePagerAdapter {
|
||||||
|
|
||||||
private List<Fragment> fragmentList;
|
private List<Fragment> fragmentList;
|
||||||
|
|||||||
@@ -11,14 +11,18 @@ import androidx.annotation.NonNull;
|
|||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
|
|
||||||
|
import com.alibaba.android.arouter.launcher.ARouter;
|
||||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||||
import com.example.moduleroom.R;
|
import com.example.moduleroom.R;
|
||||||
import com.example.moduleroom.adapter.RankingCharmListAdapter;
|
import com.example.moduleroom.adapter.RankingCharmListAdapter;
|
||||||
import com.example.moduleroom.contacts.DataListContacts;
|
import com.example.moduleroom.contacts.DataListContacts;
|
||||||
import com.example.moduleroom.databinding.RoomRankingChildBinding;
|
import com.example.moduleroom.databinding.RoomRankingChildBinding;
|
||||||
|
import com.example.moduleroom.dialog.RoomUserInfoFragment;
|
||||||
import com.example.moduleroom.presenter.DataListPresenter;
|
import com.example.moduleroom.presenter.DataListPresenter;
|
||||||
import com.xscm.moduleutil.base.BaseMvpFragment;
|
import com.xscm.moduleutil.base.BaseMvpFragment;
|
||||||
import com.xscm.moduleutil.bean.CharmRankingResp;
|
import com.xscm.moduleutil.bean.CharmRankingResp;
|
||||||
|
import com.xscm.moduleutil.bean.room.RoomInfoResp;
|
||||||
|
import com.xscm.moduleutil.utils.ARouteConstants;
|
||||||
import com.xscm.moduleutil.utils.ImageUtils;
|
import com.xscm.moduleutil.utils.ImageUtils;
|
||||||
import com.xscm.moduleutil.widget.CommonEmptyView;
|
import com.xscm.moduleutil.widget.CommonEmptyView;
|
||||||
|
|
||||||
@@ -43,18 +47,20 @@ public class RankingChildFragment extends BaseMvpFragment<DataListPresenter, Roo
|
|||||||
private RankingCharmListAdapter wAdapter;//财富适配器
|
private RankingCharmListAdapter wAdapter;//财富适配器
|
||||||
// private RankingWealthListAdapter wAdapter;//财富适配器
|
// private RankingWealthListAdapter wAdapter;//财富适配器
|
||||||
private CommonEmptyView commonEmptyView;
|
private CommonEmptyView commonEmptyView;
|
||||||
|
private RoomInfoResp roomInfoResp;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* newInstance 初始化fragment
|
* newInstance 初始化fragment
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public static RankingChildFragment newInstance(String roomId, int dataType, int rankType) {
|
public static RankingChildFragment newInstance(String roomId, int dataType, int rankType, RoomInfoResp roomInfoResp) {
|
||||||
RankingChildFragment rankingChildFragment = new RankingChildFragment();
|
RankingChildFragment rankingChildFragment = new RankingChildFragment();
|
||||||
Bundle bundle = new Bundle();
|
Bundle bundle = new Bundle();
|
||||||
bundle.putString("roomId", roomId);
|
bundle.putString("roomId", roomId);
|
||||||
bundle.putInt("dataType", dataType);
|
bundle.putInt("dataType", dataType);
|
||||||
bundle.putInt("rankType", rankType);
|
bundle.putInt("rankType", rankType);
|
||||||
|
bundle.putSerializable("roomInfoResp", roomInfoResp);
|
||||||
rankingChildFragment.setArguments(bundle);
|
rankingChildFragment.setArguments(bundle);
|
||||||
return rankingChildFragment;
|
return rankingChildFragment;
|
||||||
}
|
}
|
||||||
@@ -70,6 +76,7 @@ public class RankingChildFragment extends BaseMvpFragment<DataListPresenter, Roo
|
|||||||
roomId = getArguments().getString("roomId");
|
roomId = getArguments().getString("roomId");
|
||||||
dataType = getArguments().getInt("dataType");
|
dataType = getArguments().getInt("dataType");
|
||||||
rankType = getArguments().getInt("rankType");
|
rankType = getArguments().getInt("rankType");
|
||||||
|
roomInfoResp = (RoomInfoResp) getArguments().getSerializable("roomInfoResp");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -114,7 +121,10 @@ public class RankingChildFragment extends BaseMvpFragment<DataListPresenter, Roo
|
|||||||
public void onItemChildClick(BaseQuickAdapter adapter, View view, int position) {
|
public void onItemChildClick(BaseQuickAdapter adapter, View view, int position) {
|
||||||
if (view.getId() == R.id.room_item_head) {
|
if (view.getId() == R.id.room_item_head) {
|
||||||
CharmRankingResp 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();
|
|
||||||
|
RoomUserInfoFragment.show(roomId,item.getUser_id(), "", getHostUser(), true, 3, 0, getChildFragmentManager());
|
||||||
|
|
||||||
|
// ARouter.getInstance().build(ARouteConstants.USER_HOME_PAGE).withString("userId", item.getUser_id()).withBoolean("returnRoom", true).navigation();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -123,6 +133,9 @@ public class RankingChildFragment extends BaseMvpFragment<DataListPresenter, Roo
|
|||||||
@Override
|
@Override
|
||||||
public void onItemChildClick(BaseQuickAdapter adapter, View view, int position) {
|
public void onItemChildClick(BaseQuickAdapter adapter, View view, int position) {
|
||||||
if (view.getId() == R.id.room_item_head) {
|
if (view.getId() == R.id.room_item_head) {
|
||||||
|
CharmRankingResp item = wAdapter.getItem(position);
|
||||||
|
|
||||||
|
RoomUserInfoFragment.show(roomId,item.getUser_id(), "", getHostUser(), true, 3, 0, getChildFragmentManager());
|
||||||
// WealthRankingResp.ListsBean item = wAdapter.getItem(position);
|
// WealthRankingResp.ListsBean item = wAdapter.getItem(position);
|
||||||
// ARouter.getInstance().build(ARouteConstants.NEW_HOME_PAGE).withString("userId", item.getUser_id()).withBoolean("returnRoom", true).navigation();
|
// ARouter.getInstance().build(ARouteConstants.NEW_HOME_PAGE).withString("userId", item.getUser_id()).withBoolean("returnRoom", true).navigation();
|
||||||
}
|
}
|
||||||
@@ -130,7 +143,38 @@ public class RankingChildFragment extends BaseMvpFragment<DataListPresenter, Roo
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 这是判断当前用户是否是麦上房主、管理员、主持,不在主持麦的都是不同用户
|
||||||
|
* 2025-7-31 10:42:37,新添加的要求:根据角色不同,显示不同的按钮
|
||||||
|
* 房主不论麦上麦下,有全部权限 管理员、主持:不论麦上麦下,有部分权限 用户:只有举报拉黑权限
|
||||||
|
* 所有的是从下往上看数据的时候,只有举报和拉黑
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
private int getHostUser() {
|
||||||
|
if (roomInfoResp.getUser_info().getPit_number() == 9) {
|
||||||
|
if (roomInfoResp.getUser_info().getIs_room_owner() == 1) {
|
||||||
|
return 1;
|
||||||
|
} else if (roomInfoResp.getUser_info().getIs_management() == 1) {
|
||||||
|
return 2;
|
||||||
|
} else if (roomInfoResp.getUser_info().getIs_host() == 1) {
|
||||||
|
return 3;
|
||||||
|
} else {
|
||||||
|
return 4;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (roomInfoResp.getUser_info().getIs_room_owner() == 1) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
if (roomInfoResp.getUser_info().getIs_management() == 1) {
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
if (roomInfoResp.getUser_info().getIs_host() == 1) {
|
||||||
|
return 3;
|
||||||
|
}
|
||||||
|
return 4;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int getLayoutId() {
|
protected int getLayoutId() {
|
||||||
@@ -148,6 +192,8 @@ public class RankingChildFragment extends BaseMvpFragment<DataListPresenter, Roo
|
|||||||
mBinding.roomRankTop1HeadIcon.setOnClickListener(new View.OnClickListener() {
|
mBinding.roomRankTop1HeadIcon.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
|
RoomUserInfoFragment.show(roomId,listsBean.getUser_id(), "", getHostUser(), true, 3, 0, getChildFragmentManager());
|
||||||
|
|
||||||
// ARouter.getInstance().build(ARouteConstants.NEW_HOME_PAGE).withString("userId", listsBean.getUser_id()).withBoolean("returnRoom", true).navigation();
|
// ARouter.getInstance().build(ARouteConstants.NEW_HOME_PAGE).withString("userId", listsBean.getUser_id()).withBoolean("returnRoom", true).navigation();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -162,6 +208,8 @@ public class RankingChildFragment extends BaseMvpFragment<DataListPresenter, Roo
|
|||||||
mBinding.roomRankTop2HeadIcon.setOnClickListener(new View.OnClickListener() {
|
mBinding.roomRankTop2HeadIcon.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
|
RoomUserInfoFragment.show(roomId,listsBean.getUser_id(), "", getHostUser(), true, 3, 0, getChildFragmentManager());
|
||||||
|
|
||||||
// ARouter.getInstance().build(ARouteConstants.NEW_HOME_PAGE).withString("userId", listsBean.getUser_id()).withBoolean("returnRoom", true).navigation();
|
// ARouter.getInstance().build(ARouteConstants.NEW_HOME_PAGE).withString("userId", listsBean.getUser_id()).withBoolean("returnRoom", true).navigation();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -198,6 +246,8 @@ public class RankingChildFragment extends BaseMvpFragment<DataListPresenter, Roo
|
|||||||
mBinding.roomRankTop3HeadIcon.setOnClickListener(new View.OnClickListener() {
|
mBinding.roomRankTop3HeadIcon.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
|
RoomUserInfoFragment.show(roomId,listsBean.getUser_id(), "", getHostUser(), true, 3, 0, getChildFragmentManager());
|
||||||
|
|
||||||
// ARouter.getInstance().build(ARouteConstants.NEW_HOME_PAGE).withString("userId", listsBean.getUser_id()).withBoolean("returnRoom", true).navigation();
|
// ARouter.getInstance().build(ARouteConstants.NEW_HOME_PAGE).withString("userId", listsBean.getUser_id()).withBoolean("returnRoom", true).navigation();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import com.example.moduleroom.databinding.RoomRankingParentBinding;
|
|||||||
import com.xscm.moduleutil.activity.IPresenter;
|
import com.xscm.moduleutil.activity.IPresenter;
|
||||||
import com.xscm.moduleutil.adapter.MyFragmentPagerAdapter;
|
import com.xscm.moduleutil.adapter.MyFragmentPagerAdapter;
|
||||||
import com.xscm.moduleutil.base.BaseMvpFragment;
|
import com.xscm.moduleutil.base.BaseMvpFragment;
|
||||||
|
import com.xscm.moduleutil.bean.room.RoomInfoResp;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -28,12 +29,13 @@ public class RankingParentFragment extends BaseMvpFragment<IPresenter, RoomRanki
|
|||||||
private static String mRoomId;//房间ID
|
private static String mRoomId;//房间ID
|
||||||
private static int rankType = 1;//统计类型(魅力 / 财富)
|
private static int rankType = 1;//统计类型(魅力 / 财富)
|
||||||
// private static int dataType = 1;//统计周期(日/周/月)
|
// private static int dataType = 1;//统计周期(日/周/月)
|
||||||
|
private RoomInfoResp roomInfoResp;
|
||||||
|
|
||||||
|
public static RankingParentFragment newInstance(String roomId,int rankType,RoomInfoResp roomInfoResp) {
|
||||||
public static RankingParentFragment newInstance(String roomId,int rankType) {
|
|
||||||
Bundle args = new Bundle();
|
Bundle args = new Bundle();
|
||||||
args.putString("roomId", roomId);
|
args.putString("roomId", roomId);
|
||||||
args.putInt("rankType", rankType);
|
args.putInt("rankType", rankType);
|
||||||
|
args.putSerializable("roomInfoResp", roomInfoResp);
|
||||||
RankingParentFragment fragment = new RankingParentFragment();
|
RankingParentFragment fragment = new RankingParentFragment();
|
||||||
fragment.setArguments(args);
|
fragment.setArguments(args);
|
||||||
return fragment;
|
return fragment;
|
||||||
@@ -44,6 +46,7 @@ public class RankingParentFragment extends BaseMvpFragment<IPresenter, RoomRanki
|
|||||||
super.initArgs(arguments);
|
super.initArgs(arguments);
|
||||||
mRoomId = arguments.getString("roomId");
|
mRoomId = arguments.getString("roomId");
|
||||||
rankType = arguments.getInt("rankType");
|
rankType = arguments.getInt("rankType");
|
||||||
|
roomInfoResp = (RoomInfoResp) arguments.getSerializable("roomInfoResp");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -54,9 +57,9 @@ public class RankingParentFragment extends BaseMvpFragment<IPresenter, RoomRanki
|
|||||||
@Override
|
@Override
|
||||||
protected void initData() {
|
protected void initData() {
|
||||||
List<Fragment> fragments = new ArrayList<>();
|
List<Fragment> fragments = new ArrayList<>();
|
||||||
fragments.add(RankingChildFragment.newInstance(mRoomId, TYPE_DATA, rankType));
|
fragments.add(RankingChildFragment.newInstance(mRoomId, TYPE_DATA, rankType, roomInfoResp));
|
||||||
fragments.add(RankingChildFragment.newInstance(mRoomId, TYPE_WEEK, rankType));
|
fragments.add(RankingChildFragment.newInstance(mRoomId, TYPE_WEEK, rankType, roomInfoResp));
|
||||||
fragments.add(RankingChildFragment.newInstance(mRoomId, TYPE_MON, rankType));
|
fragments.add(RankingChildFragment.newInstance(mRoomId, TYPE_MON, rankType, roomInfoResp));
|
||||||
MyFragmentPagerAdapter myFragmentPagerAdapter = new MyFragmentPagerAdapter(fragments, getChildFragmentManager());
|
MyFragmentPagerAdapter myFragmentPagerAdapter = new MyFragmentPagerAdapter(fragments, getChildFragmentManager());
|
||||||
mBinding.vpRankChild.setAdapter(myFragmentPagerAdapter);
|
mBinding.vpRankChild.setAdapter(myFragmentPagerAdapter);
|
||||||
String[] title = new String[]{"日榜", "周榜", "月榜"};
|
String[] title = new String[]{"日榜", "周榜", "月榜"};
|
||||||
|
|||||||
@@ -132,6 +132,7 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
|||||||
if (roomPitBean.getUser_id() != null && !roomPitBean.getUser_id().isEmpty() && !roomPitBean.getUser_id().equals("0")) {
|
if (roomPitBean.getUser_id() != null && !roomPitBean.getUser_id().isEmpty() && !roomPitBean.getUser_id().equals("0")) {
|
||||||
roomPitBean.setIs_pm(1);
|
roomPitBean.setIs_pm(1);
|
||||||
wheatView.setData(roomPitBean);
|
wheatView.setData(roomPitBean);
|
||||||
|
|
||||||
if (imActionJs != null)
|
if (imActionJs != null)
|
||||||
imActionJs.setVisibility(VISIBLE);
|
imActionJs.setVisibility(VISIBLE);
|
||||||
} else {
|
} else {
|
||||||
@@ -143,12 +144,13 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
|||||||
pitBean.setSex("");
|
pitBean.setSex("");
|
||||||
pitBean.setCharm("");
|
pitBean.setCharm("");
|
||||||
wheatView.setData(pitBean);
|
wheatView.setData(pitBean);
|
||||||
|
|
||||||
}
|
}
|
||||||
parentFragment = (RoomFragment) getParentFragment();
|
parentFragment = (RoomFragment) getParentFragment();
|
||||||
|
|
||||||
roomAuction = roomInfoResp.getRoom_auction();
|
roomAuction = roomInfoResp.getRoom_auction();
|
||||||
if (roomAuction != null) {
|
if (roomAuction != null) {
|
||||||
if (roomAuction.getAuction_user() != null && roomAuction.getAuction_user().getAuction_id() != null) {
|
if (roomAuction.getAuction_user() != null ) {
|
||||||
auctionUserBean = roomAuction.getAuction_user();
|
auctionUserBean = roomAuction.getAuction_user();
|
||||||
RoomPitBean roomPitBean1 = new RoomPitBean();
|
RoomPitBean roomPitBean1 = new RoomPitBean();
|
||||||
roomPitBean1.setUser_id(auctionUserBean.getUser_id());
|
roomPitBean1.setUser_id(auctionUserBean.getUser_id());
|
||||||
@@ -184,9 +186,17 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
|||||||
}
|
}
|
||||||
mBinding.ivJp.setVisibility(VISIBLE);
|
mBinding.ivJp.setVisibility(VISIBLE);
|
||||||
}
|
}
|
||||||
gengv();
|
|
||||||
auctionId = auctionUserBean.getAuction_id();
|
if (auctionUserBean.getAuction_id()!=null) {
|
||||||
SpUtil.setAuctionId(auctionId);
|
mBinding.ivJp.setVisibility(VISIBLE);
|
||||||
|
gengv();
|
||||||
|
auctionId = auctionUserBean.getAuction_id();
|
||||||
|
SpUtil.setAuctionId(auctionId);
|
||||||
|
}else {
|
||||||
|
SpUtil.setAuctionId("");
|
||||||
|
mBinding.ivJp.setVisibility(INVISIBLE);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
if (roomAuction.getAuction_list() != null && roomAuction.getAuction_list().size() > 0) {
|
if (roomAuction.getAuction_list() != null && roomAuction.getAuction_list().size() > 0) {
|
||||||
auctionList = roomAuction.getAuction_list();
|
auctionList = roomAuction.getAuction_list();
|
||||||
@@ -207,7 +217,7 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
|||||||
auctionId = "";
|
auctionId = "";
|
||||||
SpUtil.setAuctionId("");
|
SpUtil.setAuctionId("");
|
||||||
}
|
}
|
||||||
tzblChanged();
|
tzblChanged();//获取在线列表数据
|
||||||
RoomPitBean roomPitBean2 = wheatView.pitBean;
|
RoomPitBean roomPitBean2 = wheatView.pitBean;
|
||||||
if (roomPitBean2 != null && roomPitBean2.getUser_id() != null && !roomPitBean2.getUser_id().equals("0")) {
|
if (roomPitBean2 != null && roomPitBean2.getUser_id() != null && !roomPitBean2.getUser_id().equals("0")) {
|
||||||
if (roomPitBean2.getUser_id().equals(SpUtil.getUserId() + "")) {
|
if (roomPitBean2.getUser_id().equals(SpUtil.getUserId() + "")) {
|
||||||
@@ -359,10 +369,10 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
|||||||
RoomOnlineDialogFragment.show(roomInfoResp.getRoom_info().getRoom_id(), 888 + "", roomInfoResp.getUser_info(), roomInfoResp, getChildFragmentManager());
|
RoomOnlineDialogFragment.show(roomInfoResp.getRoom_info().getRoom_id(), 888 + "", roomInfoResp.getUser_info(), roomInfoResp, getChildFragmentManager());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (roomInfoResp.getRoom_auction().getAuction_user() != null) {
|
// if (roomInfoResp.getRoom_auction().getAuction_user() != null) {
|
||||||
|
|
||||||
RoomUserInfoFragment.show(roomInfoResp.getRoom_info().getRoom_id(), wheatView2.getUserId(), wheatView2.pitNumber, getHostUser(), false, 1, Integer.parseInt(roomInfoResp.getRoom_auction().getAuction_user().getAuction_id() != null ? roomInfoResp.getRoom_auction().getAuction_user().getAuction_id() : "0"), getChildFragmentManager());
|
RoomUserInfoFragment.show(roomInfoResp.getRoom_info().getRoom_id(), wheatView2.getUserId(), wheatView2.pitNumber, getHostUser(), false, 1, Integer.parseInt(roomInfoResp.getRoom_auction().getAuction_user().getAuction_id() != null ? roomInfoResp.getRoom_auction().getAuction_user().getAuction_id() : "0"), getChildFragmentManager());
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
} else if (id == R.id.im_action_js) {//延时
|
} else if (id == R.id.im_action_js) {//延时
|
||||||
MvpPre.auctionDelay(SpUtil.getauctionId());
|
MvpPre.auctionDelay(SpUtil.getauctionId());
|
||||||
@@ -1299,6 +1309,10 @@ public class RoomAuctionFragment extends BaseMvpFragment<RoomAuctionPresenterTow
|
|||||||
if (EventBus.getDefault().isRegistered(this)) {
|
if (EventBus.getDefault().isRegistered(this)) {
|
||||||
EventBus.getDefault().unregister(this);
|
EventBus.getDefault().unregister(this);
|
||||||
}
|
}
|
||||||
|
if (stub!=null) {
|
||||||
|
stub.setVisibility(GONE);
|
||||||
|
stub = null;
|
||||||
|
}
|
||||||
isButtonsInflated = false;
|
isButtonsInflated = false;
|
||||||
releaseCountDownTimer();
|
releaseCountDownTimer();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ import com.example.moduleroom.presenter.RoomChartsPresenter;
|
|||||||
import com.example.moduletablayout.listener.CustomTabEntity;
|
import com.example.moduletablayout.listener.CustomTabEntity;
|
||||||
import com.example.moduletablayout.listener.OnTabSelectListener;
|
import com.example.moduletablayout.listener.OnTabSelectListener;
|
||||||
import com.xscm.moduleutil.base.BaseMvpDialogFragment;
|
import com.xscm.moduleutil.base.BaseMvpDialogFragment;
|
||||||
|
import com.xscm.moduleutil.bean.room.RoomInfoResp;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
@@ -32,11 +33,13 @@ public class RoomChartsFragment extends BaseMvpDialogFragment<RoomChartsPresente
|
|||||||
public static final int TYPE_WEALTH = 2;//魅力榜
|
public static final int TYPE_WEALTH = 2;//魅力榜
|
||||||
private int type = TYPE_CHARM;
|
private int type = TYPE_CHARM;
|
||||||
private int childType = RankingChildFragment.TYPE_DATA;
|
private int childType = RankingChildFragment.TYPE_DATA;
|
||||||
|
private RoomInfoResp mRoomInfoResp;
|
||||||
|
|
||||||
public static RoomChartsFragment newInstance(String roomId) {
|
public static RoomChartsFragment newInstance(String roomId,RoomInfoResp roomInfoResp) {
|
||||||
RoomChartsFragment roomRankingFragment = new RoomChartsFragment();
|
RoomChartsFragment roomRankingFragment = new RoomChartsFragment();
|
||||||
Bundle bundle = new Bundle();
|
Bundle bundle = new Bundle();
|
||||||
bundle.putString("roomId", roomId);
|
bundle.putString("roomId", roomId);
|
||||||
|
bundle.putSerializable("roomInfoResp", roomInfoResp);
|
||||||
roomRankingFragment.setArguments(bundle);
|
roomRankingFragment.setArguments(bundle);
|
||||||
return roomRankingFragment;
|
return roomRankingFragment;
|
||||||
}
|
}
|
||||||
@@ -63,12 +66,13 @@ public class RoomChartsFragment extends BaseMvpDialogFragment<RoomChartsPresente
|
|||||||
public void onAttach(@NonNull Context context) {
|
public void onAttach(@NonNull Context context) {
|
||||||
super.onAttach(context);
|
super.onAttach(context);
|
||||||
mRoomId = getArguments().getString("roomId");
|
mRoomId = getArguments().getString("roomId");
|
||||||
|
mRoomInfoResp = (RoomInfoResp) getArguments().getSerializable("roomInfoResp");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void initData() {
|
protected void initData() {
|
||||||
|
|
||||||
FragmentUtils.add(getChildFragmentManager(), RankingChildFragment.newInstance(mRoomId, childType, type), R.id.fl_content);
|
FragmentUtils.add(getChildFragmentManager(), RankingChildFragment.newInstance(mRoomId, childType, type, mRoomInfoResp), R.id.fl_content);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -106,7 +110,7 @@ public class RoomChartsFragment extends BaseMvpDialogFragment<RoomChartsPresente
|
|||||||
mBinding.tvWealth.setOnClickListener(this::onViewClicked);
|
mBinding.tvWealth.setOnClickListener(this::onViewClicked);
|
||||||
}
|
}
|
||||||
private void refresh() {
|
private void refresh() {
|
||||||
FragmentUtils.replace(getChildFragmentManager(), RankingChildFragment.newInstance(mRoomId, childType, type), R.id.fl_content);
|
FragmentUtils.replace(getChildFragmentManager(), RankingChildFragment.newInstance(mRoomId, childType, type, mRoomInfoResp), R.id.fl_content);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class TabItem implements CustomTabEntity {
|
public static class TabItem implements CustomTabEntity {
|
||||||
|
|||||||
@@ -451,7 +451,7 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
|||||||
pitNumber = pitBean.getPit_number();
|
pitNumber = pitBean.getPit_number();
|
||||||
roomPitBean = pitBean;
|
roomPitBean = pitBean;
|
||||||
showPopupMenu(view); // v 是点击的按钮视图
|
showPopupMenu(view); // v 是点击的按钮视图
|
||||||
} else if (pitNumber1 == 10 && roomInfoResp.getUser_info().getPit_number() == 9) {
|
} else if (pitNumber1 == 10 && isUserHostOfRoom() ) {
|
||||||
RoomOnlineDialogFragment.show(roomId, pitNumber1 + "", roomInfoResp.getUser_info(), roomInfoResp, getChildFragmentManager());
|
RoomOnlineDialogFragment.show(roomId, pitNumber1 + "", roomInfoResp.getUser_info(), roomInfoResp, getChildFragmentManager());
|
||||||
} else if (pitNumber1 != 10) {
|
} else if (pitNumber1 != 10) {
|
||||||
MvpPre.applyPit(roomId, pitNumber1 + "");
|
MvpPre.applyPit(roomId, pitNumber1 + "");
|
||||||
@@ -504,6 +504,28 @@ public class SingSongFragment extends BaseRoomFragment<SingSongPresenter, Fragme
|
|||||||
mBinding.imMkf.setOnClickListener(this::onClick);
|
mBinding.imMkf.setOnClickListener(this::onClick);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 检查当前用户是否是房间的主持人
|
||||||
|
* @return true表示是主持人,false表示不是主持人或数据不完整
|
||||||
|
*/
|
||||||
|
private boolean isUserHostOfRoom() {
|
||||||
|
// 先检查列表是否为空或大小不足
|
||||||
|
if (ObjectUtils.isEmpty(roomInfoResp.getRoom_info().getPit_list()) ||
|
||||||
|
roomInfoResp.getRoom_info().getPit_list().size() < 10) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 检查第9个麦位(索引为8)的用户ID是否存在且与当前用户ID匹配
|
||||||
|
RoomPitBean hostPitBean = roomInfoResp.getRoom_info().getPit_list().get(8);
|
||||||
|
if (hostPitBean == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
String hostUserId = hostPitBean.getUser_id();
|
||||||
|
return hostUserId != null &&
|
||||||
|
!hostUserId.isEmpty() &&
|
||||||
|
hostUserId.equals(SpUtil.getUserId() + "");
|
||||||
|
}
|
||||||
|
|
||||||
public void onWheatClicked(View ii) {
|
public void onWheatClicked(View ii) {
|
||||||
RoomDefaultWheatView view = (RoomDefaultWheatView) ii;
|
RoomDefaultWheatView view = (RoomDefaultWheatView) ii;
|
||||||
|
|||||||
@@ -120,8 +120,8 @@
|
|||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
|
||||||
android:gravity="center_horizontal"
|
android:gravity="center_horizontal"
|
||||||
|
android:orientation="vertical"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent">
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|||||||
@@ -111,6 +111,17 @@
|
|||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/im_qml"
|
||||||
|
android:layout_width="@dimen/dp_66"
|
||||||
|
android:layout_height="@dimen/dp_20"
|
||||||
|
android:layout_marginStart="@dimen/dp_22"
|
||||||
|
android:layout_marginTop="@dimen/dp_25"
|
||||||
|
android:src="@mipmap/qgrml"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/kb" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/im_gs"
|
android:id="@+id/im_gs"
|
||||||
android:layout_width="@dimen/dp_66"
|
android:layout_width="@dimen/dp_66"
|
||||||
@@ -120,7 +131,24 @@
|
|||||||
android:src="@mipmap/gsui"
|
android:src="@mipmap/gsui"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/kb" />
|
app:layout_constraintTop_toBottomOf="@+id/im_qml"
|
||||||
|
tools:visibility="visible"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/im_qing"
|
||||||
|
android:layout_width="@dimen/dp_66"
|
||||||
|
android:layout_height="@dimen/dp_20"
|
||||||
|
android:layout_marginStart="@dimen/dp_22"
|
||||||
|
android:layout_marginTop="@dimen/dp_25"
|
||||||
|
android:src="@mipmap/gsui"
|
||||||
|
android:visibility="gone"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/kb"
|
||||||
|
/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/room_m_cz"
|
android:id="@+id/room_m_cz"
|
||||||
|
|||||||
@@ -179,6 +179,20 @@
|
|||||||
android:textSize="@dimen/sp_12" />
|
android:textSize="@dimen/sp_12" />
|
||||||
|
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_bb_qs"
|
||||||
|
android:layout_width="@dimen/dp_80"
|
||||||
|
android:layout_height="@dimen/dp_32"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:layout_toStartOf="@+id/ll_gift_num"
|
||||||
|
android:background="@drawable/bg_r53_0dffb9"
|
||||||
|
android:layout_marginEnd="@dimen/dp_8"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="一键全送"
|
||||||
|
android:textColor="#0DFFB9"
|
||||||
|
android:textSize="@dimen/sp_14" />
|
||||||
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/ll_gift_num"
|
android:id="@+id/ll_gift_num"
|
||||||
android:layout_width="@dimen/dp_100"
|
android:layout_width="@dimen/dp_100"
|
||||||
|
|||||||
@@ -224,7 +224,7 @@
|
|||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
<ViewStub
|
<ViewStub
|
||||||
android:id="@+id/stub_buttons"
|
android:id="@+id/stub_buttons2"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignParentEnd="true"
|
android:layout_alignParentEnd="true"
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
<com.xscm.moduleutil.widget.CustomTopBar
|
<com.xscm.moduleutil.widget.CustomTopBar
|
||||||
android:id="@+id/top_bar"
|
android:id="@+id/top_bar"
|
||||||
@@ -242,9 +242,9 @@
|
|||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
<androidx.core.widget.NestedScrollView
|
<!-- <androidx.core.widget.NestedScrollView-->
|
||||||
android:layout_width="match_parent"
|
<!-- android:layout_width="match_parent"-->
|
||||||
android:layout_height="wrap_content">
|
<!-- android:layout_height="match_parent">-->
|
||||||
|
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
@@ -254,7 +254,7 @@
|
|||||||
android:layout_marginStart="@dimen/dp_16"
|
android:layout_marginStart="@dimen/dp_16"
|
||||||
android:layout_marginTop="@dimen/dp_6"
|
android:layout_marginTop="@dimen/dp_6"
|
||||||
android:layout_marginEnd="@dimen/dp_16" />
|
android:layout_marginEnd="@dimen/dp_16" />
|
||||||
</androidx.core.widget.NestedScrollView>
|
<!-- </androidx.core.widget.NestedScrollView>-->
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<com.xscm.moduleutil.widget.GifAvatarOvalView
|
<com.xscm.moduleutil.widget.GifAvatarOvalView
|
||||||
|
|||||||
@@ -74,6 +74,14 @@
|
|||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
app:srlEnableLoadMore="true"
|
app:srlEnableLoadMore="true"
|
||||||
app:srlEnableRefresh="true">
|
app:srlEnableRefresh="true">
|
||||||
|
<androidx.core.widget.NestedScrollView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/revenue_view"
|
android:id="@+id/revenue_view"
|
||||||
@@ -87,12 +95,14 @@
|
|||||||
android:background="@color/color_FFF5F5F5"
|
android:background="@color/color_FFF5F5F5"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
tools:listitem="@layout/item_revenue" />
|
tools:listitem="@layout/item_revenue" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp_45"/>
|
||||||
|
</LinearLayout>
|
||||||
|
</androidx.core.widget.NestedScrollView>
|
||||||
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
|
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="@dimen/dp_30"
|
|
||||||
android:background="@color/transparent" />
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</layout>
|
</layout>
|
||||||
@@ -87,25 +87,23 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center_horizontal"
|
android:layout_gravity="center_horizontal"
|
||||||
android:gravity="center_horizontal"
|
android:paddingEnd="@dimen/dp_1"
|
||||||
>
|
android:gravity="center_horizontal">
|
||||||
|
|
||||||
<com.xscm.moduleutil.widget.GifAvatarOvalView
|
<com.xscm.moduleutil.widget.GifAvatarOvalView
|
||||||
android:id="@+id/im_user2"
|
android:id="@+id/im_user2"
|
||||||
android:layout_width="@dimen/dp_44"
|
android:layout_width="@dimen/dp_44"
|
||||||
android:layout_height="@dimen/dp_44"
|
android:layout_height="@dimen/dp_44"
|
||||||
android:src="@mipmap/ic_launcher"
|
android:layout_centerInParent="true"
|
||||||
android:layout_marginStart="@dimen/dp_10"
|
android:src="@mipmap/ic_launcher"
|
||||||
android:layout_marginTop="@dimen/dp_12"
|
|
||||||
app:riv_oval="true" />
|
app:riv_oval="true" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="@dimen/dp_50"
|
android:layout_width="@dimen/dp_55"
|
||||||
android:layout_height="@dimen/dp_50"
|
android:layout_height="@dimen/dp_55"
|
||||||
android:layout_gravity="center_horizontal"
|
android:layout_centerInParent="true"
|
||||||
android:background="@mipmap/huangg2"
|
android:background="@mipmap/huangg2"
|
||||||
android:layout_marginStart="@dimen/dp_8"
|
android:scaleType="fitCenter" />
|
||||||
android:layout_marginTop="@dimen/dp_10" />
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
@@ -218,30 +216,31 @@
|
|||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:src="@mipmap/guanb1" />
|
android:src="@mipmap/guanb1" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/r_1_1"
|
android:id="@+id/r_1_1"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center|top"
|
android:layout_gravity="center_horizontal"
|
||||||
android:gravity="center"
|
android:paddingEnd="@dimen/dp_1"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
>
|
>
|
||||||
|
|
||||||
<com.xscm.moduleutil.widget.GifAvatarOvalView
|
<com.xscm.moduleutil.widget.GifAvatarOvalView
|
||||||
android:id="@+id/im_user1"
|
android:id="@+id/im_user1"
|
||||||
android:layout_width="@dimen/dp_44"
|
android:layout_width="@dimen/dp_44"
|
||||||
android:layout_height="@dimen/dp_44"
|
android:layout_height="@dimen/dp_44"
|
||||||
android:src="@mipmap/ic_launcher"
|
android:layout_centerInParent="true"
|
||||||
android:layout_marginStart="@dimen/dp_10"
|
android:src="@mipmap/ic_launcher"
|
||||||
android:layout_marginTop="@dimen/dp_12"
|
|
||||||
app:riv_oval="true" />
|
app:riv_oval="true" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/im1"
|
android:id="@+id/im1"
|
||||||
android:layout_width="@dimen/dp_50"
|
android:layout_width="@dimen/dp_55"
|
||||||
android:layout_height="@dimen/dp_50"
|
android:layout_height="@dimen/dp_55"
|
||||||
android:layout_gravity="center_horizontal|top|center"
|
android:layout_centerInParent="true"
|
||||||
android:layout_marginStart="@dimen/dp_8"
|
android:scaleType="fitCenter"
|
||||||
android:layout_marginTop="@dimen/dp_10"
|
|
||||||
android:src="@mipmap/huangg1" />
|
android:src="@mipmap/huangg1" />
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
@@ -350,12 +349,14 @@
|
|||||||
android:scaleType="centerCrop"
|
android:scaleType="centerCrop"
|
||||||
android:src="@mipmap/guanb3" />
|
android:src="@mipmap/guanb3" />
|
||||||
|
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/r_3_1"
|
android:id="@+id/r_3_1"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center|top"
|
android:layout_gravity="center_horizontal"
|
||||||
android:gravity="center"
|
android:paddingEnd="@dimen/dp_1"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
|
||||||
>
|
>
|
||||||
|
|
||||||
@@ -363,19 +364,16 @@
|
|||||||
android:id="@+id/im_user3"
|
android:id="@+id/im_user3"
|
||||||
android:layout_width="@dimen/dp_44"
|
android:layout_width="@dimen/dp_44"
|
||||||
android:layout_height="@dimen/dp_44"
|
android:layout_height="@dimen/dp_44"
|
||||||
android:src="@mipmap/ic_launcher"
|
android:layout_centerInParent="true"
|
||||||
android:layout_marginStart="@dimen/dp_17"
|
android:src="@mipmap/ic_launcher"
|
||||||
android:layout_marginTop="@dimen/dp_12"
|
app:riv_oval="true"/>
|
||||||
app:riv_oval="true" />
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="@dimen/dp_50"
|
android:layout_width="@dimen/dp_50"
|
||||||
android:layout_height="@dimen/dp_50"
|
android:layout_height="@dimen/dp_50"
|
||||||
android:layout_gravity="center_horizontal"
|
android:layout_centerInParent="true"
|
||||||
android:src="@mipmap/huangg3"
|
android:src="@mipmap/huangg3"
|
||||||
android:layout_marginStart="@dimen/dp_15"
|
android:scaleType="fitCenter"/>
|
||||||
android:layout_marginTop="@dimen/dp_10"
|
|
||||||
android:layout_marginEnd="@dimen/dp_5"/>
|
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
@@ -398,7 +396,7 @@
|
|||||||
android:layout_marginTop="@dimen/dp_10"
|
android:layout_marginTop="@dimen/dp_10"
|
||||||
android:layout_marginBottom="10dp"
|
android:layout_marginBottom="10dp"
|
||||||
android:rotation="-20"
|
android:rotation="-20"
|
||||||
android:src="@mipmap/ic_launcher" />
|
tools:src="@mipmap/ic_launcher" />
|
||||||
|
|
||||||
<com.xscm.moduleutil.widget.GifAvatarOvalView
|
<com.xscm.moduleutil.widget.GifAvatarOvalView
|
||||||
android:id="@+id/iv_three_cp2_head"
|
android:id="@+id/iv_three_cp2_head"
|
||||||
@@ -410,7 +408,7 @@
|
|||||||
android:layout_marginBottom="10dp"
|
android:layout_marginBottom="10dp"
|
||||||
android:layout_toEndOf="@+id/iv_three_cp1_head"
|
android:layout_toEndOf="@+id/iv_three_cp1_head"
|
||||||
android:rotation="20"
|
android:rotation="20"
|
||||||
android:src="@mipmap/ic_launcher" />
|
tools:src="@mipmap/ic_launcher" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="@dimen/dp_98"
|
android:layout_width="@dimen/dp_98"
|
||||||
@@ -818,7 +816,7 @@
|
|||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
tools:ignore="MissingConstraints"
|
tools:ignore="MissingConstraints"
|
||||||
android:visibility="gone">
|
>
|
||||||
|
|
||||||
|
|
||||||
<com.xscm.moduleutil.widget.GifAvatarOvalView
|
<com.xscm.moduleutil.widget.GifAvatarOvalView
|
||||||
@@ -873,27 +871,30 @@
|
|||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
tools:ignore="MissingConstraints">
|
tools:ignore="MissingConstraints"
|
||||||
|
android:visibility="gone">
|
||||||
|
|
||||||
<com.xscm.moduleutil.widget.GifAvatarOvalView
|
<com.xscm.moduleutil.widget.GifAvatarOvalView
|
||||||
android:id="@+id/iv_my_cp1_head"
|
android:id="@+id/iv_my_cp1_head"
|
||||||
android:layout_width="@dimen/dp_30"
|
android:layout_width="@dimen/dp_30"
|
||||||
android:layout_height="@dimen/dp_30"
|
android:layout_height="@dimen/dp_30"
|
||||||
android:src="@mipmap/ic_launcher" />
|
android:src="@mipmap/ic_launcher"
|
||||||
|
android:scaleType="fitCenter"/>
|
||||||
|
|
||||||
<com.xscm.moduleutil.widget.GifAvatarOvalView
|
<com.xscm.moduleutil.widget.GifAvatarOvalView
|
||||||
android:id="@+id/iv_my_cp2_head"
|
android:id="@+id/iv_my_cp2_head"
|
||||||
android:layout_width="@dimen/dp_30"
|
android:layout_width="@dimen/dp_30"
|
||||||
android:layout_height="@dimen/dp_30"
|
android:layout_height="@dimen/dp_30"
|
||||||
android:layout_toEndOf="@+id/iv_my_cp1_head"
|
android:layout_toEndOf="@+id/iv_my_cp1_head"
|
||||||
android:src="@mipmap/ic_launcher" />
|
android:src="@mipmap/ic_launcher"
|
||||||
|
android:scaleType="fitCenter"/>
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/v_my_cp1_head"
|
android:id="@+id/v_my_cp1_head"
|
||||||
android:layout_width="@dimen/dp_60"
|
android:layout_width="@dimen/dp_60"
|
||||||
android:layout_height="@dimen/dp_35"
|
android:layout_height="@dimen/dp_30"
|
||||||
android:paddingBottom="@dimen/dp_7"
|
|
||||||
android:src="@mipmap/cp_pt"
|
android:src="@mipmap/cp_pt"
|
||||||
|
android:scaleType="fitCenter"
|
||||||
android:visibility="visible" />
|
android:visibility="visible" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
|||||||
Reference in New Issue
Block a user