排程编辑更新
This commit is contained in:
@@ -42,10 +42,10 @@ public class BindDeviceFragment extends BaseFragment<PlanBindDeviceLayoutBinding
|
||||
@Override
|
||||
public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
|
||||
mAdapter.toggleSelection(position);
|
||||
if(mDeviceList.get(position).getStatusX().equals("0")){
|
||||
mDeviceList.get(position).setStatusX("1");
|
||||
if(mDeviceList.get(position).getStatus().equals("0")){
|
||||
mDeviceList.get(position).setStatus("1");
|
||||
}else{
|
||||
mDeviceList.get(position).setStatusX("0");
|
||||
mDeviceList.get(position).setStatus("0");
|
||||
}
|
||||
// syncSelectedDevices();
|
||||
}
|
||||
|
||||
@@ -27,8 +27,8 @@ public class BindDeviceAdapter extends BaseQuickAdapter<WaterDeviceEntity.Device
|
||||
@Override
|
||||
protected void convert(BaseViewHolder helper, WaterDeviceEntity.DeviceListBean item) {
|
||||
CheckBox checkBox = helper.getView(R.id.radio);
|
||||
helper.setText(R.id.tv_device_name, item.getDeviceNameX());
|
||||
helper.setText(R.id.tv_device_serial, item.getDeviceSnX());
|
||||
helper.setText(R.id.tv_device_name, item.getDeviceName());
|
||||
helper.setText(R.id.tv_device_serial, item.getDeviceSn());
|
||||
checkBox.setChecked(mSelectedPositions.contains(helper.getLayoutPosition()));
|
||||
}
|
||||
|
||||
|
||||
@@ -144,13 +144,13 @@ public class WaterPlanImpl implements WaterPlanContract.DataModel{
|
||||
.subscribeOn(Schedulers.io())
|
||||
.unsubscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<BaseBean<WaterDeviceEntity.DeviceListBean>>() {
|
||||
.subscribe(new Observer<BaseBean<WaterDeviceEntity>>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull BaseBean<WaterDeviceEntity.DeviceListBean> bean) {
|
||||
public void onNext(@NonNull BaseBean<WaterDeviceEntity> bean) {
|
||||
if (bean.getCode() == 200) {
|
||||
callBack.success(bean.getData(),0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user