setup wizard cleanup
This commit is contained in:
parent
520f2e1518
commit
4df3561b4b
6 changed files with 34 additions and 39 deletions
|
@ -45,7 +45,8 @@ public class DanaRKoreanPlugin extends AbstractDanaRPlugin {
|
|||
}
|
||||
|
||||
public DanaRKoreanPlugin() {
|
||||
super();
|
||||
pluginDescription.description(R.string.description_pump_dana_r_korean);
|
||||
|
||||
log = LoggerFactory.getLogger(DanaRKoreanPlugin.class);
|
||||
useExtendedBoluses = SP.getBoolean("danar_useextended", false);
|
||||
|
||||
|
|
|
@ -44,6 +44,8 @@ public class DanaRv2Plugin extends AbstractDanaRPlugin {
|
|||
}
|
||||
|
||||
private DanaRv2Plugin() {
|
||||
pluginDescription.description(R.string.description_pump_dana_r_v2);
|
||||
|
||||
log = LoggerFactory.getLogger(DanaRv2Plugin.class);
|
||||
useExtendedBoluses = false;
|
||||
|
||||
|
|
|
@ -223,21 +223,14 @@ public class SWDefinition {
|
|||
)
|
||||
.add(new SWScreen(R.string.configbuilder_insulin)
|
||||
.skippable(false)
|
||||
.add(new SWInfotext()
|
||||
.label(MainApp.gs(R.string.rapid_acting_oref) + ": " + MainApp.gs(R.string.fastactinginsulincomment)))
|
||||
.add(new SWInfotext()
|
||||
.label(MainApp.gs(R.string.ultrarapid_oref) + ": " + MainApp.gs(R.string.ultrafastactinginsulincomment)))
|
||||
.add(new SWInfotext()
|
||||
.label(MainApp.gs(R.string.free_peak_oref) + ": " + MainApp.gs(R.string.free_peak_oref_description)))
|
||||
.add(new SWPlugin()
|
||||
.option(PluginType.INSULIN, R.string.configbuilder_insulin_description)
|
||||
.makeVisible(false)
|
||||
.label(R.string.configbuilder_insulin))
|
||||
.add(new SWBreak())
|
||||
.add(new SWInfotext()
|
||||
.label(R.string.diawarning))
|
||||
.add(new SWBreak())
|
||||
.add(new SWPlugin()
|
||||
.option(PluginType.INSULIN)
|
||||
.makeVisible(false)
|
||||
.label(R.string.configbuilder_insulin))
|
||||
.add(new SWBreak())
|
||||
.add(new SWButton()
|
||||
.text(R.string.insulinsourcesetup)
|
||||
.action(() -> {
|
||||
|
@ -253,10 +246,8 @@ public class SWDefinition {
|
|||
)
|
||||
.add(new SWScreen(R.string.configbuilder_bgsource)
|
||||
.skippable(false)
|
||||
.add(new SWInfotext()
|
||||
.label(R.string.setupwizard_bgsource_description))
|
||||
.add(new SWPlugin()
|
||||
.option(PluginType.BGSOURCE)
|
||||
.option(PluginType.BGSOURCE, R.string.configbuilder_bgsource_description)
|
||||
.label(R.string.configbuilder_bgsource))
|
||||
.add(new SWBreak())
|
||||
.add(new SWButton()
|
||||
|
@ -278,7 +269,7 @@ public class SWDefinition {
|
|||
.label(R.string.setupwizard_profile_description))
|
||||
.add(new SWBreak())
|
||||
.add(new SWPlugin()
|
||||
.option(PluginType.PROFILE)
|
||||
.option(PluginType.PROFILE, R.string.configbuilder_profile_description)
|
||||
.label(R.string.configbuilder_profile))
|
||||
.validator(() -> MainApp.getConfigBuilder().getActiveProfileInterface() != null)
|
||||
)
|
||||
|
@ -324,8 +315,9 @@ public class SWDefinition {
|
|||
.add(new SWScreen(R.string.configbuilder_pump)
|
||||
.skippable(false)
|
||||
.add(new SWPlugin()
|
||||
.option(PluginType.PUMP)
|
||||
.option(PluginType.PUMP, R.string.configbuilder_pump_description)
|
||||
.label(R.string.configbuilder_pump))
|
||||
.add(new SWBreak())
|
||||
.add(new SWButton()
|
||||
.text(R.string.pumpsetup)
|
||||
.action(() -> {
|
||||
|
@ -360,7 +352,7 @@ public class SWDefinition {
|
|||
.label("https://openaps.readthedocs.io/en/latest/"))
|
||||
.add(new SWBreak())
|
||||
.add(new SWPlugin()
|
||||
.option(PluginType.APS)
|
||||
.option(PluginType.APS, R.string.configbuilder_aps_description)
|
||||
.label(R.string.configbuilder_aps))
|
||||
.add(new SWButton()
|
||||
.text(R.string.apssetup)
|
||||
|
@ -402,7 +394,7 @@ public class SWDefinition {
|
|||
.label(R.string.setupwizard_sensitivity_url))
|
||||
.add(new SWBreak())
|
||||
.add(new SWPlugin()
|
||||
.option(PluginType.SENSITIVITY)
|
||||
.option(PluginType.SENSITIVITY, R.string.configbuilder_sensitivity_description)
|
||||
.label(R.string.configbuilder_sensitivity))
|
||||
.add(new SWBreak())
|
||||
.add(new SWButton()
|
||||
|
@ -567,21 +559,14 @@ public class SWDefinition {
|
|||
)
|
||||
.add(new SWScreen(R.string.configbuilder_insulin)
|
||||
.skippable(false)
|
||||
.add(new SWInfotext()
|
||||
.label(MainApp.gs(R.string.rapid_acting_oref) + ": " + MainApp.gs(R.string.fastactinginsulincomment)))
|
||||
.add(new SWInfotext()
|
||||
.label(MainApp.gs(R.string.ultrarapid_oref) + ": " + MainApp.gs(R.string.ultrafastactinginsulincomment)))
|
||||
.add(new SWInfotext()
|
||||
.label(MainApp.gs(R.string.free_peak_oref) + ": " + MainApp.gs(R.string.free_peak_oref_description)))
|
||||
.add(new SWPlugin()
|
||||
.option(PluginType.INSULIN, R.string.configbuilder_insulin_description)
|
||||
.makeVisible(false)
|
||||
.label(R.string.configbuilder_insulin))
|
||||
.add(new SWBreak())
|
||||
.add(new SWInfotext()
|
||||
.label(R.string.diawarning))
|
||||
.add(new SWBreak())
|
||||
.add(new SWPlugin()
|
||||
.option(PluginType.INSULIN)
|
||||
.makeVisible(false)
|
||||
.label(R.string.configbuilder_insulin))
|
||||
.add(new SWBreak())
|
||||
.add(new SWButton()
|
||||
.text(R.string.insulinsourcesetup)
|
||||
.action(() -> {
|
||||
|
@ -603,7 +588,7 @@ public class SWDefinition {
|
|||
.label(R.string.setupwizard_sensitivity_url))
|
||||
.add(new SWBreak())
|
||||
.add(new SWPlugin()
|
||||
.option(PluginType.SENSITIVITY)
|
||||
.option(PluginType.SENSITIVITY, R.string.configbuilder_sensitivity_description)
|
||||
.label(R.string.configbuilder_sensitivity))
|
||||
.add(new SWBreak())
|
||||
.add(new SWButton()
|
||||
|
|
|
@ -26,6 +26,7 @@ public class SWPlugin extends SWItem {
|
|||
|
||||
private PluginType pType;
|
||||
private RadioGroup radioGroup;
|
||||
private int pluginDescription;
|
||||
|
||||
private boolean makeVisible = true;
|
||||
|
||||
|
@ -33,8 +34,9 @@ public class SWPlugin extends SWItem {
|
|||
super(Type.PLUGIN);
|
||||
}
|
||||
|
||||
public SWPlugin option(PluginType pType) {
|
||||
public SWPlugin option(PluginType pType, int pluginDescription) {
|
||||
this.pType = pType;
|
||||
this.pluginDescription = pluginDescription;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -55,6 +57,13 @@ public class SWPlugin extends SWItem {
|
|||
radioGroup.setOrientation(LinearLayout.VERTICAL);
|
||||
radioGroup.setVisibility(View.VISIBLE);
|
||||
|
||||
TextView pdesc = new TextView(context);
|
||||
pdesc.setText(pluginDescription);
|
||||
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
|
||||
params.setMargins(0, 0, 0, 40);
|
||||
pdesc.setLayoutParams(params);
|
||||
layout.addView(pdesc);
|
||||
|
||||
for (int i = 0; i < pluginsInCategory.size(); i++) {
|
||||
RadioButton rdbtn = new RadioButton(context);
|
||||
PluginBase p = pluginsInCategory.get(i);
|
||||
|
@ -64,7 +73,7 @@ public class SWPlugin extends SWItem {
|
|||
rdbtn.setChecked(true);
|
||||
rdbtn.setTag(p);
|
||||
radioGroup.addView(rdbtn);
|
||||
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
|
||||
params = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
|
||||
params.setMargins(80, 0, 0, 0);
|
||||
TextView desc = new TextView(context);
|
||||
desc.setText(p.getDescription());
|
||||
|
|
|
@ -614,7 +614,6 @@
|
|||
<string name="free_peak_oref">Oref Fără-Vârf</string>
|
||||
<string name="rapid_acting_oref">Oref Insulină-Rapidă</string>
|
||||
<string name="ultrarapid_oref">Oref Insulină-UltraRapidă</string>
|
||||
<string name="free_peak_oref_description">Insulină personalizată</string>
|
||||
<string name="dia_too_short" formatted="false">DIA din %f prea scurtă - se folosește %f în schimb!</string>
|
||||
<string name="activate_profile">Activează profil</string>
|
||||
<string name="date">Data</string>
|
||||
|
@ -955,7 +954,6 @@
|
|||
<string name="readstatus">Citire stare</string>
|
||||
<string name="adjustprofileinns">Schimbările trebuie făcute în NS</string>
|
||||
<string name="exitwizard">Ignoră asistentul pentru setări</string>
|
||||
<string name="setupwizard_bgsource_description">Care este sursa de glicemii?</string>
|
||||
<string name="setupwizard_loop_description">Apăsați butonul pentru a permite AndroidAPS să sugereze/facă schimbări ale bazalei</string>
|
||||
<string name="setupwizard_objectives_description">Apăsați butonul pentru a activa Obiectivele. După terminarea procesului de setare, alegeți fereastra Obiective pentru a face AndroidAPS complet funcțional.</string>
|
||||
<string name="enableobjectives">Activați Obiectivele</string>
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
<string name="description_ns_client">Synchronizes your data with Nightscout</string>
|
||||
<string name="description_ma">State of the algorithm in 2016</string>
|
||||
<string name="description_ama">State of the algorithm in 2017</string>
|
||||
<string name="description_smb">Most recent and most stable</string>
|
||||
<string name="description_smb">Most recent algorithm for advanced users</string>
|
||||
<string name="description_overview">Displays the current state of your loop and buttons for most common actions</string>
|
||||
<string name="description_persistent_notification">Shows an ongoing notification with a short overview of what your loop is doing</string>
|
||||
<string name="description_profile_local">Define a profile which is offline available.</string>
|
||||
|
@ -33,13 +33,15 @@
|
|||
<string name="description_profile_simple">Define a profile with only one time block.</string>
|
||||
<string name="description_pump_combo">Pump integration for Accu-Chek Combo pumps, requires having ruffy installed</string>
|
||||
<string name="description_pump_dana_r">Pump integration for DANA Diabecare R pumps</string>
|
||||
<string name="description_pump_dana_r_korean">Pump integration for domestic DANA Diabecare R pumps</string>
|
||||
<string name="description_pump_dana_r_v2">Pump integration for DANA Diabecare R pumps with upgraded firmware</string>
|
||||
<string name="description_pump_dana_rs">Pump integration for DANA Diabecare RS pumps</string>
|
||||
<string name="description_pump_insight">Pump integration for Accu-Chek Insight pumps, requires having SightRemote installed</string>
|
||||
<string name="description_pump_mdi">Pump integration for people who do multiple daily injections for their diabetes therapy</string>
|
||||
<string name="description_pump_virtual">Pump integration for pumps which don\'t have any driver yet (Open Loop)</string>
|
||||
<string name="description_sensitivity_aaps">Sensitivity is calculated the same way like Oref0, but you can specify timeframe to the past. Minimal carb absorption is calculated from max carb absorption time from preferences.</string>
|
||||
<string name="description_sensitivity_oref0">Sensitivity is calculated from 24h data in the past and carbs (if not absorbed) are cut after time specified in preferences.</string>
|
||||
<string name="description_sensitivity_oref1">Sensitivity is calculated from 24h data in the past and carbs (if not absorbed) are cut after time specified in preferences. Plugin also calculates UAM.</string>
|
||||
<string name="description_sensitivity_oref1">Sensitivity is calculated from 8h data in the past and carbs (if not absorbed) are cut after time specified in preferences. Plugin also calculates UAM.</string>
|
||||
<string name="description_sensitivity_weighted_average">Sensitivity is calculated as a weighted average from deviations. Newer deviations have higher weight. Minimal carb absorption is calculated from max carb absorption time from preferences. This algorithm is the fastest in following sensitivity changes.</string>
|
||||
<string name="description_source_dexcom_g5">Receive BG values from the patched Dexcom G5 app.</string>
|
||||
<string name="description_source_glimp">Receive BG values from Glimp.</string>
|
||||
|
@ -717,7 +719,6 @@
|
|||
<string name="free_peak_oref">Free-Peak Oref</string>
|
||||
<string name="rapid_acting_oref">Rapid-Acting Oref</string>
|
||||
<string name="ultrarapid_oref">Ultra-Rapid Oref</string>
|
||||
<string name="free_peak_oref_description">Custom insulin</string>
|
||||
<string name="dia_too_short" formatted="false">DIA of %f too short - using %f instead!</string>
|
||||
<string name="activate_profile">Activate profile</string>
|
||||
<string name="date">Date</string>
|
||||
|
@ -1117,7 +1118,6 @@
|
|||
<string name="readstatus">Read status</string>
|
||||
<string name="adjustprofileinns">Changes must be done in NS</string>
|
||||
<string name="exitwizard">Skip setup wizard</string>
|
||||
<string name="setupwizard_bgsource_description">Where should blood glucose(BG) data be coming from ?\n</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.\n</string>
|
||||
<string name="enableobjectives">Enable Objectives</string>
|
||||
|
|
Loading…
Reference in a new issue