| | |
| | | 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; |
| | |
| | | private Button fugui004; |
| | | private Button fugui005; |
| | | private int cureentSelectGui =0; |
| | | private boolean isCanRun = true; |
| | | private boolean isCanRun = false; |
| | | |
| | | |
| | | @Override |
| | |
| | | initView(); |
| | | intitSwitch(); |
| | | initButton(); |
| | | SettingConfig.getInstance().getExecutor().execute(syncRunnable); |
| | | // SettingConfig.getInstance().getExecutor().execute(syncRunnable); |
| | | return root; |
| | | } |
| | | |
| | |
| | | cancelAllBtn(); |
| | | zhugui.setBackgroundColor(getResources().getColor(R.color.cheng)); |
| | | cureentSelectGui = 0; |
| | | |
| | | /* CanguiStatus cangui =new CanguiStatus(); |
| | | cangui.setGuiHao(8); |
| | | cangui.setGridNo(88); |
| | | ((CunOjbActivity) getActivity()).setData(cangui);*/ |
| | | } |
| | | }); |
| | | |
| | |
| | | cancelAllBtn(); |
| | | fugui001.setBackgroundColor(getResources().getColor(R.color.cheng)); |
| | | cureentSelectGui = 1; |
| | | initView(); |
| | | } |
| | | }); |
| | | |
| | |
| | | cancelAllBtn(); |
| | | fugui002.setBackgroundColor(getResources().getColor(R.color.cheng)); |
| | | cureentSelectGui = 2; |
| | | |
| | | initView(); |
| | | } |
| | | }); |
| | | |
| | |
| | | cancelAllBtn(); |
| | | fugui003.setBackgroundColor(getResources().getColor(R.color.cheng)); |
| | | cureentSelectGui = 3; |
| | | |
| | | initView(); |
| | | } |
| | | }); |
| | | |
| | |
| | | cancelAllBtn(); |
| | | fugui004.setBackgroundColor(getResources().getColor(R.color.cheng)); |
| | | cureentSelectGui = 4; |
| | | |
| | | initView(); |
| | | } |
| | | }); |
| | | |
| | |
| | | cancelAllBtn(); |
| | | fugui005.setBackgroundColor(getResources().getColor(R.color.cheng)); |
| | | cureentSelectGui = 5; |
| | | |
| | | initView(); |
| | | } |
| | | }); |
| | | } |
| | |
| | | @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 |