From 8e8ea8be5c20c37a5619691701aa5f3bf814b941 Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期五, 23 五月 2025 14:17:26 +0800
Subject: [PATCH] 2025年05月23日14:17:24

---
 app/src/main/java/com/hdl/photovoltaic/widget/DefaultFilteringDialog.java |   38 ++++++++++++++++++++++++--------------
 1 files changed, 24 insertions(+), 14 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..8090819 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();
         //鍒濆鍖栫晫闈㈡暟鎹�
@@ -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