修改MQTT使用方式

修改bug
修改盲盒布局
This commit is contained in:
2025-09-04 01:10:07 +08:00
parent c90b44ebf6
commit 830913e001
78 changed files with 1027 additions and 322 deletions

View File

@@ -159,7 +159,7 @@ public class GiftLotteryDialog extends BaseMvpDialogFragment<GiftLotteryPresente
requireActivity().getWindowManager().getDefaultDisplay().getMetrics(displayMetrics);
int screenHeight = displayMetrics.heightPixels;
// 设置高度为屏幕高度的100%(全屏)
int heightInPx = (int) (screenHeight * 0.9);
int heightInPx = (int) (screenHeight * 0.79);
;
window.setLayout(ViewGroup.LayoutParams.MATCH_PARENT, heightInPx);
window.setBackgroundDrawableResource(android.R.color.transparent);
@@ -304,6 +304,7 @@ public class GiftLotteryDialog extends BaseMvpDialogFragment<GiftLotteryPresente
int id = view.getId();
if (id == R.id.ll_one) {
if (!isDrawing) {
isDrawing=true;
init(1);
startType = 1;
MvpPre.drawGiftList(giftBagId, userIds, roomId, "1");
@@ -313,14 +314,17 @@ public class GiftLotteryDialog extends BaseMvpDialogFragment<GiftLotteryPresente
}
} else if (id == R.id.ll_ten) {
if (!isDrawing) {
isDrawing=true;
init(2);
startType = 2;
MvpPre.drawGiftList(giftBagId, userIds, roomId, "10");
} else {
com.hjq.toast.ToastUtils.show("正在抽奖中...");
}
} else if (id == R.id.ll_hundred) {//抽奖100次
if (!isDrawing) {
isDrawing=true;
init(3);
startType = 3;
MvpPre.drawGiftList(giftBagId, userIds, roomId, "100");
@@ -504,6 +508,7 @@ public class GiftLotteryDialog extends BaseMvpDialogFragment<GiftLotteryPresente
MvpPre.giftSend(blind_box_turntable_id);
MvpPre.wallet();
isDrawing = false;
stopFastAnimate();
return;
}
@@ -524,7 +529,7 @@ public class GiftLotteryDialog extends BaseMvpDialogFragment<GiftLotteryPresente
}
public void stopFastAnimate() {
isDrawing = false;
if (handler != null) {
// 移除特定的 Runnable更精确
if (timerRunnable != null) {
@@ -719,7 +724,7 @@ public class GiftLotteryDialog extends BaseMvpDialogFragment<GiftLotteryPresente
playSound("draw.mp3");
// 不要设置isDrawing=true这会影响动画控制
MvpPre.wallet();
isDrawing=false;
MvpPre.giftSend(blind_box_turntable_id);
}
giftCardView.bindGiftData(giftBean);
@@ -731,6 +736,7 @@ public class GiftLotteryDialog extends BaseMvpDialogFragment<GiftLotteryPresente
startFastAnimate();
}
}
}
@Override