From 1a29bc9988d3e266b71e39be590043ecd0e7951a Mon Sep 17 00:00:00 2001 From: pppscn <35696959@qq.com> Date: Thu, 18 Mar 2021 16:59:06 +0800 Subject: [PATCH] =?UTF-8?q?=E6=81=A2=E5=A4=8D=E5=88=9D=E5=A7=8B=E5=8C=96?= =?UTF-8?q?=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../idormy/sms/forwarder/SettingActivity.java | 28 +++++++++++++++++++ app/src/main/res/layout/activity_setting.xml | 13 ++++++++- 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/idormy/sms/forwarder/SettingActivity.java b/app/src/main/java/com/idormy/sms/forwarder/SettingActivity.java index 8ed5f1d0..4da5d17e 100644 --- a/app/src/main/java/com/idormy/sms/forwarder/SettingActivity.java +++ b/app/src/main/java/com/idormy/sms/forwarder/SettingActivity.java @@ -194,4 +194,32 @@ public class SettingActivity extends AppCompatActivity { } } + //恢复初始化配置 + public void initSetting(View v) { + Switch switch_add_extra = (Switch) findViewById(R.id.switch_add_extra); + switch_add_extra.setChecked(false); + switchAddExtra(switch_add_extra); + + EditText et_add_extra_device_mark = (EditText) findViewById(R.id.et_add_extra_device_mark); + et_add_extra_device_mark.setText(""); + editAddExtraDeviceMark(et_add_extra_device_mark); + + EditText et_add_extra_sim1 = (EditText) findViewById(R.id.et_add_extra_sim1); + et_add_extra_sim1.setText(""); + editAddExtraSim1(et_add_extra_sim1); + + EditText et_add_extra_sim2 = (EditText) findViewById(R.id.et_add_extra_sim2); + et_add_extra_sim2.setText(""); + editAddExtraSim2(et_add_extra_sim2); + + Switch switch_sms_template = (Switch) findViewById(R.id.switch_sms_template); + switch_sms_template.setChecked(false); + switchSmsTemplate(switch_sms_template); + + EditText textSmsTemplate = (EditText) findViewById(R.id.text_sms_template); + textSmsTemplate.setText("{{来源号码}}\n{{短信内容}}\n{{卡槽信息}}\n{{接收时间}}\n{{设备名称}}"); + editSmsTemplate(textSmsTemplate); + + } + } diff --git a/app/src/main/res/layout/activity_setting.xml b/app/src/main/res/layout/activity_setting.xml index 7cdfd194..e61e73ba 100644 --- a/app/src/main/res/layout/activity_setting.xml +++ b/app/src/main/res/layout/activity_setting.xml @@ -6,7 +6,7 @@ + +