From b58b5aa668c83aa8e00476a03c7f8646a981ef67 Mon Sep 17 00:00:00 2001 From: niushuai233 Date: Fri, 21 Oct 2022 16:39:10 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E6=8A=BD=E5=8F=96toast=E4=BF=A1?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../devcontrol/ui/powerswitch/PowerSwitchSetActivity.java | 5 +++-- .../ui/powerswitch/PowerSwitchSetParamActivity.java | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/cc/niushuai/project/devcontrol/ui/powerswitch/PowerSwitchSetActivity.java b/app/src/main/java/cc/niushuai/project/devcontrol/ui/powerswitch/PowerSwitchSetActivity.java index a5091f3..68f8834 100644 --- a/app/src/main/java/cc/niushuai/project/devcontrol/ui/powerswitch/PowerSwitchSetActivity.java +++ b/app/src/main/java/cc/niushuai/project/devcontrol/ui/powerswitch/PowerSwitchSetActivity.java @@ -11,6 +11,7 @@ import cc.niushuai.project.devcontrol.base.ui.BaseActivity; import cc.niushuai.project.devcontrol.base.util.ActivityUtil; import cc.niushuai.project.devcontrol.base.util.GlobalVariables; import cc.niushuai.project.devcontrol.base.util.Keys; +import cc.niushuai.project.devcontrol.base.util.ToastUtil; import cc.niushuai.project.devcontrol.databinding.ActivityPowerSwitchSetBinding; public class PowerSwitchSetActivity extends BaseActivity { @@ -46,7 +47,7 @@ public class PowerSwitchSetActivity extends BaseActivity { } private void outsideIconChangeClickListener(View view) { - Toast.makeText(this, "更换图标暂未实现哦", Toast.LENGTH_SHORT).show(); + ToastUtil.show(this, "更换图标暂未实现哦"); } private void outsideParamSetClickListener(View view) { @@ -57,7 +58,7 @@ public class PowerSwitchSetActivity extends BaseActivity { } private void outsideLogViewClickListener(View view) { - Toast.makeText(this, "日志暂未实现哦", Toast.LENGTH_SHORT).show(); + ToastUtil.show(this, "日志暂未实现哦"); } @Override diff --git a/app/src/main/java/cc/niushuai/project/devcontrol/ui/powerswitch/PowerSwitchSetParamActivity.java b/app/src/main/java/cc/niushuai/project/devcontrol/ui/powerswitch/PowerSwitchSetParamActivity.java index 9346857..40c0d85 100644 --- a/app/src/main/java/cc/niushuai/project/devcontrol/ui/powerswitch/PowerSwitchSetParamActivity.java +++ b/app/src/main/java/cc/niushuai/project/devcontrol/ui/powerswitch/PowerSwitchSetParamActivity.java @@ -9,6 +9,7 @@ import androidx.annotation.Nullable; import cc.niushuai.project.devcontrol.R; import cc.niushuai.project.devcontrol.base.ui.BaseActivity; import cc.niushuai.project.devcontrol.base.util.GlobalVariables; +import cc.niushuai.project.devcontrol.base.util.ToastUtil; import cc.niushuai.project.devcontrol.databinding.ActivityPowerSwitchSetParamBinding; @@ -47,7 +48,7 @@ public class PowerSwitchSetParamActivity extends BaseActivity { private void btnSaveParamClickListener(View view) { - Toast.makeText(this, "已保存", Toast.LENGTH_SHORT).show(); + ToastUtil.show(this, "已保存"); } @Override