From 1f3acf4c29f367e40a3f589b51176ed24e28948f Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期二, 02 九月 2025 17:54:42 +0800
Subject: [PATCH] 2025年09月02日17:54:39
---
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