Merge pull request #2275 from jotomo/pref-smb-minutes-validation
OpenAPS SMB: max SMB minutes: restrict to valid inputs.
This commit is contained in:
commit
d306d85398
|
@ -200,6 +200,16 @@
|
|||
<item>@string/key_medtronic_pump_battery_nizn</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="smbMaxMinutes">
|
||||
<item>15</item>
|
||||
<item>30</item>
|
||||
<item>45</item>
|
||||
<item>60</item>
|
||||
<item>75</item>
|
||||
<item>90</item>
|
||||
<item>105</item>
|
||||
<item>120</item>
|
||||
</string-array>
|
||||
|
||||
key_medtronic_bolus_debug
|
||||
|
||||
|
|
|
@ -65,19 +65,12 @@
|
|||
android:summary="@string/enablesmbaftercarbs_summary"
|
||||
android:title="@string/enablesmbaftercarbs" />
|
||||
|
||||
<com.andreabaccega.widget.ValidatingEditTextPreference
|
||||
<ListPreference
|
||||
android:defaultValue="30"
|
||||
android:dialogMessage="@string/smbmaxminutes"
|
||||
android:digits="0123456789"
|
||||
android:inputType="number"
|
||||
android:entries="@array/smbMaxMinutes"
|
||||
android:entryValues="@array/smbMaxMinutes"
|
||||
android:key="@string/key_smbmaxminutes"
|
||||
android:maxLines="20"
|
||||
android:selectAllOnFocus="true"
|
||||
android:singleLine="true"
|
||||
android:title="@string/smbmaxminutes_summary"
|
||||
validate:maxNumber="120"
|
||||
validate:minNumber="15"
|
||||
validate:testType="numericRange" />
|
||||
android:title="@string/smbmaxminutes_summary" />
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
|
|
Loading…
Reference in a new issue