lmw
2024-09-04 a3bc6aa4fa3bad787c9fc366d6904f60265eec3b
app/src/main/java/com/lotaai/canguiayw/OpenDoorFragment.java
@@ -26,6 +26,7 @@
import com.lotaai.canguiayw.device.DeviceType;
import com.lotaai.canguiayw.device.MessageType;
import com.lotaai.canguiayw.view.GridTableAdapter;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;
@@ -53,7 +54,7 @@
    private Button fugui004;
    private Button fugui005;
    private int cureentSelectGui =0;
    private boolean isCanRun = true;
    private boolean isCanRun = false;
    @Override
@@ -91,7 +92,7 @@
        initView();
        intitSwitch();
        initButton();
        SettingConfig.getInstance().getExecutor().execute(syncRunnable);
       // SettingConfig.getInstance().getExecutor().execute(syncRunnable);
        return root;
    }
@@ -162,6 +163,11 @@
                cancelAllBtn();
                zhugui.setBackgroundColor(getResources().getColor(R.color.cheng));
                cureentSelectGui = 0;
               /* CanguiStatus cangui =new CanguiStatus();
                cangui.setGuiHao(8);
                cangui.setGridNo(88);
                ((CunOjbActivity) getActivity()).setData(cangui);*/
            }
        });
@@ -171,6 +177,7 @@
                cancelAllBtn();
                fugui001.setBackgroundColor(getResources().getColor(R.color.cheng));
                cureentSelectGui = 1;
                initView();
            }
        });
@@ -180,6 +187,8 @@
                cancelAllBtn();
                fugui002.setBackgroundColor(getResources().getColor(R.color.cheng));
                cureentSelectGui = 2;
                initView();
            }
        });
@@ -189,6 +198,8 @@
                cancelAllBtn();
                fugui003.setBackgroundColor(getResources().getColor(R.color.cheng));
                cureentSelectGui = 3;
                initView();
            }
        });
@@ -198,6 +209,8 @@
                cancelAllBtn();
                fugui004.setBackgroundColor(getResources().getColor(R.color.cheng));
                cureentSelectGui = 4;
                initView();
            }
        });
@@ -207,6 +220,8 @@
                cancelAllBtn();
                fugui005.setBackgroundColor(getResources().getColor(R.color.cheng));
                cureentSelectGui = 5;
                initView();
            }
        });
    }
@@ -344,18 +359,19 @@
            @Override
            public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
                CanguiStatus cangui = gridStatusList.get(i);
                View item = gridtable.getChildAt(i).findViewById(R.id.gridLineLayout);
                ((CunOjbActivity) getActivity()).setData(cangui);
               /* View item = gridtable.getChildAt(i).findViewById(R.id.gridLineLayout);
                if (checkIsSelectedAndOrRemove(cangui,true)) {
                    item.setBackgroundColor(Color.GRAY);
                } else {
                    item.setBackgroundColor(getResources().getColor(R.color.cheng));
                }
                }*/
            }
        });
    }
    /**
     *
     * @param status
     * @param isControl  是否从控制删除和添加,选中变不选,不选变选
     * @return