恢复初始化配置

This commit is contained in:
pppscn 2021-03-18 16:59:06 +08:00
parent e709d1ee84
commit 1a29bc9988
2 changed files with 40 additions and 1 deletions

View File

@ -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);
}
} }

View File

@ -6,7 +6,7 @@
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="wrap_content"
android:orientation="vertical"> android:orientation="vertical">
<LinearLayout <LinearLayout
@ -282,6 +282,17 @@
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
<Button
android:id="@+id/btnInitSetting"
android:layout_width="match_parent"
android:layout_height="35dp"
android:layout_margin="10dp"
android:background="@color/colorPrimary"
android:onClick="initSetting"
android:padding="0dp"
android:text="恢复初始化配置" />
</LinearLayout> </LinearLayout>
</ScrollView> </ScrollView>