From 4c111f5659d7e8872ad91316127326de9a9f6162 Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期二, 03 十二月 2024 14:41:35 +0800
Subject: [PATCH] 2024年12月03日14:41:31
---
app/src/main/java/com/hdl/photovoltaic/other/HdlThreadLogic.java | 19 ++++++++++++-------
1 files changed, 12 insertions(+), 7 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 01b396c..b311b03 100644
--- a/app/src/main/java/com/hdl/photovoltaic/other/HdlThreadLogic.java
+++ b/app/src/main/java/com/hdl/photovoltaic/other/HdlThreadLogic.java
@@ -14,7 +14,7 @@
import com.hdl.photovoltaic.enums.ShowErrorMode;
import com.hdl.photovoltaic.widget.ConfirmationCancelDialog;
import com.hdl.photovoltaic.widget.ConfirmationExceptionDialog;
-import com.hdl.photovoltaic.widget.FlashingBoxDialog;
+import com.hdl.photovoltaic.widget.FlashingIconBoxDialog;
/**
* 绾跨▼閫昏緫
@@ -166,16 +166,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);
}
- flashingBoxDialog.setContent(msg + "(" + code + ")");
- flashingBoxDialog.show();
+ if (code == 0) {
+ //鎴愬姛涓嶉渶瑕佸鍔犵姸鎬佺爜
+ flashingIconBoxDialog.setContent(msg);
+ } else {
+ flashingIconBoxDialog.setContent(msg + "(" + code + ")");
+ }
+ flashingIconBoxDialog.show();
}
}, null, null);
}
@@ -229,7 +234,7 @@
* @return 璋冪敤鏍�
*/
private static String getStackTrace(Exception ex) {
- StringBuilder sb = new StringBuilder("");
+ StringBuilder sb = new StringBuilder();
StackTraceElement[] trace = ex.getStackTrace();
for (StackTraceElement stackTraceElement : trace) {
sb.append(stackTraceElement).append("\n");
--
Gitblit v1.8.0