From c92e5511f6f5b46f225e5254222ff64cee7b5d1e Mon Sep 17 00:00:00 2001 From: wjc <1243177876@qq.com> Date: 星期三, 11 十二月 2024 11:46:21 +0800 Subject: [PATCH] 2024年12月11日11:46:19 --- app/src/main/java/com/hdl/photovoltaic/ui/newC/PowerStationsListEdit.java | 25 ++++++++++++++++++++----- 1 files changed, 20 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/com/hdl/photovoltaic/ui/newC/PowerStationsListEdit.java b/app/src/main/java/com/hdl/photovoltaic/ui/newC/PowerStationsListEdit.java index 5e492c8..4f401fd 100644 --- a/app/src/main/java/com/hdl/photovoltaic/ui/newC/PowerStationsListEdit.java +++ b/app/src/main/java/com/hdl/photovoltaic/ui/newC/PowerStationsListEdit.java @@ -2,6 +2,7 @@ import android.Manifest; +import android.content.DialogInterface; import android.os.Bundle; import android.view.View; @@ -56,8 +57,8 @@ @Override public void onBindView(Bundle savedInstanceState) { - setNotificationBarBackgroundColor(CustomColor.white); - setStatusBarTextColor(); + setStatusBarTranslucent(); + getWindow().setNavigationBarColor(getColor(R.color.text_FF333738)); //鍒濆鍖栨暟鎹� initData(); //鍒濆鍖� @@ -165,6 +166,7 @@ } }); + } viewBinding.addPowerStationTv.setOnClickListener(new View.OnClickListener() { @@ -193,9 +195,7 @@ } private void initView() { - viewBinding.toolbarTopRl.getRoot().setBackgroundColor(getColor(R.color.text_FFECECEC)); viewBinding.toolbarTopRl.topBackLl.setVisibility(View.VISIBLE); - viewBinding.toolbarTopRl.topLeftIv.setImageResource(R.drawable.back_c); viewBinding.toolbarTopRl.topTitleTv.setText(R.string.power_station_selection); viewBinding.toolbarTopRl.topMoreBtn.setVisibility(View.VISIBLE); viewBinding.toolbarTopRl.topMoreIv.setImageResource(R.drawable.editor_house); @@ -294,7 +294,7 @@ dialog.setYesOnclickListener(new ConfirmationCancelDialog.onYesOnclickListener() { @Override public void Confirm() { - HdlResidenceLogic.getInstance().switchHouse(houseIdBean); + HdlResidenceLogic.getInstance().switchHouse(houseIdBean, true); dialog.dismiss(); JsonObject jsonObject = new JsonObject(); jsonObject.addProperty("homeId", houseIdBean.getHomeId()); @@ -329,6 +329,21 @@ dialog.dismiss(); } }); + + dialog.setOnDismissListener(new DialogInterface.OnDismissListener() { + @Override + public void onDismiss(DialogInterface dialog) { + //鍙栨秷涔嬪悗杩樺師涔嬪墠鐘舵�� + for (int i = 0; i < houseListBeanIDList.size(); i++) { + HouseIdBean houseIdBean = houseListBeanIDList.get(i); + houseIdBean.setState_select(false); + if (UserConfigManage.getInstance().getHomeId().equals(houseIdBean.getHomeId())) { + houseIdBean.setState_select(true); + } + } + houseListAdapter.notifyDataSetChanged(); + } + }); } -- Gitblit v1.8.0