From 2dbdf57e2603ad8c99752eb9c02612bb09038eb7 Mon Sep 17 00:00:00 2001 From: niushuai233 Date: Wed, 19 Oct 2022 15:24:51 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9B=B4=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ui/powerswitch/PowerSwitchActivity.java | 14 +++++----- .../layout/device_power_switch_activity.xml | 28 +++++++++---------- app/src/main/res/values/ids.xml | 22 +++++++-------- 3 files changed, 32 insertions(+), 32 deletions(-) diff --git a/app/src/main/java/cc/niushuai/project/devcontrol/ui/powerswitch/PowerSwitchActivity.java b/app/src/main/java/cc/niushuai/project/devcontrol/ui/powerswitch/PowerSwitchActivity.java index 535c265..fda78ee 100644 --- a/app/src/main/java/cc/niushuai/project/devcontrol/ui/powerswitch/PowerSwitchActivity.java +++ b/app/src/main/java/cc/niushuai/project/devcontrol/ui/powerswitch/PowerSwitchActivity.java @@ -48,15 +48,15 @@ public class PowerSwitchActivity extends BaseActivity { if (null != data) { this.device = data; // 标题名称 - TextView titleTextView = findViewById(R.id.device_activity_title_name); + TextView titleTextView = findViewById(R.id.power_switch_activity_title_name); titleTextView.setText(device.getName()); // 副标题名称 - TextView descTextView = findViewById(R.id.device_activity_title_description); + TextView descTextView = findViewById(R.id.power_switch_activity_title_description); descTextView.setText(device.getDescription()); // 开关底部的名称 - TextView contentTextTextView = findViewById(R.id.device_activity_content_text); + TextView contentTextTextView = findViewById(R.id.power_switch_activity_content_text); contentTextTextView.setText(device.getName()); } } @@ -69,13 +69,13 @@ public class PowerSwitchActivity extends BaseActivity { */ private void addListener() { // 开关点击事件 - binding.deviceActivityContentSwitch.setOnClickListener(this::imageSwitchClickListener); + binding.powerSwitchActivityContentSwitch.setOnClickListener(this::imageSwitchClickListener); // 标题栏 返回 - binding.deviceActivityTitleBack.setOnClickListener(this::buttonBackClickListener); + binding.powerSwitchActivityTitleBack.setOnClickListener(this::buttonBackClickListener); // 标题栏 更多设置 - binding.deviceActivityTitleMoreSet.setOnClickListener(this::buttonMoreSetClickListener); + binding.powerSwitchActivityTitleMoreSet.setOnClickListener(this::buttonMoreSetClickListener); } /** @@ -125,7 +125,7 @@ public class PowerSwitchActivity extends BaseActivity { iconImageId = R.drawable.ic_device_light_1_close; } appCompatImageView.setImageResource(switchImageId); - ((AppCompatImageView) findViewById(R.id.device_activity_content_icon)).setImageResource(iconImageId); + ((AppCompatImageView) findViewById(R.id.power_switch_activity_content_icon)).setImageResource(iconImageId); } diff --git a/app/src/main/res/layout/device_power_switch_activity.xml b/app/src/main/res/layout/device_power_switch_activity.xml index dda27df..1da95bb 100644 --- a/app/src/main/res/layout/device_power_switch_activity.xml +++ b/app/src/main/res/layout/device_power_switch_activity.xml @@ -1,19 +1,19 @@ - - - - + + + + - - - - + + + + - - - + + +