fix: 解决新增开关不选icon时报错问题

This commit is contained in:
niushuai233 2022-10-28 14:17:04 +08:00
parent 09a244d88d
commit 1a4ed9018e

View File

@ -14,6 +14,7 @@ import cc.niushuai.project.devcontrol.base.util.CommonUiUtil;
import cc.niushuai.project.devcontrol.base.util.IdWorker; import cc.niushuai.project.devcontrol.base.util.IdWorker;
import cc.niushuai.project.devcontrol.base.util.Keys; import cc.niushuai.project.devcontrol.base.util.Keys;
import cc.niushuai.project.devcontrol.base.util.ToastUtil; import cc.niushuai.project.devcontrol.base.util.ToastUtil;
import cc.niushuai.project.devcontrol.base.util.UiUtil;
import cc.niushuai.project.devcontrol.databinding.ActivityDeviceAddPowerSwitchBinding; import cc.niushuai.project.devcontrol.databinding.ActivityDeviceAddPowerSwitchBinding;
import cc.niushuai.project.devcontrol.db.DB; import cc.niushuai.project.devcontrol.db.DB;
import cc.niushuai.project.devcontrol.db.entity.Device; import cc.niushuai.project.devcontrol.db.entity.Device;
@ -41,6 +42,8 @@ public class DeviceAddPowerSwitchActivity extends BaseActivity {
// 设置标题栏信息 // 设置标题栏信息
this.setTitle(null, getString(R.string.power_switch_add), null, R.drawable.ic_confrim_32); this.setTitle(null, getString(R.string.power_switch_add), null, R.drawable.ic_confrim_32);
UiUtil.setAppImageCompatResource(this, R.id.device_add_select_icon, R.drawable.ic_device_type_switch);
} }
/** /**