| | |
| | | minSdk 23 |
| | | targetSdk 30 |
| | | versionCode 1 |
| | | versionName "1.1.1"//版本规则1.1是产品功能迭代用的,最后一位1是我们修复bug用的 |
| | | versionName "1.1.2"//版本规则1.1是产品功能迭代用的,最后一位1是我们修复bug用的 |
| | | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" |
| | | multiDexEnabled true |
| | | manifestPlaceholders = mfph |
| | |
| | | * 获取当前住宅的【主】逆变器列表 |
| | | */ |
| | | public GatewayBean getCurrentHomeMainGateway() { |
| | | List<GatewayBean> list = this.getCurrentHomeGatewayList(); |
| | | if (list.size() > 0) { |
| | | return queryCurrentHomeMainGateway(this.getCurrentHomeGatewayList()); |
| | | } |
| | | |
| | | /** |
| | | * 查询当前住宅的【主】逆变器列表 |
| | | */ |
| | | public GatewayBean queryCurrentHomeMainGateway(List<GatewayBean> list) { |
| | | if (list == null || list.size() == 0) { |
| | | return null; |
| | | } |
| | | GatewayBean findGatewayBean = null; |
| | | for (int i = 0; i < list.size(); i++) { |
| | | GatewayBean gatewayBean = list.get(i); |
| | | if (gatewayBean.getMaster().equals(GatewayMasterType.MasterTrue)) { |
| | | if (gatewayBean.getMaster().equals(GatewayMasterType.MasterTrue) && gatewayBean.getHomeId().equals(UserConfigManage.getInstance().getHomeId())) { |
| | | //找到返回 |
| | | return gatewayBean; |
| | | findGatewayBean = gatewayBean; |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | return null; |
| | | return findGatewayBean; |
| | | } |
| | | |
| | | |
| | |
| | | public void onSuccess(List<GatewayBean> list) { |
| | | if (callback != null) { |
| | | uniCallbackData(list, callback); |
| | | //EventBus事件分发 |
| | | //EventBus事件分发,进入住宅开始订阅主题 |
| | | BaseEventBus baseEventBus = new BaseEventBus(); |
| | | baseEventBus.setType(HDLUniMP.UNI_EVENT_REPLY_DEVICE_LIST); |
| | | baseEventBus.setData(list); |
| | | EventBus.getDefault().post(baseEventBus); |
| | | GatewayBean gatewayBean = HdlDeviceLogic.getInstance().queryCurrentHomeMainGateway(list); |
| | | if (gatewayBean != null) { |
| | | //进来住宅详情都要上传一次oid列表到云端; |
| | | HdlDeviceLogic.getInstance().uploadDataToCloud(gatewayBean.getDevice_mac(), null); |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
| | | |
| | |
| | | @Override |
| | | public void onBindView(Bundle savedInstanceState) { |
| | | |
| | | |
| | | setNotificationBarBackgroundColor(CustomColor.white); |
| | | setStatusBarTextColor(); |
| | | //初始化 |
| | | initView(); |
| | | //初始化界面监听器 |
| | |
| | | HdlAccountLogic.getInstance().regionByAccount(account, new CloudCallBeak<HDLUserRegionBean>() { |
| | | @Override |
| | | public void onSuccess(HDLUserRegionBean obj) { |
| | | //初始化服务域名 |
| | | AppConfigManage.setUserRegionUrl(obj.getRegionUrl()); |
| | | HDLLinkPMUser.getInstance().setUserRegionUrl(AppConfigManage.getUserRegionUrl()); |
| | | HdlAccountLogic.getInstance().loginByPassword(account, password, new ILoginCallBack() { |
| | |
| | | import android.os.IBinder; |
| | | |
| | | import com.hdl.linkpm.sdk.core.exception.HDLException; |
| | | import com.hdl.linkpm.sdk.user.HDLLinkPMUser; |
| | | import com.hdl.photovoltaic.HDLApp; |
| | | import com.hdl.photovoltaic.R; |
| | | import com.hdl.photovoltaic.base.CustomBaseActivity; |
| | | import com.hdl.photovoltaic.config.AppConfigManage; |
| | | import com.hdl.photovoltaic.config.UserConfigManage; |
| | | import com.hdl.photovoltaic.internet.HttpServer.MyNanoHttpServer; |
| | | import com.hdl.photovoltaic.internet.HttpServer.MyNanoHttpService; |
| | |
| | | |
| | | @Override |
| | | public void onBindView(Bundle savedInstanceState) { |
| | | setNotificationBarBackgroundColor(CustomColor.white); |
| | | setStatusBarTextColor(); |
| | | //初始化服务器域名(用户注册所在服务器域名地址) |
| | | AppConfigManage.setUserRegionUrl(HDLLinkPMUser.getInstance().getUserRegionUrl()); |
| | | //7天内免登录 |
| | | if (UserConfigManage.getInstance().isAutoLogin()) { |
| | | // showLoading(); |
| | |
| | | viewBinding.toolbarTopFragmentHouseListRl.topBackBtn.setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | | setResult(40); |
| | | finish(); |
| | | } |
| | | }); |
| | |
| | | import androidx.annotation.NonNull; |
| | | |
| | | import com.hdl.photovoltaic.R; |
| | | import com.hdl.photovoltaic.base.BaseDialog; |
| | | import com.hdl.photovoltaic.databinding.DialogChangeAvatarBinding; |
| | | |
| | | /** |
| | | * 修改头像专用弹窗 |
| | | */ |
| | | public class ChangeAvatarDialog extends Dialog { |
| | | public class ChangeAvatarDialog extends BaseDialog { |
| | | |
| | | private final Context mContext; |
| | | |
| | |
| | | /** |
| | | * 确认取消框 |
| | | */ |
| | | public class ConfirmationCancelDialog extends Dialog { |
| | | public class ConfirmationCancelDialog extends BaseDialog { |
| | | public ConfirmationCancelDialog(@NonNull Context context) { |
| | | super(context, R.style.Custom_Dialog); |
| | | this.mContext = context; |
| | |
| | | import androidx.annotation.NonNull; |
| | | |
| | | import com.hdl.photovoltaic.R; |
| | | import com.hdl.photovoltaic.base.BaseDialog; |
| | | import com.hdl.photovoltaic.databinding.DialogAgreeOnagreeBinding; |
| | | |
| | | |
| | | public class ConfirmationCancelDialog1 extends Dialog { |
| | | public class ConfirmationCancelDialog1 extends BaseDialog { |
| | | public ConfirmationCancelDialog1(@NonNull Context context) { |
| | | super(context, R.style.Custom_Dialog); |
| | | this.mContext = context; |
| | |
| | | import androidx.appcompat.content.res.AppCompatResources; |
| | | |
| | | import com.hdl.photovoltaic.R; |
| | | import com.hdl.photovoltaic.base.BaseDialog; |
| | | import com.hdl.photovoltaic.databinding.DialogExceptionLogBinding; |
| | | |
| | | /** |
| | | * 异常弹窗 |
| | | */ |
| | | public class ConfirmationExceptionDialog extends Dialog { |
| | | public class ConfirmationExceptionDialog extends BaseDialog { |
| | | |
| | | private DialogExceptionLogBinding viewBinding; |
| | | private final Context mContext; |
| | |
| | | import androidx.constraintlayout.widget.ConstraintSet; |
| | | |
| | | import com.hdl.photovoltaic.R; |
| | | import com.hdl.photovoltaic.base.BaseDialog; |
| | | import com.hdl.photovoltaic.databinding.DialogConfirmInputBinding; |
| | | import com.hdl.photovoltaic.utils.KeyboardStateObserverUtils; |
| | | |
| | | /** |
| | | * 输入确认框 |
| | | */ |
| | | public class ConfirmationInputDialog extends Dialog { |
| | | public class ConfirmationInputDialog extends BaseDialog { |
| | | |
| | | public ConfirmationInputDialog(@NonNull Context context) { |
| | | super(context, R.style.Custom_Dialog); |
| | |
| | | import androidx.annotation.NonNull; |
| | | |
| | | import com.hdl.photovoltaic.R; |
| | | import com.hdl.photovoltaic.base.BaseDialog; |
| | | import com.hdl.photovoltaic.databinding.DialogConfirmationTipBinding; |
| | | |
| | | /** |
| | | * 提示确认框 |
| | | */ |
| | | public class ConfirmationTipDialog extends Dialog { |
| | | public class ConfirmationTipDialog extends BaseDialog { |
| | | |
| | | private final Context mContext; |
| | | |
| | |
| | | import androidx.annotation.NonNull; |
| | | |
| | | import com.hdl.photovoltaic.R; |
| | | import com.hdl.photovoltaic.base.BaseDialog; |
| | | import com.hdl.photovoltaic.databinding.DialogFlashingBoxBinding; |
| | | |
| | | import java.util.Timer; |
| | |
| | | /** |
| | | * 自定义自动关闭dialog |
| | | */ |
| | | public class FlashingBoxDialog extends Dialog { |
| | | public class FlashingBoxDialog extends BaseDialog { |
| | | |
| | | private DialogFlashingBoxBinding viewBinding; |
| | | |
| | |
| | | |
| | | import com.hdl.photovoltaic.HDLApp; |
| | | import com.hdl.photovoltaic.R; |
| | | import com.hdl.photovoltaic.base.BaseDialog; |
| | | import com.hdl.photovoltaic.config.UserConfigManage; |
| | | import com.hdl.photovoltaic.databinding.DialogListBinding; |
| | | import com.hdl.photovoltaic.ui.StartActivity; |
| | |
| | | /** |
| | | * 动态列表弹窗 |
| | | */ |
| | | public class ListDialog extends Dialog { |
| | | public class ListDialog extends BaseDialog { |
| | | private DialogListBinding viewBinding; |
| | | |
| | | private ListDialogAdapter listDialogAdapter; |
| | |
| | | } |
| | | list.get(position).setState(true); |
| | | listDialogAdapter.notifyDataSetChanged(); |
| | | if (UserConfigManage.getInstance().getCurrentAppLanguage().equals(itemData.getLanguage())) { |
| | | //同一个不执行弹窗 |
| | | return; |
| | | } |
| | | languageSelectionDialog(position, itemData); |
| | | } |
| | | }); |
| | |
| | | import androidx.annotation.NonNull; |
| | | |
| | | import com.hdl.photovoltaic.R; |
| | | import com.hdl.photovoltaic.base.BaseDialog; |
| | | import com.hdl.photovoltaic.databinding.DialogStaticListBinding; |
| | | |
| | | /** |
| | | * 静态列表弹窗 |
| | | */ |
| | | public class ListStaticDialog extends Dialog { |
| | | public class ListStaticDialog extends BaseDialog { |
| | | private onNoListener onNoOnclickListener; |
| | | private onHDLChinaListener onHDLChinaListener; |
| | | private onHDLBahrainListener onHDLBahrainListener; |
| | |
| | | |
| | | |
| | | import com.hdl.photovoltaic.R; |
| | | import com.hdl.photovoltaic.base.BaseDialog; |
| | | |
| | | public class LoadingDialog extends Dialog { |
| | | public class LoadingDialog extends BaseDialog { |
| | | private TextView content; |
| | | |
| | | public LoadingDialog(Context context) { |
| | | super(context); |
| | | init(context); |
| | | } |
| | | |
| | | public LoadingDialog(Context context, int theme) { |
| | | super(context, theme); |
| | |
| | | import androidx.annotation.NonNull; |
| | | |
| | | import com.hdl.photovoltaic.R; |
| | | import com.hdl.photovoltaic.base.BaseDialog; |
| | | import com.hdl.photovoltaic.databinding.DialogUpdateConfirmCancelBinding; |
| | | |
| | | public class UpdateConfirmationCancelDialog extends Dialog { |
| | | public class UpdateConfirmationCancelDialog extends BaseDialog { |
| | | public UpdateConfirmationCancelDialog(@NonNull Context context) { |
| | | super(context, R.style.Custom_Dialog); |
| | | this.mContext = context; |
| | |
| | | <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| | | xmlns:app="http://schemas.android.com/apk/res-auto" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent"> |
| | | android:layout_height="match_parent" |
| | | > |
| | | |
| | | <androidx.constraintlayout.widget.ConstraintLayout |
| | | android:id="@+id/loading_confirmation_cl" |
| | | android:layout_width="0dp" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginStart="@dimen/dp_48" |
| | | android:layout_marginTop="@dimen/dp_20" |