| | |
| | | private RelativeLayout rlDeviceDetail;
|
| | | private RelativeLayout rlDetailVersion;
|
| | | private RelativeLayout rlDeployment;
|
| | | // private RelativeLayout rlDetele;
|
| | | private RelativeLayout rlDetele;
|
| | | private TextView tvDeviceName;
|
| | | private ImageView ivDevicePic;
|
| | | private TextView tvDeviceVersion;
|
| | |
| | | rlDetailVersion = view.findViewById(R.id.rl_detail_version);
|
| | | rlDeployment = view.findViewById(R.id.rl_deployment);
|
| | | tvDeploymentTip = view.findViewById(R.id.tv_deployment_tip);
|
| | | // rlDetele = view.findViewById(R.id.rl_detele);
|
| | | rlDetele = view.findViewById(R.id.rl_detele);
|
| | | tvDeviceName = view.findViewById(R.id.tv_device_name);
|
| | | ivDevicePic = view.findViewById(R.id.iv_device_pic);
|
| | | tvDeviceVersion = view.findViewById(R.id.tv_device_version);
|
| | |
| | | rlCurWifi = view.findViewById(R.id.rl_cur_wifi);
|
| | |
|
| | | rlDeployment.setOnClickListener(this);
|
| | | // rlDetele.setOnClickListener(this);
|
| | | rlDetele.setOnClickListener(this);
|
| | | rlDeviceDetail.setOnClickListener(this);
|
| | | rlCurWifi.setOnClickListener(this);
|
| | | DeviceDetailActivity deviceDetailActivity = (DeviceDetailActivity) getActivity();
|
| | |
| | | getDeviceLocalCache();
|
| | | rlDetailVersion.setVisibility(View.GONE);
|
| | | rlCurWifi.setVisibility(View.GONE);
|
| | | // rlDetele.setVisibility(View.GONE);
|
| | | rlDetele.setVisibility(View.GONE);
|
| | | }
|
| | | } else if (deviceListBean.channels!=null&&deviceListBean.channels.size() == 1) {
|
| | | //单通道
|
| | |
| | | getDeviceLocalCache();
|
| | | tvDeviceVersion.setText(deviceListBean.version);
|
| | | if (deviceListBean.deviceSource == 2) {
|
| | | // rlDetele.setVisibility(View.GONE);
|
| | | rlDetele.setVisibility(View.GONE);
|
| | | }
|
| | | rlCurWifi.setVisibility(View.VISIBLE);
|
| | | //设备才能获取WIFI
|
| | |
| | | gotoDeploymentPage(getActivity());
|
| | | } else if (id == R.id.rl_detail_version) {
|
| | | gotoUpdatePage(getActivity());
|
| | | // } else if (id == R.id.rl_detele) {
|
| | | // //解绑设备
|
| | | // deviceDetailActivity.rlLoading.setVisibility(View.VISIBLE);
|
| | | // DeviceDetailService deviceDetailService = ClassInstanceManager.newInstance().getDeviceDetailService();
|
| | | // /* DeviceUnBindData deviceUnBindData = new DeviceUnBindData();
|
| | | // deviceUnBindData.data.deviceId = deviceListBean.deviceId;
|
| | | // deviceDetailService.unBindDevice(deviceUnBindData, this);*/
|
| | | // deviceDetailService.deletePermission(deviceListBean.deviceId,null,this);
|
| | | } else if (id == R.id.rl_detele) {
|
| | | //解绑设备
|
| | | deviceDetailActivity.rlLoading.setVisibility(View.VISIBLE);
|
| | | DeviceDetailService deviceDetailService = ClassInstanceManager.newInstance().getDeviceDetailService();
|
| | | /* DeviceUnBindData deviceUnBindData = new DeviceUnBindData();
|
| | | deviceUnBindData.data.deviceId = deviceListBean.deviceId;
|
| | | deviceDetailService.unBindDevice(deviceUnBindData, this);*/
|
| | | deviceDetailService.deletePermission(deviceListBean.deviceId,null,this);
|
| | | }
|
| | | }
|
| | |
|