| | |
| | | import android.content.Intent; |
| | | import android.content.pm.PackageManager; |
| | | import android.os.Bundle; |
| | | import android.os.SystemClock; |
| | | import android.util.Log; |
| | | import android.view.View; |
| | | import android.view.Window; |
| | | import android.widget.ImageView; |
| | | import android.widget.RelativeLayout; |
| | | |
| | | import androidx.annotation.NonNull; |
| | | import androidx.appcompat.content.res.AppCompatResources; |
| | |
| | | import com.hdl.photovoltaic.ui.bean.StatusOverviewBean; |
| | | import com.hdl.photovoltaic.uni.HDLUniMP; |
| | | import com.hdl.photovoltaic.utils.PermissionUtils; |
| | | import com.hdl.photovoltaic.utils.ProcessManagerUtils; |
| | | import com.hdl.photovoltaic.utils.URLEncodingUtils; |
| | | import com.hdl.photovoltaic.widget.DefaultFilteringDialog; |
| | | import com.hdl.photovoltaic.widget.DelayedConfirmationCancelDialog; |
| | |
| | | @Override |
| | | public void onClick(int position, HouseIdBean houseIdBean) { |
| | | //点击住宅详情 |
| | | HdlLogLogic.print("点击住宅详情---" + new Gson().toJson(houseIdBean), false); |
| | | UserConfigManage.getInstance().setUniBottomSafeDistanceBackgroundColor(0); |
| | | HdlResidenceLogic.getInstance().switchHouse(houseIdBean, true); |
| | | String path = HDLUniMP.UNI_EVENT_OPEN_HOME_DETAILS + "?homeId=" + houseIdBean.getHomeId() + "&homeName=" + houseIdBean.getHomeName() + "&powerStationStatus=" + houseIdBean.getPowerStationStatus(); |
| | | HdlUniLogic.getInstance().openUniMP(path, null); |
| | | |
| | | HdlLogLogic.print("点击住宅详情---" + new Gson().toJson(houseIdBean), false); |
| | | } |
| | | |
| | | @Override |
| | |
| | | @Override |
| | | public void onClick(View v) { |
| | | boolean isSelected = !v.isSelected(); |
| | | viewBinding.stationNameRl.setSelected(isSelected); |
| | | viewBinding.stationNameIv.setSelected(isSelected); |
| | | screenIconState(viewBinding.stationNameRl, viewBinding.stationNameIv, isSelected); |
| | | key = SortType.homeNameSort; |
| | | value = isSelected ? SortValue.ascending : SortValue.descending; |
| | | loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, gridTypeValue, powerStationStatusValue, 1, true); |
| | |
| | | @Override |
| | | public void onClick(View v) { |
| | | boolean isSelected = !v.isSelected(); |
| | | viewBinding.stationPowerRl.setSelected(isSelected); |
| | | viewBinding.stationPowerIv.setSelected(isSelected); |
| | | screenIconState(viewBinding.stationPowerRl, viewBinding.stationPowerIv, isSelected); |
| | | key = SortType.powerSort; |
| | | value = isSelected ? SortValue.ascending : SortValue.descending; |
| | | loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, gridTypeValue, powerStationStatusValue, 1, true); |
| | |
| | | @Override |
| | | public void onClick(View v) { |
| | | boolean isSelected = !v.isSelected(); |
| | | viewBinding.stationDayRl.setSelected(isSelected); |
| | | viewBinding.stationDayIv.setSelected(isSelected); |
| | | screenIconState(viewBinding.stationDayRl, viewBinding.stationDayIv, isSelected); |
| | | key = SortType.todayElectricitySort; |
| | | value = isSelected ? SortValue.ascending : SortValue.descending; |
| | | loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, gridTypeValue, powerStationStatusValue, 1, true); |
| | |
| | | @Override |
| | | public void onClick(View v) { |
| | | boolean isSelected = !v.isSelected(); |
| | | viewBinding.stationMonthRl.setSelected(isSelected); |
| | | viewBinding.stationMonthIv.setSelected(isSelected); |
| | | screenIconState(viewBinding.stationMonthRl, viewBinding.stationMonthIv, isSelected); |
| | | key = SortType.monthElectricitySort; |
| | | value = isSelected ? SortValue.ascending : SortValue.descending; |
| | | loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, gridTypeValue, powerStationStatusValue, 1, true); |
| | |
| | | } |
| | | }); |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 更新筛选条件状态 |
| | | * |
| | | * @param relativeLayout 组件名称 |
| | | * @param imageView 组件名称 |
| | | * @param isSelected 状态 |
| | | */ |
| | | private void screenIconState(RelativeLayout relativeLayout, ImageView imageView, boolean isSelected) { |
| | | viewBinding.stationNameRl.setSelected(false); |
| | | viewBinding.stationNameIv.setSelected(false); |
| | | viewBinding.stationPowerRl.setSelected(false); |
| | | viewBinding.stationPowerIv.setSelected(false); |
| | | viewBinding.stationDayRl.setSelected(false); |
| | | viewBinding.stationDayIv.setSelected(false); |
| | | viewBinding.stationMonthRl.setSelected(false); |
| | | viewBinding.stationMonthIv.setSelected(false); |
| | | relativeLayout.setSelected(isSelected); |
| | | imageView.setSelected(isSelected); |
| | | } |
| | | |
| | | private void initView() { |
| | |
| | | MqttRecvClient.getInstance().checkAndsubscribeAllTopics(topicHome);//订阅【电站】消息 |
| | | |
| | | |
| | | |
| | | } else if (eventBus.getTopic().equals(ConstantManage.homepage_title_tab_switch)) { |
| | | // 取消粘性事件 |
| | | EventBus.getDefault().removeStickyEvent(eventBus); |