SW Configure APS button
This commit is contained in:
parent
376fffa6ec
commit
0a51c86afb
2 changed files with 12 additions and 0 deletions
|
@ -224,6 +224,17 @@ public class SWDefinition {
|
||||||
.add(new SWPlugin()
|
.add(new SWPlugin()
|
||||||
.option(PluginType.APS)
|
.option(PluginType.APS)
|
||||||
.label(R.string.configbuilder_aps))
|
.label(R.string.configbuilder_aps))
|
||||||
|
.add(new SWButton()
|
||||||
|
.text(R.string.apssetup)
|
||||||
|
.action(() -> {
|
||||||
|
final PluginBase plugin = (PluginBase) MainApp.getConfigBuilder().getActiveAPS();
|
||||||
|
PasswordProtection.QueryPassword(activity, R.string.settings_password, "settings_password", () -> {
|
||||||
|
Intent i = new Intent(activity, PreferencesActivity.class);
|
||||||
|
i.putExtra("id", plugin.getPreferencesId());
|
||||||
|
activity.startActivity(i);
|
||||||
|
}, null);
|
||||||
|
})
|
||||||
|
.visibility(() -> MainApp.getConfigBuilder().getActiveAPS() != null && ((PluginBase) MainApp.getConfigBuilder().getActiveAPS()).getPreferencesId() > 0))
|
||||||
.validator(() -> MainApp.getConfigBuilder().getActiveAPS() != null)
|
.validator(() -> MainApp.getConfigBuilder().getActiveAPS() != null)
|
||||||
)
|
)
|
||||||
.add(new SWScreen(R.string.configbuilder_loop)
|
.add(new SWScreen(R.string.configbuilder_loop)
|
||||||
|
|
|
@ -1068,5 +1068,6 @@
|
||||||
<string name="setupwizard_loop_description">Press the button below to enable AndroidAPS to suggest/make basal changes</string>
|
<string name="setupwizard_loop_description">Press the button below to enable AndroidAPS to suggest/make basal changes</string>
|
||||||
<string name="setupwizard_objectives_description">Press the button below to enable Objectives. Look in the Objectives tab, after you finish this wizard, to make AndroidAPS completely functional.</string>
|
<string name="setupwizard_objectives_description">Press the button below to enable Objectives. Look in the Objectives tab, after you finish this wizard, to make AndroidAPS completely functional.</string>
|
||||||
<string name="enableobjectives">Enable Objectives</string>
|
<string name="enableobjectives">Enable Objectives</string>
|
||||||
|
<string name="apssetup">Configure APS plugin</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|
Loading…
Reference in a new issue