wearwizard settings on phone

This commit is contained in:
AdrianLxM 2018-05-03 17:15:36 +02:00
parent c394c045c9
commit fe0f2e3ce6
3 changed files with 48 additions and 5 deletions

View file

@ -192,11 +192,11 @@ public class ActionStringHandler {
return; return;
} }
boolean useBG = true; boolean useBG = SP.getBoolean(R.string.key_wearwizard_bg, true);
boolean useBolusIOB = true; boolean useBolusIOB = SP.getBoolean(R.string.key_wearwizard_bolusiob, true);
boolean useBasalIOB = true; boolean useBasalIOB = SP.getBoolean(R.string.key_wearwizard_basaliob, true);
boolean useCOB = true; boolean useCOB = SP.getBoolean(R.string.key_wearwizard_cob, true);
boolean useTrend = true; boolean useTrend = SP.getBoolean(R.string.key_wearwizard_trend, false);
int percentage = Integer.parseInt(act[2]); int percentage = Integer.parseInt(act[2]);
Profile profile = MainApp.getConfigBuilder().getProfile(); Profile profile = MainApp.getConfigBuilder().getProfile();

View file

@ -1035,4 +1035,11 @@
<string name="openapsama_current_basal_safety_multiplier">Current basal safety multiplier</string> <string name="openapsama_current_basal_safety_multiplier">Current basal safety multiplier</string>
<string name="value_unavailable_short">n/a</string> <string name="value_unavailable_short">n/a</string>
<string name="ns_autobackfill_title">Autobackfill BG</string> <string name="ns_autobackfill_title">Autobackfill BG</string>
<string name="wear_wizard_settings">Wizard settings</string>
<string translatable="false" name="key_wearwizard_bg">wearwizard_bg</string>
<string translatable="false" name="key_wearwizard_trend">wearwizard_trend</string>
<string translatable="false" name="key_wearwizard_cob">wearwizard_cob</string>
<string translatable="false" name="key_wearwizard_bolusiob">wearwizard_bolusiob</string>
<string translatable="false" name="key_wearwizard_basaliob">wearwizard_basaliob</string>
<string name="wear_wizard_settings_summary">Calculations included in the Wizard result:</string>
</resources> </resources>

View file

@ -13,6 +13,42 @@
android:summary="@string/wearcontrol_summary" android:summary="@string/wearcontrol_summary"
android:title="@string/wearcontrol_title" /> android:title="@string/wearcontrol_title" />
<PreferenceCategory
android:key="wearplugin"
android:title="@string/wear_wizard_settings"
android:summary="@string/wear_wizard_settings_summary"
android:dependency="wearcontrol">
<CheckBoxPreference
android:key="@string/key_wearwizard_bg"
android:title="@string/treatments_wizard_bg_label"
android:defaultValue="true"
android:dependency="wearcontrol"/>
<CheckBoxPreference
android:key="@string/key_wearwizard_trend"
android:title="@string/treatments_wizard_bgtrend_label"
android:defaultValue="false"
android:dependency="wearcontrol"/>
<CheckBoxPreference
android:key="@string/key_wearwizard_cob"
android:title="@string/treatments_wizard_cob_label"
android:defaultValue="true"
android:dependency="wearcontrol"/>
<CheckBoxPreference
android:key="@string/key_wearwizard_bolusiob"
android:title="@string/treatments_wizard_bolusiob_label"
android:defaultValue="true"
android:dependency="wearcontrol"/>
<CheckBoxPreference
android:key="@string/key_wearwizard_basaliob"
android:title="@string/treatments_wizard_basaliob_label"
android:defaultValue="true"
android:dependency="wearcontrol"/>
</PreferenceCategory>
<SwitchPreference <SwitchPreference
android:defaultValue="true" android:defaultValue="true"
android:key="wear_detailediob" android:key="wear_detailediob"