From 2b280fb9794d1fb3af16c01578bb85e924b4852e Mon Sep 17 00:00:00 2001 From: niushuai233 Date: Tue, 25 Oct 2022 15:10:09 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9Eicon=E6=9E=9A?= =?UTF-8?q?=E4=B8=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../devcontrol/base/enums/IconEnum.java | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 app/src/main/java/cc/niushuai/project/devcontrol/base/enums/IconEnum.java diff --git a/app/src/main/java/cc/niushuai/project/devcontrol/base/enums/IconEnum.java b/app/src/main/java/cc/niushuai/project/devcontrol/base/enums/IconEnum.java new file mode 100644 index 0000000..558881d --- /dev/null +++ b/app/src/main/java/cc/niushuai/project/devcontrol/base/enums/IconEnum.java @@ -0,0 +1,43 @@ +package cc.niushuai.project.devcontrol.base.enums; + +import cc.niushuai.project.devcontrol.R; + +/** + * icon枚举 + * + * @author niushuai233 + * @date 2022/10/25 14:57 + */ +public enum IconEnum { + POWER_SWITCH(R.drawable.ic_device_type_switch, "开关"), + LIGHT(R.drawable.ic_device_type_light, "灯具"), + CAMERA(R.drawable.ic_device_type_camera, "摄像机"), + AIR_CONDITIONER(R.drawable.ic_device_type_air_conditioner, "空调"), + REFRIGERATOR(R.drawable.ic_device_type_refrigerator, "冰箱"), + SOCKET(R.drawable.ic_device_type_socket, "插座"), + WASHER(R.drawable.ic_device_type_washer, "洗衣机"), + DEVICE(R.drawable.ic_device_type_custom, "设备"), + ; + + /** + * 资源id + */ + private Integer iconId; + /** + * 描述 + */ + private String desc; + + IconEnum(Integer iconId, String desc) { + this.iconId = iconId; + this.desc = desc; + } + + public Integer getIconId() { + return iconId; + } + + public String getDesc() { + return desc; + } +}