From 8b43d4e1190fc9e2261be0579e53cc6c2987f946 Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期四, 27 十一月 2025 19:37:56 +0800
Subject: [PATCH] 2025年11月27日19:37:50 备份代码
---
app/src/main/java/com/hdl/photovoltaic/widget/DefaultFilteringDialog.java | 40 +++++++++++++++++++++++++---------------
1 files changed, 25 insertions(+), 15 deletions(-)
diff --git a/app/src/main/java/com/hdl/photovoltaic/widget/DefaultFilteringDialog.java b/app/src/main/java/com/hdl/photovoltaic/widget/DefaultFilteringDialog.java
index 77e8617..e1e891a 100644
--- a/app/src/main/java/com/hdl/photovoltaic/widget/DefaultFilteringDialog.java
+++ b/app/src/main/java/com/hdl/photovoltaic/widget/DefaultFilteringDialog.java
@@ -44,21 +44,21 @@
private String mStateValue = GridType.All;
public DefaultFilteringDialog(@NonNull Context context) {
- super(context, R.style.DefaultFilteringDialog);
+ super(context, R.style.Custom_Dialog);
this.mContext = context;
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
+ viewBinding = DialogDefaultFilteringBinding.inflate(getLayoutInflater());
+ setContentView(viewBinding.getRoot());
Window window = getWindow();
if (window != null) {
window.setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
window.setGravity(Gravity.BOTTOM);
}
- viewBinding = DialogDefaultFilteringBinding.inflate(getLayoutInflater());
- setContentView(viewBinding.getRoot());
-
+// setCanceledOnTouchOutside(false);
//鍒濆鍖栫晫闈㈡帶浠�
initView();
//鍒濆鍖栫晫闈㈡暟鎹�
@@ -89,7 +89,7 @@
}
}
} catch (Exception e) {
- //寮哄埗杞崲鍥犺緭鍏ュ�艰秴鍑篿nt鍊煎煙鑼冨洿鎶ュ嚭寮傚父
+// //寮哄埗杞崲鍥犺緭鍏ュ�艰秴鍑篿nt鍊煎煙鑼冨洿鎶ュ嚭寮傚父
int maxValueInt = Integer.MAX_VALUE;
HdlThreadLogic.toast(mContext, mContext.getString(R.string.the_input_value_has_been_exceeded) + "(" + maxValueInt + ").");
return;
@@ -315,16 +315,26 @@
break;
}
}
- if (TextUtils.isEmpty(DebugStatus.All)) {
- setBackgroundColor(viewBinding.allTv, TitleType.debuggingState);
- } else if (stateValue.equals(DebugStatus.Debugging)) {
- setBackgroundColor(viewBinding.beDebuggingTv, TitleType.debuggingState);
- } else if (stateValue.equals(DebugStatus.WAIT_DELIVERED)) {
- setBackgroundColor(viewBinding.debuggingcOmpletedTv, TitleType.debuggingState);
- } else if (stateValue.equals(DebugStatus.Delivered)) {
- setBackgroundColor(viewBinding.deliveredTv, TitleType.debuggingState);
- } else if (stateValue.equals(DebugStatus.SECONDARY_DEBUGGIN)) {
- setBackgroundColor(viewBinding.authorizationDebuggingTv, TitleType.debuggingState);
+ switch (stateValue) {
+ case DebugStatus.All:
+ setBackgroundColor(viewBinding.allTv, TitleType.debuggingState);
+ break;
+ case DebugStatus.Debugging:
+ setBackgroundColor(viewBinding.beDebuggingTv, TitleType.debuggingState);
+ break;
+ case DebugStatus.WAIT_DELIVERED:
+ setBackgroundColor(viewBinding.debuggingcOmpletedTv, TitleType.debuggingState);
+ break;
+ case DebugStatus.Delivered:
+ setBackgroundColor(viewBinding.deliveredTv, TitleType.debuggingState);
+ break;
+ case DebugStatus.SECONDARY_DEBUGGIN:
+ setBackgroundColor(viewBinding.authorizationDebuggingTv, TitleType.debuggingState);
+ break;
+ default: {
+ setBackgroundColor(viewBinding.allTv, TitleType.debuggingState);
+ break;
+ }
}
} catch (Exception ignored) {
}
--
Gitblit v1.8.0