From 50f3ca027bdb84d7ffe45b7b1826fefcdc37fab9 Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期一, 09 十二月 2024 16:48:52 +0800
Subject: [PATCH] 2024年12月09日16:48:50
---
app/src/main/java/com/hdl/photovoltaic/other/HdlThreadLogic.java | 20 ++++++++++++++------
1 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/app/src/main/java/com/hdl/photovoltaic/other/HdlThreadLogic.java b/app/src/main/java/com/hdl/photovoltaic/other/HdlThreadLogic.java
index dd6dbfa..2acd26f 100644
--- a/app/src/main/java/com/hdl/photovoltaic/other/HdlThreadLogic.java
+++ b/app/src/main/java/com/hdl/photovoltaic/other/HdlThreadLogic.java
@@ -15,6 +15,7 @@
import com.hdl.photovoltaic.widget.ConfirmationCancelDialog;
import com.hdl.photovoltaic.widget.ConfirmationExceptionDialog;
import com.hdl.photovoltaic.widget.FlashingBoxDialog;
+import com.hdl.photovoltaic.widget.FlashingIconBoxDialog;
/**
* 绾跨▼閫昏緫
@@ -110,6 +111,9 @@
handler.post(new Runnable() {
@Override
public void run() {
+// FlashingBoxDialog flashingIconBoxDialog = new FlashingBoxDialog(context, 1500);
+// flashingIconBoxDialog.setContent(text);
+// flashingIconBoxDialog.show();
Toast.makeText(context, text, Toast.LENGTH_SHORT).show();
}
});
@@ -122,6 +126,9 @@
handler.post(new Runnable() {
@Override
public void run() {
+// FlashingBoxDialog flashingIconBoxDialog = new FlashingBoxDialog(context, 1500);
+// flashingIconBoxDialog.setContent(hdlException.getMsg() + "(" + hdlException.getCode() + ")");
+// flashingIconBoxDialog.show();
Toast.makeText(context, hdlException.getMsg() + "(" + hdlException.getCode() + ")", Toast.LENGTH_SHORT).show();
}
});
@@ -134,6 +141,7 @@
handler.post(new Runnable() {
@Override
public void run() {
+
Toast.makeText(context, resId, Toast.LENGTH_SHORT).show();
}
});
@@ -166,21 +174,21 @@
HdlThreadLogic.runMainThread(new Runnable() {
@Override
public void run() {
- FlashingBoxDialog flashingBoxDialog = new FlashingBoxDialog(context, millisecond);
+ FlashingIconBoxDialog flashingIconBoxDialog = new FlashingIconBoxDialog(context, millisecond);
if (isBoolean) {
Drawable drawable = AppCompatResources.getDrawable(context, R.drawable.tip_succeed);
- flashingBoxDialog.setImage(drawable);
+ flashingIconBoxDialog.setImage(drawable);
} else {
Drawable drawable = AppCompatResources.getDrawable(context, R.drawable.tip_fail);
- flashingBoxDialog.setImage(drawable);
+ flashingIconBoxDialog.setImage(drawable);
}
if (code == 0) {
//鎴愬姛涓嶉渶瑕佸鍔犵姸鎬佺爜
- flashingBoxDialog.setContent(msg);
+ flashingIconBoxDialog.setContent(msg);
} else {
- flashingBoxDialog.setContent(msg + "(" + code + ")");
+ flashingIconBoxDialog.setContent(msg + "(" + code + ")");
}
- flashingBoxDialog.show();
+ flashingIconBoxDialog.show();
}
}, null, null);
}
--
Gitblit v1.8.0