wjc
2025-05-07 5d3efa4c93dde0cde474951e5310bb72ebbf4184
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) {
        }