refactor: 抽取toast信息

This commit is contained in:
niushuai233 2022-10-21 16:39:10 +08:00
parent 391dce160a
commit b58b5aa668
2 changed files with 5 additions and 3 deletions

View File

@ -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

View File

@ -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