| | |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void onBackPressed() { |
| | | super.onBackPressed(); |
| | | sendEventBus(); |
| | | } |
| | | |
| | | private void sendEventBus() { |
| | | HdlCommonLogic.getInstance().postEventBus(ConstantManage.homepage_title_tab_switch, ConstantManage.station_edit); |
| | | finish(); |
| | | } |
| | | |
| | | private void initEvent() { |
| | | //返回按钮 |
| | | viewBinding.toolbarTopFragmentHouseListRl.topBackBtn.setOnClickListener(new View.OnClickListener() { |
| | | viewBinding.toolbarTopFragmentHouseListRl.topBackLl.setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | | BaseEventBus baseEventBus = new BaseEventBus(); |
| | | baseEventBus.setTopic(ConstantManage.homepage_title_tab_switch); |
| | | baseEventBus.setType(HomepageTitleTabSwitch.powerstation.toString()); |
| | | EventBus.getDefault().post(baseEventBus); |
| | | finish(); |
| | | sendEventBus(); |
| | | } |
| | | }); |
| | | |
| | |
| | | String homeName = "\"" + houseIdBean.getHomeName() + "\""; |
| | | delayedConfirmationCancelDialog.setContent(getString(R.string.delete_power_station).replace("%s", homeName)); |
| | | delayedConfirmationCancelDialog.show(); |
| | | delayedConfirmationCancelDialog.startCountdown(3); |
| | | delayedConfirmationCancelDialog.startCountdown(4); |
| | | delayedConfirmationCancelDialog.setYesOnclickListener(new DelayedConfirmationCancelDialog.onYesOnclickListener() { |
| | | @Override |
| | | public void Confirm() { |
| | |
| | | |
| | | private void initView() { |
| | | viewBinding.toolbarTopFragmentHouseListRl.getRoot().setBackgroundColor(getColor(R.color.text_FFFFFFFF)); |
| | | viewBinding.toolbarTopFragmentHouseListRl.topBackBtn.setVisibility(View.VISIBLE); |
| | | viewBinding.toolbarTopFragmentHouseListRl.topBackLl.setVisibility(View.VISIBLE); |
| | | viewBinding.toolbarTopFragmentHouseListRl.topLeftIv.setImageResource(R.drawable.back_c); |
| | | viewBinding.toolbarTopFragmentHouseListRl.topTitleTv.setText(R.string.power_station_editing); |
| | | LinearLayoutManager linearLayout = new LinearLayoutManager(_mActivity); |
| | |
| | | } |
| | | for (int i = 0; i < list.size(); i++) { |
| | | GatewayBean gatewayBean = list.get(i); |
| | | HdlDeviceLogic.getInstance().initializeGateway(gatewayBean.getDevice_mac(), new LinkCallBack<Boolean>() { |
| | | HdlDeviceLogic.getInstance().initializeInverter(gatewayBean.getDevice_mac(), new LinkCallBack<Boolean>() { |
| | | @Override |
| | | public void onSuccess(Boolean obj) { |
| | | // HdlLogLogic.print("初始化逆变器成功-->mac:" + cloudInverterDeviceBean.getOsn(),true); |