Preference xml files cleanup
This commit is contained in:
parent
f3a03cb17b
commit
0d85ad4f69
47 changed files with 705 additions and 490 deletions
|
@ -25,7 +25,6 @@ jacoco {
|
|||
}
|
||||
|
||||
ext {
|
||||
supportLibraryVersion = "28.0.0"
|
||||
ormLiteVersion = "4.46"
|
||||
powermockVersion = "1.7.3"
|
||||
dexmakerVersion = "1.2"
|
||||
|
|
|
@ -25,6 +25,7 @@ import info.nightscout.androidaps.plugins.bus.RxBusWrapper
|
|||
import info.nightscout.androidaps.plugins.constraints.safety.SafetyPlugin
|
||||
import info.nightscout.androidaps.plugins.general.automation.AutomationPlugin
|
||||
import info.nightscout.androidaps.plugins.general.careportal.CareportalPlugin
|
||||
import info.nightscout.androidaps.plugins.general.maintenance.MaintenancePlugin
|
||||
import info.nightscout.androidaps.plugins.general.nsclient.NSClientPlugin
|
||||
import info.nightscout.androidaps.plugins.general.smsCommunicator.SmsCommunicatorPlugin
|
||||
import info.nightscout.androidaps.plugins.general.tidepool.TidepoolPlugin
|
||||
|
@ -84,6 +85,7 @@ class MyPreferenceFragment : PreferenceFragmentCompat(), OnSharedPreferenceChang
|
|||
@Inject lateinit var tidepoolPlugin: TidepoolPlugin
|
||||
@Inject lateinit var virtualPumpPlugin: VirtualPumpPlugin
|
||||
@Inject lateinit var wearPlugin: WearPlugin
|
||||
@Inject lateinit var maintenancePlugin: MaintenancePlugin
|
||||
|
||||
@Inject lateinit var androidInjector: DispatchingAndroidInjector<Any>
|
||||
|
||||
|
@ -104,6 +106,10 @@ class MyPreferenceFragment : PreferenceFragmentCompat(), OnSharedPreferenceChang
|
|||
outState.putInt("id", pluginId)
|
||||
}
|
||||
|
||||
private fun addPreferencesFromResourceIfEnabled(p: PluginBase?, rootKey: String?, enabled: Boolean) {
|
||||
if (enabled) addPreferencesFromResourceIfEnabled(p, rootKey)
|
||||
}
|
||||
|
||||
private fun addPreferencesFromResourceIfEnabled(p: PluginBase?, rootKey: String?) {
|
||||
if (p!!.isEnabled() && p.preferencesId != -1)
|
||||
addPreferencesFromResource(p.preferencesId, rootKey)
|
||||
|
@ -117,59 +123,49 @@ class MyPreferenceFragment : PreferenceFragmentCompat(), OnSharedPreferenceChang
|
|||
}
|
||||
|
||||
override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
|
||||
if (savedInstanceState != null && savedInstanceState.containsKey("id")) {
|
||||
pluginId = savedInstanceState.getInt("id")
|
||||
}
|
||||
if (arguments != null && arguments!!.containsKey("id")) {
|
||||
pluginId = arguments!!.getInt("id")
|
||||
(savedInstanceState ?: arguments)?.let { bundle ->
|
||||
if (bundle.containsKey("id")) {
|
||||
pluginId = bundle.getInt("id")
|
||||
}
|
||||
}
|
||||
if (pluginId != -1) {
|
||||
addPreferencesFromResource(pluginId, rootKey)
|
||||
} else {
|
||||
if (!Config.NSCLIENT) {
|
||||
addPreferencesFromResource(R.xml.pref_password, rootKey)
|
||||
}
|
||||
addPreferencesFromResource(R.xml.pref_general, rootKey)
|
||||
addPreferencesFromResource(R.xml.pref_age, rootKey)
|
||||
addPreferencesFromResource(R.xml.pref_overview, rootKey)
|
||||
addPreferencesFromResourceIfEnabled(safetyPlugin, rootKey)
|
||||
addPreferencesFromResourceIfEnabled(eversensePlugin, rootKey)
|
||||
addPreferencesFromResourceIfEnabled(dexcomPlugin, rootKey)
|
||||
addPreferencesFromResourceIfEnabled(tomatoPlugin, rootKey)
|
||||
addPreferencesFromResourceIfEnabled(poctechPlugin, rootKey)
|
||||
addPreferencesFromResourceIfEnabled(glimpPlugin, rootKey)
|
||||
addPreferencesFromResourceIfEnabled(careportalPlugin, rootKey)
|
||||
addPreferencesFromResourceIfEnabled(safetyPlugin, rootKey)
|
||||
if (Config.APS) {
|
||||
addPreferencesFromResourceIfEnabled(loopPlugin, rootKey)
|
||||
addPreferencesFromResourceIfEnabled(openAPSMAPlugin, rootKey)
|
||||
addPreferencesFromResourceIfEnabled(openAPSAMAPlugin, rootKey)
|
||||
addPreferencesFromResourceIfEnabled(openAPSSMBPlugin, rootKey)
|
||||
}
|
||||
addPreferencesFromResourceIfEnabled(loopPlugin, rootKey, Config.APS)
|
||||
addPreferencesFromResourceIfEnabled(openAPSMAPlugin, rootKey, Config.APS)
|
||||
addPreferencesFromResourceIfEnabled(openAPSAMAPlugin, rootKey, Config.APS)
|
||||
addPreferencesFromResourceIfEnabled(openAPSSMBPlugin, rootKey, Config.APS)
|
||||
addPreferencesFromResourceIfEnabled(SensitivityAAPSPlugin.getPlugin(), rootKey)
|
||||
addPreferencesFromResourceIfEnabled(SensitivityWeightedAveragePlugin.getPlugin(), rootKey)
|
||||
addPreferencesFromResourceIfEnabled(SensitivityOref0Plugin.getPlugin(), rootKey)
|
||||
addPreferencesFromResourceIfEnabled(SensitivityOref1Plugin.getPlugin(), rootKey)
|
||||
if (Config.PUMPDRIVERS) {
|
||||
addPreferencesFromResourceIfEnabled(danaRPlugin, rootKey)
|
||||
addPreferencesFromResourceIfEnabled(danaRKoreanPlugin, rootKey)
|
||||
addPreferencesFromResourceIfEnabled(danaRv2Plugin, rootKey)
|
||||
addPreferencesFromResourceIfEnabled(danaRSPlugin, rootKey)
|
||||
addPreferencesFromResourceIfEnabled(LocalInsightPlugin.getPlugin(), rootKey)
|
||||
addPreferencesFromResourceIfEnabled(ComboPlugin.getPlugin(), rootKey)
|
||||
addPreferencesFromResourceIfEnabled(MedtronicPumpPlugin.getPlugin(), rootKey)
|
||||
}
|
||||
if (!Config.NSCLIENT) {
|
||||
addPreferencesFromResourceIfEnabled(virtualPumpPlugin, rootKey)
|
||||
}
|
||||
addPreferencesFromResourceIfEnabled(danaRPlugin, rootKey, Config.PUMPDRIVERS)
|
||||
addPreferencesFromResourceIfEnabled(danaRKoreanPlugin, rootKey, Config.PUMPDRIVERS)
|
||||
addPreferencesFromResourceIfEnabled(danaRv2Plugin, rootKey, Config.PUMPDRIVERS)
|
||||
addPreferencesFromResourceIfEnabled(danaRSPlugin, rootKey, Config.PUMPDRIVERS)
|
||||
addPreferencesFromResourceIfEnabled(LocalInsightPlugin.getPlugin(), rootKey, Config.PUMPDRIVERS)
|
||||
addPreferencesFromResourceIfEnabled(ComboPlugin.getPlugin(), rootKey, Config.PUMPDRIVERS)
|
||||
addPreferencesFromResourceIfEnabled(MedtronicPumpPlugin.getPlugin(), rootKey, Config.PUMPDRIVERS)
|
||||
addPreferencesFromResourceIfEnabled(virtualPumpPlugin, rootKey, !Config.NSCLIENT)
|
||||
addPreferencesFromResourceIfEnabled(insulinOrefFreePeakPlugin, rootKey)
|
||||
addPreferencesFromResourceIfEnabled(NSClientPlugin.getPlugin(), rootKey)
|
||||
addPreferencesFromResourceIfEnabled(tidepoolPlugin, rootKey)
|
||||
addPreferencesFromResourceIfEnabled(smsCommunicatorPlugin, rootKey)
|
||||
addPreferencesFromResourceIfEnabled(automationPlugin, rootKey)
|
||||
addPreferencesFromResource(R.xml.pref_others, rootKey)
|
||||
addPreferencesFromResource(R.xml.pref_datachoices, rootKey)
|
||||
addPreferencesFromResourceIfEnabled(wearPlugin, rootKey)
|
||||
addPreferencesFromResourceIfEnabled(statusLinePlugin, rootKey)
|
||||
addPreferencesFromResource(R.xml.pref_alerts, rootKey) // TODO not organized well
|
||||
addPreferencesFromResource(R.xml.pref_datachoices, rootKey)
|
||||
addPreferencesFromResourceIfEnabled(maintenancePlugin, rootKey)
|
||||
}
|
||||
initSummary(preferenceScreen)
|
||||
for (plugin in MainApp.getPluginsList()) {
|
||||
|
|
|
@ -21,6 +21,7 @@ class DefaultEditTextValidator : EditTextValidator {
|
|||
protected var customFormat: String? = null
|
||||
protected var emptyErrorStringActual: String? = null
|
||||
protected var emptyErrorStringDef: String? = null
|
||||
protected var minLength = 0
|
||||
protected var minNumber = 0
|
||||
protected var maxNumber = 0
|
||||
protected var floatminNumber = 0f
|
||||
|
@ -43,6 +44,8 @@ class DefaultEditTextValidator : EditTextValidator {
|
|||
customRegexp = typedArray.getString(R.styleable.FormEditText_customRegexp)
|
||||
emptyErrorStringDef = typedArray.getString(R.styleable.FormEditText_emptyErrorString)
|
||||
customFormat = typedArray.getString(R.styleable.FormEditText_customFormat)
|
||||
if (testType == EditTextValidator.TEST_MIN_LENGTH)
|
||||
minLength = typedArray.getInt(R.styleable.FormEditText_minLength, 0)
|
||||
if (testType == EditTextValidator.TEST_NUMERIC_RANGE) {
|
||||
minNumber = typedArray.getInt(R.styleable.FormEditText_minNumber, Int.MIN_VALUE)
|
||||
maxNumber = typedArray.getInt(R.styleable.FormEditText_maxNumber, Int.MAX_VALUE)
|
||||
|
@ -113,11 +116,14 @@ class DefaultEditTextValidator : EditTextValidator {
|
|||
EditTextValidator.TEST_CREDITCARD -> toAdd = CreditCardValidator(if (TextUtils.isEmpty(testErrorString)) context.getString(R.string.error_creditcard_number_not_valid) else testErrorString)
|
||||
EditTextValidator.TEST_EMAIL -> toAdd = EmailValidator(if (TextUtils.isEmpty(testErrorString)) context.getString(R.string.error_email_address_not_valid) else testErrorString)
|
||||
EditTextValidator.TEST_PHONE -> toAdd = PhoneValidator(if (TextUtils.isEmpty(testErrorString)) context.getString(R.string.error_phone_not_valid) else testErrorString)
|
||||
EditTextValidator.TEST_MULTI_PHONE -> toAdd = MultiPhoneValidator(if (TextUtils.isEmpty(testErrorString)) context.getString(R.string.error_phone_not_valid) else testErrorString)
|
||||
EditTextValidator.TEST_DOMAINNAME -> toAdd = DomainValidator(if (TextUtils.isEmpty(testErrorString)) context.getString(R.string.error_domain_not_valid) else testErrorString)
|
||||
EditTextValidator.TEST_IPADDRESS -> toAdd = IpAddressValidator(if (TextUtils.isEmpty(testErrorString)) context.getString(R.string.error_ip_not_valid) else testErrorString)
|
||||
EditTextValidator.TEST_WEBURL -> toAdd = WebUrlValidator(if (TextUtils.isEmpty(testErrorString)) context.getString(R.string.error_url_not_valid) else testErrorString)
|
||||
EditTextValidator.TEST_HTTPS_URL -> toAdd = HttpsUrlValidator(if (TextUtils.isEmpty(testErrorString)) context.getString(R.string.error_url_not_valid) else testErrorString)
|
||||
EditTextValidator.TEST_PERSONNAME -> toAdd = PersonNameValidator(if (TextUtils.isEmpty(testErrorString)) context.getString(R.string.error_notvalid_personname) else testErrorString)
|
||||
EditTextValidator.TEST_PERSONFULLNAME -> toAdd = PersonFullNameValidator(if (TextUtils.isEmpty(testErrorString)) context.getString(R.string.error_notvalid_personfullname) else testErrorString)
|
||||
EditTextValidator.TEST_MIN_LENGTH -> toAdd = MinDigitLengthValidator(if (TextUtils.isEmpty(testErrorString)) context.getString(R.string.error_not_a_minimum_length) else testErrorString, minLength)
|
||||
|
||||
EditTextValidator.TEST_CUSTOM -> {
|
||||
// must specify the fully qualified class name & an error message
|
||||
|
@ -213,13 +219,15 @@ class DefaultEditTextValidator : EditTextValidator {
|
|||
}
|
||||
|
||||
override fun showUIError() {
|
||||
if (mValidator!!.hasErrorMessage()) {
|
||||
try {
|
||||
val parent = editTextView.parent as TextInputLayout
|
||||
parent.isErrorEnabled = true
|
||||
parent.error = mValidator!!.errorMessage
|
||||
} catch (e: Throwable) {
|
||||
editTextView.error = mValidator!!.errorMessage
|
||||
mValidator?.let { mValidator ->
|
||||
if (mValidator.hasErrorMessage()) {
|
||||
try {
|
||||
val parent = editTextView.parent as TextInputLayout
|
||||
parent.isErrorEnabled = true
|
||||
parent.error = mValidator.errorMessage
|
||||
} catch (e: Throwable) {
|
||||
editTextView.error = mValidator.errorMessage
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -87,4 +87,10 @@ public interface EditTextValidator {
|
|||
|
||||
int TEST_FLOAT_NUMERIC_RANGE = 16;
|
||||
|
||||
int TEST_HTTPS_URL = 17;
|
||||
|
||||
int TEST_MIN_LENGTH = 18;
|
||||
|
||||
int TEST_MULTI_PHONE = 19;
|
||||
|
||||
}
|
||||
|
|
|
@ -8,11 +8,10 @@ import androidx.preference.EditTextPreference.OnBindEditTextListener
|
|||
import androidx.preference.PreferenceViewHolder
|
||||
import info.nightscout.androidaps.R
|
||||
|
||||
class ValidatingEditTextPreference(private val ctx: Context, val attrs: AttributeSet, private val defStyleAttr: Int, private val defStyleRes: Int)
|
||||
class ValidatingEditTextPreference(ctx: Context, attrs: AttributeSet, defStyleAttr: Int, defStyleRes: Int)
|
||||
: EditTextPreference(ctx, attrs, defStyleAttr, defStyleRes) {
|
||||
|
||||
init {
|
||||
dialogLayoutResource = R.layout.dialog_preference
|
||||
val typedArray = context.obtainStyledAttributes(attrs, R.styleable.FormEditText, 0, 0)
|
||||
val onBindEditTextListener = OnBindEditTextListener { editText ->
|
||||
editTextValidator = DefaultEditTextValidator(editText, typedArray, context)
|
||||
|
@ -27,7 +26,7 @@ class ValidatingEditTextPreference(private val ctx: Context, val attrs: Attribut
|
|||
: this(ctx, attrs, TypedArrayUtils.getAttr(ctx, R.attr.editTextPreferenceStyle,
|
||||
R.attr.editTextPreferenceStyle))
|
||||
|
||||
lateinit var editTextValidator: EditTextValidator
|
||||
private lateinit var editTextValidator: EditTextValidator
|
||||
|
||||
override fun onBindViewHolder(holder: PreferenceViewHolder?) {
|
||||
super.onBindViewHolder(holder)
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
package info.nightscout.androidaps.utils.textValidator.validators
|
||||
|
||||
import android.widget.EditText
|
||||
|
||||
class HttpsUrlValidator(_customErrorMessage: String?) : WebUrlValidator(_customErrorMessage) {
|
||||
|
||||
override fun isValid(editText: EditText): Boolean =
|
||||
super.isValid(editText) && editText.text.startsWith("https://", ignoreCase = true)
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
package info.nightscout.androidaps.utils.textValidator.validators
|
||||
|
||||
import android.widget.EditText
|
||||
|
||||
class MinDigitLengthValidator(message: String?, private val min: Int) : Validator(message) {
|
||||
|
||||
override fun isValid(editText: EditText): Boolean {
|
||||
val length = editText.text.toString().length
|
||||
return length >= min
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
package info.nightscout.androidaps.utils.textValidator.validators
|
||||
|
||||
import android.util.Patterns
|
||||
import android.widget.EditText
|
||||
|
||||
class MultiPhoneValidator(val _customErrorMessage: String?) : Validator(_customErrorMessage) {
|
||||
|
||||
override fun isValid(editText: EditText): Boolean {
|
||||
val substrings = editText.text.split(";").toTypedArray()
|
||||
for (number in substrings) {
|
||||
if (!PatternValidator(_customErrorMessage, Patterns.PHONE).isValid(number))
|
||||
return false
|
||||
}
|
||||
return substrings.isNotEmpty()
|
||||
}
|
||||
}
|
|
@ -24,4 +24,8 @@ open class PatternValidator(_customErrorMessage: String?, val pattern: Pattern)
|
|||
override fun isValid(editText: EditText): Boolean {
|
||||
return pattern.matcher(editText.text).matches()
|
||||
}
|
||||
|
||||
fun isValid(text: String): Boolean {
|
||||
return pattern.matcher(text).matches()
|
||||
}
|
||||
}
|
|
@ -8,4 +8,4 @@ import android.util.Patterns
|
|||
*
|
||||
* @author Andrea Baccega <me></me>@andreabaccega.com>
|
||||
*/
|
||||
class WebUrlValidator(_customErrorMessage: String?) : PatternValidator(_customErrorMessage, Patterns.WEB_URL)
|
||||
open class WebUrlValidator(_customErrorMessage: String?) : PatternValidator(_customErrorMessage, Patterns.WEB_URL)
|
|
@ -1,25 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="48dp"
|
||||
android:layout_marginBottom="48dp"
|
||||
android:overScrollMode="ifContentScrolls">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/edittext_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="20dp">
|
||||
|
||||
<EditText
|
||||
android:id="@android:id/edit"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="4dp"
|
||||
android:paddingEnd="4dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
|
@ -20,6 +20,9 @@
|
|||
<enum name="date" value="14" />
|
||||
<enum name="numericRange" value="15" />
|
||||
<enum name="floatNumericRange" value="16" />
|
||||
<enum name="httpsUrl" value="17" />
|
||||
<enum name="minLength" value="18" />
|
||||
<enum name="multiPhone" value="19" />
|
||||
</attr>
|
||||
<attr name="testErrorString" format="string" />
|
||||
<attr name="emptyErrorString" format="string" />
|
||||
|
@ -27,6 +30,7 @@
|
|||
<attr name="customFormat" format="string" />
|
||||
<attr name="emptyAllowed" format="boolean" />
|
||||
<attr name="classType" format="string" />
|
||||
<attr name="minLength" format="integer" />
|
||||
<attr name="minNumber" format="integer" />
|
||||
<attr name="maxNumber" format="integer" />
|
||||
<attr name="floatminNumber" format="float" />
|
||||
|
|
|
@ -1141,7 +1141,7 @@
|
|||
<string name="allow_hardware_pump_text">Attention: If you activate and connect to a hardware pump, AndroidAPS will copy the basal settings from the profile to the pump, overwriting the existing basal rate stored on the pump. Make sure you have the correct basal setting in AndroidAPS. If you are not sure or don\'t want to overwrite the basal settings on your pump, press cancel and repeat switching to the pump at a later time.</string>
|
||||
<string name="error_adding_treatment_title">Treatment data incomplete</string>
|
||||
<string name="maintenance_settings">Maintenance Settings</string>
|
||||
<string name="maintenance_email">Email</string>
|
||||
<string name="maintenance_email">Email recipient</string>
|
||||
<string name="key_maintenance_logs_email" translatable="false">maintenance_logs_email</string>
|
||||
<string name="key_maintenance_logs_amount" translatable="false">maintenance_logs_amount</string>
|
||||
<string name="key_logshipper_amount" translatable="false">logshipper_amount</string>
|
||||
|
@ -1687,5 +1687,6 @@
|
|||
<string name="key_snooze_dst_in24h" translatable="false">snooze_dst_in24h</string>
|
||||
<string name="key_snooze_loopdisabled" translatable="false">snooze_loopdisabled</string>
|
||||
<string name="key_enable_fabric">enable_fabric</string>
|
||||
<string name="sixdigitnumber">^\\d{6}</string>
|
||||
|
||||
</resources>
|
||||
|
|
|
@ -14,4 +14,10 @@
|
|||
<string name="error_notvalid_personname">Not a valid first or last name.</string>
|
||||
<string name="error_notvalid_personfullname">Not a valid full name.</string>
|
||||
<string name="error_date_not_valid">Format not valid</string>
|
||||
<string name="error_mustbe4digitnumber">Must be 4 digit number</string>
|
||||
<string name="error_mustbe6digitnumber">Must be 6 digit number</string>
|
||||
<string name="error_not_a_minimum_length">Not a minimum length</string>
|
||||
|
||||
<string name="fourdigitnumber" translatable="false">^\\d{4}</string>
|
||||
|
||||
</resources>
|
|
@ -1,10 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:validate="http://schemas.android.com/apk/res-auto">
|
||||
<androidx.preference.PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:validate="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<PreferenceCategory
|
||||
android:key="absorption"
|
||||
android:title="@string/absorptionsettings_title">
|
||||
android:title="@string/absorptionsettings_title"
|
||||
app:initialExpandedChildrenCount="0">
|
||||
|
||||
<info.nightscout.androidaps.utils.textValidator.ValidatingEditTextPreference
|
||||
android:defaultValue="6"
|
||||
|
|
|
@ -1,12 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:validate="http://schemas.android.com/apk/res-auto">
|
||||
<androidx.preference.PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:validate="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<PreferenceCategory
|
||||
android:key="absorption"
|
||||
android:title="@string/absorptionsettings_title">
|
||||
android:title="@string/absorptionsettings_title"
|
||||
app:initialExpandedChildrenCount="0">
|
||||
|
||||
<info.nightscout.androidaps.utils.textValidator.ValidatingEditTextPreference
|
||||
<info.nightscout.androidaps.utils.textValidator.ValidatingEditTextPreference
|
||||
android:defaultValue="8.0"
|
||||
android:dialogMessage="@string/openapsama_min_5m_carbimpact_summary"
|
||||
android:inputType="numberDecimal"
|
||||
|
|
|
@ -1,12 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:validate="http://schemas.android.com/apk/res-auto">
|
||||
<androidx.preference.PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:validate="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<PreferenceCategory
|
||||
android:key="absorption"
|
||||
android:title="@string/absorptionsettings_title">
|
||||
android:title="@string/absorptionsettings_title"
|
||||
app:initialExpandedChildrenCount="0">
|
||||
|
||||
<info.nightscout.androidaps.utils.textValidator.ValidatingEditTextPreference
|
||||
<info.nightscout.androidaps.utils.textValidator.ValidatingEditTextPreference
|
||||
android:defaultValue="8.0"
|
||||
android:dialogMessage="@string/openapsama_min_5m_carbimpact_summary"
|
||||
android:inputType="numberDecimal"
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<PreferenceCategory android:title="@string/patientage">
|
||||
|
||||
<ListPreference
|
||||
android:defaultValue="adult"
|
||||
android:entries="@array/ageArray"
|
||||
android:entryValues="@array/ageValues"
|
||||
android:key="@string/key_age"
|
||||
android:summary="@string/patientage_summary"
|
||||
android:title="@string/patientage" />
|
||||
</PreferenceCategory>
|
||||
</androidx.preference.PreferenceScreen>
|
47
app/src/main/res/xml/pref_alerts.xml
Normal file
47
app/src/main/res/xml/pref_alerts.xml
Normal file
|
@ -0,0 +1,47 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:validate="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<PreferenceCategory
|
||||
android:title="@string/localalertsettings_title"
|
||||
app:initialExpandedChildrenCount="0">
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="@string/key_enable_missed_bg_readings_alert"
|
||||
android:title="@string/enable_missed_bg_readings_alert" />
|
||||
|
||||
<info.nightscout.androidaps.utils.textValidator.ValidatingEditTextPreference
|
||||
android:defaultValue="30"
|
||||
android:dependency="@string/key_enable_missed_bg_readings_alert"
|
||||
android:inputType="number"
|
||||
android:key="@string/key_missed_bg_readings_threshold"
|
||||
android:title="@string/nsalarm_staledatavalue_label"
|
||||
validate:maxNumber="10000"
|
||||
validate:minNumber="15"
|
||||
validate:testType="numericRange" />
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="@string/key_enable_pump_unreachable_alert"
|
||||
android:title="@string/enable_pump_unreachable_alert" />
|
||||
|
||||
<info.nightscout.androidaps.utils.textValidator.ValidatingEditTextPreference
|
||||
android:defaultValue="30"
|
||||
android:dependency="@string/key_enable_pump_unreachable_alert"
|
||||
android:inputType="number"
|
||||
android:key="@string/key_pump_unreachable_threshold"
|
||||
android:title="@string/pump_unreachable_threshold"
|
||||
validate:maxNumber="300"
|
||||
validate:minNumber="30"
|
||||
validate:testType="numericRange" />
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="@string/key_raise_notifications_as_android_notifications"
|
||||
android:title="@string/raise_notifications_as_android_notifications" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
</androidx.preference.PreferenceScreen>
|
|
@ -1,7 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<PreferenceCategory android:title="@string/automation">
|
||||
<PreferenceCategory
|
||||
android:title="@string/automation"
|
||||
app:initialExpandedChildrenCount="0">
|
||||
|
||||
<ListPreference
|
||||
android:defaultValue="PASSIVE"
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<PreferenceCategory
|
||||
android:title="@string/bgsource_upload">
|
||||
android:title="@string/bgsource_upload"
|
||||
app:initialExpandedChildrenCount="0">
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<PreferenceCategory
|
||||
android:title="@string/bgsource_upload">
|
||||
android:title="@string/bgsource_upload"
|
||||
app:initialExpandedChildrenCount="0">
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
|
|
|
@ -1,18 +1,24 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:validate="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<PreferenceCategory
|
||||
android:title="@string/danar_pump_settings">
|
||||
android:title="@string/danar_pump_settings"
|
||||
app:initialExpandedChildrenCount="0">
|
||||
|
||||
<info.nightscout.androidaps.plugins.pump.danaR.BluetoothDevicePreference
|
||||
android:dialogTitle="@string/danar_bt_name_title"
|
||||
android:key="@string/key_danar_bt_name"
|
||||
android:title="@string/danar_bt_name_title" />
|
||||
|
||||
<EditTextPreference
|
||||
<info.nightscout.androidaps.utils.textValidator.ValidatingEditTextPreference
|
||||
android:inputType="numberPassword"
|
||||
android:key="@string/key_danar_password"
|
||||
android:title="@string/danar_password_title"/>
|
||||
android:title="@string/danar_password_title"
|
||||
validate:customRegexp="@string/fourdigitnumber"
|
||||
validate:testErrorString="@string/error_mustbe4digitnumber"
|
||||
validate:testType="regexp" />
|
||||
|
||||
<ListPreference
|
||||
android:defaultValue="0"
|
||||
|
@ -36,7 +42,8 @@
|
|||
android:key="absorption_danar_advanced"
|
||||
android:title="@string/advancedsettings_title">
|
||||
|
||||
<PreferenceCategory android:title="@string/bluetooth">
|
||||
<PreferenceCategory
|
||||
android:title="@string/bluetooth">
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
|
|
|
@ -1,18 +1,24 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:validate="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<PreferenceCategory
|
||||
android:title="@string/danar_pump_settings">
|
||||
android:title="@string/danar_pump_settings"
|
||||
app:initialExpandedChildrenCount="0">
|
||||
|
||||
<info.nightscout.androidaps.plugins.pump.danaR.BluetoothDevicePreference
|
||||
android:dialogTitle="@string/danar_bt_name_title"
|
||||
android:key="@string/key_danar_bt_name"
|
||||
android:title="@string/danar_bt_name_title" />
|
||||
|
||||
<EditTextPreference
|
||||
<info.nightscout.androidaps.utils.textValidator.ValidatingEditTextPreference
|
||||
android:inputType="numberPassword"
|
||||
android:key="@string/key_danar_password"
|
||||
android:title="@string/danar_password_title" />
|
||||
android:title="@string/danar_password_title"
|
||||
validate:customRegexp="@string/fourdigitnumber"
|
||||
validate:testErrorString="@string/error_mustbe4digitnumber"
|
||||
validate:testType="regexp" />
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:validate="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<PreferenceCategory android:title="@string/danarspump">
|
||||
<PreferenceCategory
|
||||
android:title="@string/danarspump"
|
||||
app:initialExpandedChildrenCount="0">
|
||||
|
||||
<Preference
|
||||
android:key="blescannner"
|
||||
|
@ -16,10 +20,13 @@
|
|||
android:summary=""
|
||||
android:title="@string/selectedpump" />
|
||||
|
||||
<EditTextPreference
|
||||
android:inputType="textCapCharacters"
|
||||
<info.nightscout.androidaps.utils.textValidator.ValidatingEditTextPreference
|
||||
android:inputType="numberPassword"
|
||||
android:key="@string/key_danar_password"
|
||||
android:title="@string/danar_password_title"/>
|
||||
android:title="@string/danar_password_title"
|
||||
validate:customRegexp="@string/fourdigitnumber"
|
||||
validate:testErrorString="@string/error_mustbe4digitnumber"
|
||||
validate:testType="regexp" />
|
||||
|
||||
<ListPreference
|
||||
android:defaultValue="0"
|
||||
|
|
|
@ -1,18 +1,24 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:validate="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<PreferenceCategory
|
||||
android:title="@string/danar_pump_settings">
|
||||
android:title="@string/danar_pump_settings"
|
||||
app:initialExpandedChildrenCount="0">
|
||||
|
||||
<info.nightscout.androidaps.plugins.pump.danaR.BluetoothDevicePreference
|
||||
android:dialogTitle="@string/danar_bt_name_title"
|
||||
android:key="@string/key_danar_bt_name"
|
||||
android:title="@string/danar_bt_name_title" />
|
||||
|
||||
<EditTextPreference
|
||||
<info.nightscout.androidaps.utils.textValidator.ValidatingEditTextPreference
|
||||
android:inputType="numberPassword"
|
||||
android:key="@string/key_danar_password"
|
||||
android:title="@string/danar_password_title" />
|
||||
android:title="@string/danar_password_title"
|
||||
validate:customRegexp="@string/fourdigitnumber"
|
||||
validate:testErrorString="@string/error_mustbe4digitnumber"
|
||||
validate:testType="regexp" />
|
||||
|
||||
<ListPreference
|
||||
android:defaultValue="0"
|
||||
|
|
|
@ -1,23 +1,16 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<PreferenceCategory
|
||||
android:title="@string/data_choices">
|
||||
android:title="@string/data_choices"
|
||||
app:initialExpandedChildrenCount="0">
|
||||
|
||||
<androidx.preference.PreferenceScreen
|
||||
android:key="absorption_datachoices_advanced"
|
||||
android:title="@string/advancedsettings_title">
|
||||
|
||||
<PreferenceCategory android:title="@string/data_choices">
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="@string/key_enable_fabric"
|
||||
android:summary="@string/allow_automated_crash_reporting"
|
||||
android:title="@string/fabric_upload" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
</androidx.preference.PreferenceScreen>
|
||||
<SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="@string/key_enable_fabric"
|
||||
android:summary="@string/allow_automated_crash_reporting"
|
||||
android:title="@string/fabric_upload" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
|
|
|
@ -1,22 +1,29 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<PreferenceCategory
|
||||
app:initialExpandedChildrenCount="0"
|
||||
android:title="@string/configbuilder_general">
|
||||
|
||||
<ListPreference
|
||||
android:title="@string/unitsnosemicolon"
|
||||
android:defaultValue="mg/dl"
|
||||
android:entries="@array/unitsArray"
|
||||
android:entryValues="@array/unitsValues"
|
||||
android:key="@string/key_units" />
|
||||
android:key="@string/key_units"
|
||||
android:title="@string/unitsnosemicolon" />
|
||||
|
||||
<ListPreference
|
||||
android:title="@string/language"
|
||||
android:defaultValue="en"
|
||||
android:entries="@array/languagesArray"
|
||||
android:entryValues="@array/languagesValues"
|
||||
android:key="@string/key_language" />
|
||||
android:key="@string/key_language"
|
||||
android:title="@string/language" />
|
||||
|
||||
<EditTextPreference
|
||||
android:title="@string/settings_password"
|
||||
android:key="settings_password"
|
||||
android:inputType="textPassword"/>
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<PreferenceCategory android:title="@string/insight_local">
|
||||
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<PreferenceCategory
|
||||
android:title="@string/insight_local"
|
||||
app:initialExpandedChildrenCount="0">
|
||||
|
||||
<Preference android:title="@string/insight_pairing">
|
||||
<intent
|
||||
|
@ -61,5 +65,7 @@
|
|||
android:inputType="number"
|
||||
android:key="insight_disconnect_delay"
|
||||
android:title="@string/disconnect_delay" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
</androidx.preference.PreferenceScreen>
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<PreferenceCategory android:title="@string/insight_local">
|
||||
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<PreferenceCategory
|
||||
android:title="@string/insight_local"
|
||||
app:initialExpandedChildrenCount="0">
|
||||
|
||||
<Preference android:title="@string/insight_pairing">
|
||||
<intent
|
||||
|
@ -61,5 +65,7 @@
|
|||
android:inputType="number"
|
||||
android:key="insight_disconnect_delay"
|
||||
android:title="@string/disconnect_delay" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
</androidx.preference.PreferenceScreen>
|
||||
|
|
|
@ -1,21 +1,24 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:validate="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<PreferenceCategory
|
||||
android:key="InsulinOrefFreePeak"
|
||||
android:title="@string/insulin_oref_peak">
|
||||
android:title="@string/insulin_oref_peak"
|
||||
app:initialExpandedChildrenCount="0">
|
||||
|
||||
<info.nightscout.androidaps.utils.textValidator.ValidatingEditTextPreference
|
||||
validate:testType="numericRange"
|
||||
validate:minNumber="35"
|
||||
validate:maxNumber="120"
|
||||
android:digits="0123456789"
|
||||
android:defaultValue="75"
|
||||
android:selectAllOnFocus="true"
|
||||
android:digits="0123456789"
|
||||
android:inputType="number"
|
||||
android:key="@string/key_insulin_oref_peak"
|
||||
android:maxLines="20"
|
||||
android:selectAllOnFocus="true"
|
||||
android:title="@string/insulin_peak_time"
|
||||
android:key="@string/key_insulin_oref_peak" />
|
||||
validate:maxNumber="120"
|
||||
validate:minNumber="35"
|
||||
validate:testType="numericRange" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
</androidx.preference.PreferenceScreen>
|
|
@ -1,17 +1,18 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:validate="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<PreferenceCategory
|
||||
android:key="aps_general"
|
||||
app:initialExpandedChildrenCount="0"
|
||||
android:title="@string/loop">
|
||||
|
||||
<ListPreference
|
||||
android:title="@string/apsmode_title"
|
||||
android:key="@string/key_aps_mode"
|
||||
android:defaultValue="open"
|
||||
android:entries="@array/aps_modeArray"
|
||||
android:entryValues="@array/aps_modeValues"/>
|
||||
android:entryValues="@array/aps_modeValues"
|
||||
android:key="@string/key_aps_mode"
|
||||
android:title="@string/apsmode_title" />
|
||||
|
||||
<info.nightscout.androidaps.utils.textValidator.ValidatingEditTextPreference
|
||||
android:defaultValue="20"
|
||||
|
@ -28,4 +29,5 @@
|
|||
validate:testType="numericRange" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
</androidx.preference.PreferenceScreen>
|
|
@ -1,9 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:validate="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<PreferenceCategory
|
||||
android:key="maintenance"
|
||||
android:title="@string/maintenance_settings">
|
||||
android:title="@string/maintenance_settings"
|
||||
app:initialExpandedChildrenCount="0">
|
||||
|
||||
<info.nightscout.androidaps.utils.textValidator.ValidatingEditTextPreference
|
||||
android:defaultValue="logs@androidaps.org"
|
||||
|
@ -11,21 +14,17 @@
|
|||
android:inputType="textEmailAddress"
|
||||
android:key="@string/key_maintenance_logs_email"
|
||||
android:selectAllOnFocus="true"
|
||||
android:title="@string/maintenance_email" />
|
||||
android:title="@string/maintenance_email"
|
||||
validate:testType="email"/>
|
||||
|
||||
<!-- TODO: make this working with changed package name(nsclient)
|
||||
validatingEditText:emptyAllowed="false"
|
||||
validatingEditText:testErrorString="@string/invalid_email_message"
|
||||
validatingEditText:testType="email"
|
||||
-->
|
||||
|
||||
<EditTextPreference
|
||||
<info.nightscout.androidaps.utils.textValidator.ValidatingEditTextPreference
|
||||
android:defaultValue="2"
|
||||
android:inputType="number"
|
||||
android:key="@string/key_maintenance_logs_amount"
|
||||
android:title="@string/maintenance_amount">
|
||||
|
||||
</EditTextPreference>
|
||||
android:title="@string/maintenance_amount"
|
||||
validate:maxNumber="10"
|
||||
validate:minNumber="1"
|
||||
validate:testType="numericRange"/>
|
||||
|
||||
|
||||
</PreferenceCategory>
|
||||
|
|
|
@ -1,14 +1,22 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<PreferenceCategory android:title="@string/medtronic_name">
|
||||
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:validate="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<PreferenceCategory
|
||||
android:title="@string/medtronic_name"
|
||||
app:initialExpandedChildrenCount="0">
|
||||
|
||||
<EditTextPreference
|
||||
android:defaultValue="000000"
|
||||
android:key="@string/key_medtronic_serial"
|
||||
android:selectAllOnFocus="true"
|
||||
android:singleLine="false"
|
||||
android:title="@string/medtronic_serial_number" />
|
||||
android:title="@string/medtronic_serial_number"
|
||||
validate:customRegexp="@string/sixdigitnumber"
|
||||
validate:testErrorString="@string/error_mustbe6digitnumber"
|
||||
validate:testType="regexp" />
|
||||
|
||||
|
||||
<ListPreference
|
||||
android:defaultValue="1"
|
||||
|
@ -28,21 +36,27 @@
|
|||
|
||||
<EditTextPreference
|
||||
android:defaultValue="35"
|
||||
android:digits="0123456789."
|
||||
android:inputType="number"
|
||||
android:key="@string/key_medtronic_max_basal"
|
||||
android:selectAllOnFocus="true"
|
||||
android:singleLine="true"
|
||||
android:inputType="number"
|
||||
android:digits="0123456789."
|
||||
android:title="@string/medtronic_pump_max_basal" />
|
||||
android:title="@string/medtronic_pump_max_basal"
|
||||
validate:maxNumber="35"
|
||||
validate:minNumber="1"
|
||||
validate:testType="numericRange" />
|
||||
|
||||
<EditTextPreference
|
||||
android:defaultValue="25"
|
||||
android:digits="0123456789."
|
||||
android:inputType="number"
|
||||
android:key="@string/key_medtronic_max_bolus"
|
||||
android:selectAllOnFocus="true"
|
||||
android:singleLine="true"
|
||||
android:inputType="number"
|
||||
android:digits="0123456789."
|
||||
android:title="@string/medtronic_pump_max_bolus" />
|
||||
android:title="@string/medtronic_pump_max_bolus"
|
||||
validate:maxNumber="25"
|
||||
validate:minNumber="1"
|
||||
validate:testType="numericRange" />
|
||||
|
||||
<ListPreference
|
||||
android:defaultValue="10"
|
||||
|
@ -78,11 +92,12 @@
|
|||
|
||||
<info.nightscout.androidaps.plugins.pump.common.ui.RileyLinkSelectPreference
|
||||
android:enabled="true"
|
||||
android:key="@string/key_rileylink_mac_address"
|
||||
android:summary=""
|
||||
android:title="RileyLink Configuration"
|
||||
android:key="@string/key_rileylink_mac_address">
|
||||
android:title="RileyLink Configuration">
|
||||
<intent android:action="info.nightscout.androidaps.plugins.PumpCommon.dialog.RileyLinkBLEScanActivity" />
|
||||
</info.nightscout.androidaps.plugins.pump.common.ui.RileyLinkSelectPreference>
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
</androidx.preference.PreferenceScreen>
|
|
@ -1,8 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:validate="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<PreferenceCategory android:title="@string/nsclientinternal_title">
|
||||
<PreferenceCategory
|
||||
android:title="@string/nsclientinternal_title"
|
||||
app:initialExpandedChildrenCount="0">
|
||||
|
||||
<info.nightscout.androidaps.utils.textValidator.ValidatingEditTextPreference
|
||||
android:defaultValue="https://{YOUR-SITE}.azurewebsites.net/"
|
||||
|
@ -11,19 +14,23 @@
|
|||
android:key="@string/key_nsclientinternal_url"
|
||||
android:selectAllOnFocus="true"
|
||||
android:title="@string/nsclientinternal_url_title"
|
||||
validate:testType="webUrl" />
|
||||
validate:testType="httpsUrl" />
|
||||
|
||||
<EditTextPreference
|
||||
<info.nightscout.androidaps.utils.textValidator.ValidatingEditTextPreference
|
||||
android:dialogMessage="@string/nsclientinternal_secret_dialogmessage"
|
||||
android:dialogTitle="@string/nsclientinternal_secret_dialogtitle"
|
||||
android:inputType="textPassword"
|
||||
android:key="@string/key_nsclientinternal_api_secret"
|
||||
android:title="@string/nsclientinternal_secret_title" />
|
||||
android:title="@string/nsclientinternal_secret_title"
|
||||
validate:minLength="12"
|
||||
validate:testType="minLength"/>
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="@string/key_ns_logappstartedevent"
|
||||
android:title="@string/ns_logappstartedevent" />
|
||||
android:title="@string/ns_logappstartedevent"
|
||||
android:summary="@string/ns_logappstartedevent"
|
||||
/>
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
|
@ -98,8 +105,8 @@
|
|||
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="@string/key_ns_wifionly"
|
||||
android:disableDependentsState="true"
|
||||
android:key="@string/key_ns_wifionly"
|
||||
android:title="@string/ns_wifionly" />
|
||||
|
||||
<EditTextPreference
|
||||
|
@ -121,15 +128,15 @@
|
|||
|
||||
</androidx.preference.PreferenceScreen>
|
||||
|
||||
<androidx.preference.PreferenceScreen
|
||||
android:key="absorption_nsclient_advanced"
|
||||
android:title="@string/advancedsettings_title">
|
||||
<androidx.preference.PreferenceScreen
|
||||
android:key="absorption_nsclient_advanced"
|
||||
android:title="@string/advancedsettings_title">
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="@string/key_ns_autobackfill"
|
||||
android:title="@string/ns_autobackfill_title"
|
||||
android:summary="@string/ns_autobackfill_summary" />
|
||||
android:summary="@string/ns_autobackfill_summary"
|
||||
android:title="@string/ns_autobackfill_title" />
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="true"
|
||||
|
|
|
@ -1,23 +1,31 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:validate="http://schemas.android.com/apk/res-auto">
|
||||
<PreferenceCategory
|
||||
android:key="openapsama"
|
||||
android:title="@string/openapsama">
|
||||
|
||||
<EditTextPreference
|
||||
<PreferenceCategory
|
||||
android:title="@string/openapsama"
|
||||
app:initialExpandedChildrenCount="0">
|
||||
|
||||
<info.nightscout.androidaps.utils.textValidator.ValidatingEditTextPreference
|
||||
android:defaultValue="1"
|
||||
android:dialogMessage="@string/openapsma_maxbasal_summary"
|
||||
android:inputType="numberDecimal"
|
||||
android:key="@string/key_openapsma_max_basal"
|
||||
android:numeric="decimal"
|
||||
android:title="@string/openapsma_maxbasal_title" />
|
||||
android:title="@string/openapsma_maxbasal_title"
|
||||
validate:floatmaxNumber="12.0"
|
||||
validate:floatminNumber="0.1"
|
||||
validate:testType="floatNumericRange" />
|
||||
|
||||
<EditTextPreference
|
||||
<info.nightscout.androidaps.utils.textValidator.ValidatingEditTextPreference
|
||||
android:defaultValue="1.5"
|
||||
android:dialogMessage="@string/openapsma_maxiob_summary"
|
||||
android:inputType="numberDecimal"
|
||||
android:key="@string/key_openapsma_max_iob"
|
||||
android:numeric="decimal"
|
||||
android:title="@string/openapsma_maxiob_title" />
|
||||
android:title="@string/openapsma_maxiob_title"
|
||||
validate:floatmaxNumber="12.0"
|
||||
validate:floatminNumber="0"
|
||||
validate:testType="floatNumericRange" />
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
|
@ -35,12 +43,10 @@
|
|||
android:dialogMessage="@string/openapsama_min_5m_carbimpact_summary"
|
||||
android:inputType="numberDecimal"
|
||||
android:key="@string/key_openapsama_min_5m_carbimpact"
|
||||
android:maxLines="20"
|
||||
android:selectAllOnFocus="true"
|
||||
android:singleLine="true"
|
||||
android:title="@string/openapsama_min_5m_carbimpact"
|
||||
validate:floatmaxNumber="12.0"
|
||||
validate:floatminNumber="0.1"
|
||||
validate:floatminNumber="1"
|
||||
validate:testType="floatNumericRange" />
|
||||
|
||||
<androidx.preference.PreferenceScreen
|
||||
|
|
|
@ -1,23 +1,30 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:validate="http://schemas.android.com/apk/res-auto">
|
||||
<PreferenceCategory
|
||||
android:key="openaps"
|
||||
android:title="@string/openapsma">
|
||||
android:title="@string/openapsma"
|
||||
app:initialExpandedChildrenCount="0">
|
||||
|
||||
<EditTextPreference
|
||||
<info.nightscout.androidaps.utils.textValidator.ValidatingEditTextPreference
|
||||
android:defaultValue="1"
|
||||
android:dialogMessage="@string/openapsma_maxbasal_summary"
|
||||
android:inputType="numberDecimal"
|
||||
android:key="@string/key_openapsma_max_basal"
|
||||
android:numeric="decimal"
|
||||
android:title="@string/openapsma_maxbasal_title" />
|
||||
android:title="@string/openapsma_maxbasal_title"
|
||||
validate:floatmaxNumber="12.0"
|
||||
validate:floatminNumber="0.1"
|
||||
validate:testType="floatNumericRange" />
|
||||
|
||||
<EditTextPreference
|
||||
<info.nightscout.androidaps.utils.textValidator.ValidatingEditTextPreference
|
||||
android:defaultValue="1.5"
|
||||
android:dialogMessage="@string/openapsma_maxiob_summary"
|
||||
android:inputType="numberDecimal"
|
||||
android:key="@string/key_openapsma_max_iob"
|
||||
android:numeric="decimal"
|
||||
android:title="@string/openapsma_maxiob_title" />
|
||||
android:title="@string/openapsma_maxiob_title"
|
||||
validate:floatmaxNumber="12.0"
|
||||
validate:floatminNumber="0"
|
||||
validate:testType="floatNumericRange" />
|
||||
|
||||
<androidx.preference.PreferenceScreen
|
||||
android:key="absorption_ma_advanced"
|
||||
|
@ -48,6 +55,7 @@
|
|||
validate:maxNumber="10"
|
||||
validate:minNumber="1"
|
||||
validate:testType="floatNumericRange" />
|
||||
|
||||
</androidx.preference.PreferenceScreen>
|
||||
|
||||
</PreferenceCategory>
|
||||
|
|
|
@ -1,23 +1,31 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:validate="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<PreferenceCategory
|
||||
android:key="openapssmb"
|
||||
app:initialExpandedChildrenCount="0"
|
||||
android:title="@string/openapssmb">
|
||||
|
||||
<EditTextPreference
|
||||
<info.nightscout.androidaps.utils.textValidator.ValidatingEditTextPreference
|
||||
android:defaultValue="1"
|
||||
android:dialogMessage="@string/openapsma_maxbasal_summary"
|
||||
android:inputType="numberDecimal"
|
||||
android:key="@string/key_openapsma_max_basal"
|
||||
android:numeric="decimal"
|
||||
android:title="@string/openapsma_maxbasal_title" />
|
||||
android:title="@string/openapsma_maxbasal_title"
|
||||
validate:floatmaxNumber="12.0"
|
||||
validate:floatminNumber="0.1"
|
||||
validate:testType="floatNumericRange" />
|
||||
|
||||
<EditTextPreference
|
||||
android:defaultValue="3"
|
||||
android:dialogMessage="@string/openapssmb_maxiob_summary"
|
||||
android:key="@string/key_openapssmb_max_iob"
|
||||
android:numeric="decimal"
|
||||
android:title="@string/openapssmb_maxiob_title" />
|
||||
<info.nightscout.androidaps.utils.textValidator.ValidatingEditTextPreference
|
||||
android:defaultValue="1.5"
|
||||
android:dialogMessage="@string/openapsma_maxiob_summary"
|
||||
android:inputType="numberDecimal"
|
||||
android:key="@string/key_openapsma_max_iob"
|
||||
android:title="@string/openapsma_maxiob_title"
|
||||
validate:floatmaxNumber="12.0"
|
||||
validate:floatminNumber="0"
|
||||
validate:testType="floatNumericRange" />
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
|
@ -82,20 +90,18 @@
|
|||
<!-- TODO AS-FIX -->
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:enabled="false"
|
||||
android:key="@string/key_high_temptarget_raises_sensitivity"
|
||||
android:summary="@string/high_temptarget_raises_sensitivity_summary"
|
||||
android:title="@string/high_temptarget_raises_sensitivity_title"
|
||||
android:enabled="false"
|
||||
/>
|
||||
android:title="@string/high_temptarget_raises_sensitivity_title" />
|
||||
|
||||
<!-- TODO AS-FIX -->
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:enabled="false"
|
||||
android:key="@string/key_low_temptarget_lowers_sensitivity"
|
||||
android:summary="@string/low_temptarget_lowers_sensitivity_summary"
|
||||
android:title="@string/low_temptarget_lowers_sensitivity_title"
|
||||
android:enabled="false"
|
||||
/>
|
||||
android:title="@string/low_temptarget_lowers_sensitivity_title" />
|
||||
|
||||
<androidx.preference.PreferenceScreen
|
||||
android:key="absorption_smb_advanced"
|
||||
|
|
|
@ -1,115 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:validate="http://schemas.android.com/apk/res-auto">
|
||||
<PreferenceCategory
|
||||
android:key="others"
|
||||
android:title="@string/othersettings_title">
|
||||
<androidx.preference.PreferenceScreen
|
||||
android:key="@string/default_temptargets"
|
||||
android:title="@string/default_temptargets">
|
||||
<EditTextPreference
|
||||
android:defaultValue="0"
|
||||
android:inputType="number"
|
||||
android:key="@string/key_eatingsoon_duration"
|
||||
android:title="@string/eatingsoon_duration" />
|
||||
<EditTextPreference
|
||||
android:defaultValue="0"
|
||||
android:inputType="numberDecimal"
|
||||
android:key="@string/key_eatingsoon_target"
|
||||
android:title="@string/eatingsoon_target" />
|
||||
<EditTextPreference
|
||||
android:defaultValue="0"
|
||||
android:inputType="number"
|
||||
android:key="@string/key_activity_duration"
|
||||
android:title="@string/activity_duration" />
|
||||
<EditTextPreference
|
||||
android:defaultValue="0"
|
||||
android:inputType="numberDecimal"
|
||||
android:key="@string/key_activity_target"
|
||||
android:title="@string/activity_target" />
|
||||
<EditTextPreference
|
||||
android:defaultValue="0"
|
||||
android:inputType="number"
|
||||
android:key="@string/key_hypo_duration"
|
||||
android:title="@string/hypo_duration" />
|
||||
<EditTextPreference
|
||||
android:defaultValue="0"
|
||||
android:inputType="numberDecimal"
|
||||
android:key="@string/key_hypo_target"
|
||||
android:title="@string/hypo_target" />
|
||||
</androidx.preference.PreferenceScreen>
|
||||
|
||||
<androidx.preference.PreferenceScreen
|
||||
android:key="@string/fillbolus_title"
|
||||
android:title="@string/fillbolus_title">
|
||||
<EditTextPreference
|
||||
android:defaultValue="0.3"
|
||||
android:inputType="numberDecimal"
|
||||
android:key="fill_button1"
|
||||
android:title="@string/button1" />
|
||||
<EditTextPreference
|
||||
android:defaultValue="0"
|
||||
android:inputType="numberDecimal"
|
||||
android:key="fill_button2"
|
||||
android:title="@string/button2" />
|
||||
<EditTextPreference
|
||||
android:defaultValue="0"
|
||||
android:inputType="numberDecimal"
|
||||
android:key="fill_button3"
|
||||
android:title="@string/button3" />
|
||||
</androidx.preference.PreferenceScreen>
|
||||
|
||||
<androidx.preference.PreferenceScreen
|
||||
android:summary="@string/prefs_range_summary"
|
||||
android:key="@string/prefs_range_title"
|
||||
android:title="@string/prefs_range_title">
|
||||
<EditTextPreference
|
||||
android:defaultValue="0"
|
||||
android:inputType="numberDecimal"
|
||||
android:key="@string/key_low_mark"
|
||||
android:title="@string/low_mark" />
|
||||
<EditTextPreference
|
||||
android:defaultValue="0"
|
||||
android:inputType="numberDecimal"
|
||||
android:key="@string/key_high_mark"
|
||||
android:title="@string/high_mark" />
|
||||
</androidx.preference.PreferenceScreen>
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="@string/key_short_tabtitles"
|
||||
android:title="@string/short_tabtitles" />
|
||||
</PreferenceCategory>
|
||||
|
||||
<androidx.preference.PreferenceScreen
|
||||
android:key="@string/localalertsettings_title"
|
||||
android:title="@string/localalertsettings_title">
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="@string/key_enable_missed_bg_readings_alert"
|
||||
android:title="@string/enable_missed_bg_readings_alert" />
|
||||
<EditTextPreference
|
||||
android:defaultValue="30"
|
||||
android:dependency="@string/key_enable_missed_bg_readings_alert"
|
||||
android:inputType="number"
|
||||
android:key="@string/key_missed_bg_readings_threshold"
|
||||
android:title="@string/nsalarm_staledatavalue_label" />
|
||||
<SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="@string/key_enable_pump_unreachable_alert"
|
||||
android:title="@string/enable_pump_unreachable_alert" />
|
||||
<info.nightscout.androidaps.utils.textValidator.ValidatingEditTextPreference
|
||||
validate:testType="numericRange"
|
||||
validate:minNumber="30"
|
||||
validate:maxNumber="300"
|
||||
android:defaultValue="30"
|
||||
android:dependency="@string/key_enable_pump_unreachable_alert"
|
||||
android:inputType="number"
|
||||
android:key="@string/key_pump_unreachable_threshold"
|
||||
android:title="@string/pump_unreachable_threshold">
|
||||
</info.nightscout.androidaps.utils.textValidator.ValidatingEditTextPreference>
|
||||
</androidx.preference.PreferenceScreen>
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="@string/key_raise_notifications_as_android_notifications"
|
||||
android:title="@string/raise_notifications_as_android_notifications" />
|
||||
</androidx.preference.PreferenceScreen>
|
|
@ -1,14 +1,17 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:validate="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<PreferenceCategory android:title="@string/overview">
|
||||
<PreferenceCategory
|
||||
android:title="@string/overview"
|
||||
app:initialExpandedChildrenCount="0">
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="@string/key_keep_screen_on"
|
||||
android:title="@string/keep_screen_on_title"
|
||||
android:summary="@string/keep_screen_on_summary"/>
|
||||
android:summary="@string/keep_screen_on_summary"
|
||||
android:title="@string/keep_screen_on_title" />
|
||||
|
||||
<androidx.preference.PreferenceScreen
|
||||
android:key="@string/overview_buttons_selection"
|
||||
|
@ -138,6 +141,133 @@
|
|||
<intent android:action="info.nightscout.androidaps.plugins.general.overview.activities.QuickWizardListActivity" />
|
||||
</Preference>
|
||||
|
||||
<androidx.preference.PreferenceScreen
|
||||
android:key="@string/default_temptargets"
|
||||
android:title="@string/default_temptargets">
|
||||
|
||||
<info.nightscout.androidaps.utils.textValidator.ValidatingEditTextPreference
|
||||
android:defaultValue="0"
|
||||
android:inputType="number"
|
||||
android:key="@string/key_eatingsoon_duration"
|
||||
android:title="@string/eatingsoon_duration"
|
||||
validate:maxNumber="120"
|
||||
validate:minNumber="15"
|
||||
validate:testType="numericRange" />
|
||||
|
||||
<info.nightscout.androidaps.utils.textValidator.ValidatingEditTextPreference
|
||||
android:defaultValue="0"
|
||||
android:inputType="numberDecimal"
|
||||
android:key="@string/key_eatingsoon_target"
|
||||
android:title="@string/eatingsoon_target"
|
||||
validate:floatmaxNumber="160.0"
|
||||
validate:floatminNumber="4.0"
|
||||
validate:testType="floatNumericRange" />
|
||||
|
||||
|
||||
<info.nightscout.androidaps.utils.textValidator.ValidatingEditTextPreference
|
||||
android:defaultValue="0"
|
||||
android:inputType="number"
|
||||
android:key="@string/key_activity_duration"
|
||||
android:title="@string/activity_duration"
|
||||
validate:maxNumber="600"
|
||||
validate:minNumber="15"
|
||||
validate:testType="numericRange" />
|
||||
|
||||
|
||||
<info.nightscout.androidaps.utils.textValidator.ValidatingEditTextPreference
|
||||
android:defaultValue="0"
|
||||
android:inputType="numberDecimal"
|
||||
android:key="@string/key_activity_target"
|
||||
android:title="@string/activity_target"
|
||||
validate:floatmaxNumber="220.0"
|
||||
validate:floatminNumber="6.0"
|
||||
validate:testType="floatNumericRange" />
|
||||
|
||||
<info.nightscout.androidaps.utils.textValidator.ValidatingEditTextPreference
|
||||
android:defaultValue="0"
|
||||
android:inputType="number"
|
||||
android:key="@string/key_hypo_duration"
|
||||
android:title="@string/hypo_duration"
|
||||
validate:maxNumber="180"
|
||||
validate:minNumber="15"
|
||||
validate:testType="numericRange" />
|
||||
|
||||
<info.nightscout.androidaps.utils.textValidator.ValidatingEditTextPreference
|
||||
android:defaultValue="0"
|
||||
android:inputType="numberDecimal"
|
||||
android:key="@string/key_hypo_target"
|
||||
android:title="@string/hypo_target"
|
||||
validate:floatmaxNumber="220.0"
|
||||
validate:floatminNumber="6.0"
|
||||
validate:testType="floatNumericRange" />
|
||||
|
||||
|
||||
</androidx.preference.PreferenceScreen>
|
||||
|
||||
<androidx.preference.PreferenceScreen
|
||||
android:key="@string/fillbolus_title"
|
||||
android:title="@string/fillbolus_title">
|
||||
|
||||
<info.nightscout.androidaps.utils.textValidator.ValidatingEditTextPreference
|
||||
android:defaultValue="0.3"
|
||||
android:inputType="numberDecimal"
|
||||
android:key="fill_button1"
|
||||
android:title="@string/button1"
|
||||
validate:floatmaxNumber="20.0"
|
||||
validate:floatminNumber="0.05"
|
||||
validate:testType="floatNumericRange" />
|
||||
|
||||
<info.nightscout.androidaps.utils.textValidator.ValidatingEditTextPreference
|
||||
android:defaultValue="0"
|
||||
android:inputType="numberDecimal"
|
||||
android:key="fill_button2"
|
||||
android:title="@string/button2"
|
||||
validate:floatmaxNumber="20.0"
|
||||
validate:floatminNumber="0.05"
|
||||
validate:testType="floatNumericRange" />
|
||||
|
||||
<info.nightscout.androidaps.utils.textValidator.ValidatingEditTextPreference
|
||||
android:defaultValue="0"
|
||||
android:inputType="numberDecimal"
|
||||
android:key="fill_button3"
|
||||
android:title="@string/button3"
|
||||
validate:floatmaxNumber="20.0"
|
||||
validate:floatminNumber="0.05"
|
||||
validate:testType="floatNumericRange" />
|
||||
|
||||
|
||||
</androidx.preference.PreferenceScreen>
|
||||
|
||||
<androidx.preference.PreferenceScreen
|
||||
android:key="@string/prefs_range_title"
|
||||
android:summary="@string/prefs_range_summary"
|
||||
android:title="@string/prefs_range_title">
|
||||
|
||||
<info.nightscout.androidaps.utils.textValidator.ValidatingEditTextPreference
|
||||
android:defaultValue="0"
|
||||
android:inputType="numberDecimal"
|
||||
android:key="@string/key_low_mark"
|
||||
android:title="@string/low_mark"
|
||||
validate:floatmaxNumber="160"
|
||||
validate:floatminNumber="3"
|
||||
validate:testType="floatNumericRange" />
|
||||
|
||||
<info.nightscout.androidaps.utils.textValidator.ValidatingEditTextPreference
|
||||
android:defaultValue="0"
|
||||
android:inputType="numberDecimal"
|
||||
android:key="@string/key_high_mark"
|
||||
android:title="@string/high_mark"
|
||||
validate:floatmaxNumber="250"
|
||||
validate:floatminNumber="5"
|
||||
validate:testType="floatNumericRange" />
|
||||
|
||||
</androidx.preference.PreferenceScreen>
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="@string/key_short_tabtitles"
|
||||
android:title="@string/short_tabtitles" />
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="@string/key_show_notes_entry_dialogs"
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<PreferenceCategory
|
||||
android:key="password"
|
||||
android:title="@string/settings_password">
|
||||
|
||||
<EditTextPreference
|
||||
android:title="@string/settings_password"
|
||||
android:key="settings_password"
|
||||
android:inputType="textPassword">
|
||||
</EditTextPreference>
|
||||
</PreferenceCategory>
|
||||
|
||||
</androidx.preference.PreferenceScreen>
|
|
@ -1,20 +1,39 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:validate="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<PreferenceCategory
|
||||
android:key="treatmentssafety"
|
||||
android:title="@string/treatmentssafety_title">
|
||||
android:title="@string/treatmentssafety_title"
|
||||
app:initialExpandedChildrenCount="0">
|
||||
|
||||
<ListPreference
|
||||
android:defaultValue="adult"
|
||||
android:entries="@array/ageArray"
|
||||
android:entryValues="@array/ageValues"
|
||||
android:key="@string/key_age"
|
||||
android:summary="@string/patientage_summary"
|
||||
android:title="@string/patientage" />
|
||||
|
||||
<EditTextPreference
|
||||
android:title="@string/treatmentssafety_maxbolus_title"
|
||||
android:key="@string/key_treatmentssafety_maxbolus"
|
||||
android:defaultValue="3"
|
||||
android:inputType="numberDecimal">
|
||||
</EditTextPreference>
|
||||
android:inputType="numberDecimal"
|
||||
android:key="@string/key_treatmentssafety_maxbolus"
|
||||
android:title="@string/treatmentssafety_maxbolus_title"
|
||||
validate:floatmaxNumber="25.0"
|
||||
validate:floatminNumber="0.1"
|
||||
validate:testType="floatNumericRange" />
|
||||
|
||||
|
||||
<EditTextPreference
|
||||
android:title="@string/treatmentssafety_maxcarbs_title"
|
||||
android:key="@string/key_treatmentssafety_maxcarbs"
|
||||
android:defaultValue="48"
|
||||
android:inputType="numberDecimal">
|
||||
</EditTextPreference>
|
||||
android:inputType="numberDecimal"
|
||||
android:key="@string/key_treatmentssafety_maxcarbs"
|
||||
android:title="@string/treatmentssafety_maxcarbs_title"
|
||||
validate:floatmaxNumber="200"
|
||||
validate:floatminNumber="1"
|
||||
validate:testType="numericRange" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
</androidx.preference.PreferenceScreen>
|
|
@ -1,29 +1,32 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:validate="http://schemas.android.com/apk/res-auto">
|
||||
<PreferenceCategory
|
||||
android:key="smscommunicator"
|
||||
android:title="@string/smscommunicator">
|
||||
|
||||
<EditTextPreference
|
||||
<PreferenceCategory
|
||||
android:title="@string/smscommunicator"
|
||||
app:initialExpandedChildrenCount="0">
|
||||
|
||||
<info.nightscout.androidaps.utils.textValidator.ValidatingEditTextPreference
|
||||
android:key="@string/key_smscommunicator_allowednumbers"
|
||||
android:summary="@string/smscommunicator_allowednumbers_summary"
|
||||
android:title="@string/smscommunicator_allowednumbers" />
|
||||
<info.nightscout.androidaps.utils.textValidator.ValidatingEditTextPreference
|
||||
android:key="@string/key_smscommunicator_remotebolusmindistance"
|
||||
android:defaultValue="15"
|
||||
android:summary="@string/smscommunicator_remotebolusmindistance_summary"
|
||||
android:title="@string/smscommunicator_remotebolusmindistance"
|
||||
validate:minNumber="3"
|
||||
validate:maxNumber="60"
|
||||
validate:testType="numericRange"
|
||||
android:singleLineTitle="false"
|
||||
/>
|
||||
android:title="@string/smscommunicator_allowednumbers"
|
||||
validate:testType="multiPhone" />
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="@string/key_smscommunicator_remotecommandsallowed"
|
||||
android:title="@string/smscommunicator_remotecommandsallowed" />
|
||||
|
||||
<info.nightscout.androidaps.utils.textValidator.ValidatingEditTextPreference
|
||||
android:defaultValue="15"
|
||||
android:key="@string/key_smscommunicator_remotebolusmindistance"
|
||||
android:summary="@string/smscommunicator_remotebolusmindistance_summary"
|
||||
android:title="@string/smscommunicator_remotebolusmindistance"
|
||||
validate:maxNumber="60"
|
||||
validate:minNumber="3"
|
||||
validate:testType="numericRange" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
</androidx.preference.PreferenceScreen>
|
|
@ -1,53 +1,66 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:validate="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<PreferenceCategory
|
||||
android:key="tidepool_upload_screen"
|
||||
android:title="@string/tidepool">
|
||||
android:title="@string/tidepool"
|
||||
app:initialExpandedChildrenCount="0">
|
||||
|
||||
<EditTextPreference
|
||||
<info.nightscout.androidaps.utils.textValidator.ValidatingEditTextPreference
|
||||
android:key="@string/key_tidepool_username"
|
||||
android:summary="@string/summary_tidepool_username"
|
||||
android:title="@string/title_tidepool_username" />
|
||||
android:title="@string/title_tidepool_username"
|
||||
validate:testType="email"/>
|
||||
|
||||
<EditTextPreference
|
||||
android:inputType="textPassword"
|
||||
android:key="@string/key_tidepool_password"
|
||||
android:summary="@string/summary_tidepool_password"
|
||||
android:title="@string/title_tidepool_password" />
|
||||
|
||||
<Preference
|
||||
android:key="@string/key_tidepool_test_login"
|
||||
android:title="@string/title_tidepool_test_login" />
|
||||
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="true"
|
||||
android:key="@string/key_tidepool_upload_cgm"
|
||||
android:title="@string/tidepool_upload_cgm" />
|
||||
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="true"
|
||||
android:key="@string/key_tidepool_upload_bolus"
|
||||
android:title="@string/tidepool_upload_bolus" />
|
||||
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="true"
|
||||
android:key="@string/key_tidepool_upload_bg"
|
||||
android:title="@string/tidepool_upload_bg" />
|
||||
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="true"
|
||||
android:key="@string/key_tidepool_upload_tbr"
|
||||
android:title="@string/tidepool_upload_tbr" />
|
||||
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="true"
|
||||
android:key="@string/key_tidepool_upload_profile"
|
||||
android:title="@string/tidepool_upload_profile" />
|
||||
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="true"
|
||||
android:enabled="false"
|
||||
android:key="@string/key_tidepool_dev_servers"
|
||||
android:summary="@string/summary_tidepool_dev_servers"
|
||||
android:title="@string/title_tidepool_dev_servers" />
|
||||
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="false"
|
||||
android:key="@string/key_tidepool_only_while_charging"
|
||||
android:summary="Upload data only when charging"
|
||||
android:title="Only when charging" />
|
||||
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="false"
|
||||
android:key="@string/key_tidepool_only_while_unmetered"
|
||||
|
|
|
@ -1,13 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<PreferenceCategory
|
||||
android:key="virtualpump"
|
||||
android:title="@string/virtualpump_settings">
|
||||
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="virtualpump_uploadstatus"
|
||||
android:title="@string/virtualpump_uploadstatus_title" />
|
||||
<PreferenceCategory
|
||||
android:title="@string/virtualpump_settings"
|
||||
app:initialExpandedChildrenCount="0">
|
||||
|
||||
<ListPreference
|
||||
android:defaultValue="1"
|
||||
|
@ -15,7 +12,12 @@
|
|||
android:entryValues="@array/virtualPumpTypes"
|
||||
android:key="@string/key_virtualpump_type"
|
||||
android:title="@string/virtualpump_type" />
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="virtualpump_uploadstatus"
|
||||
android:title="@string/virtualpump_uploadstatus_title" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
|
||||
</androidx.preference.PreferenceScreen>
|
|
@ -1,97 +1,102 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<PreferenceCategory
|
||||
android:key="wearplugin"
|
||||
android:title="@string/wear_settings">
|
||||
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<androidx.preference.PreferenceScreen
|
||||
android:key="@string/wear_settings"
|
||||
android:title="@string/wear_settings">
|
||||
<PreferenceCategory
|
||||
android:title="@string/wear_settings"
|
||||
app:initialExpandedChildrenCount="0">
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="wearcontrol"
|
||||
android:summary="@string/wearcontrol_summary"
|
||||
android:title="@string/wearcontrol_title" />
|
||||
|
||||
<PreferenceCategory
|
||||
android:dependency="wearcontrol"
|
||||
android:summary="@string/wear_wizard_settings_summary"
|
||||
android:title="@string/wear_wizard_settings"
|
||||
app:initialExpandedChildrenCount="0">
|
||||
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="true"
|
||||
android:dependency="wearcontrol"
|
||||
android:key="@string/key_wearwizard_bg"
|
||||
android:title="@string/treatments_wizard_bg_label" />
|
||||
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="false"
|
||||
android:dependency="@string/key_wearwizard_bg"
|
||||
android:key="@string/key_wearwizard_tt"
|
||||
android:title="@string/treatments_wizard_tt_label" />
|
||||
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="false"
|
||||
android:dependency="wearcontrol"
|
||||
android:key="@string/key_wearwizard_trend"
|
||||
android:title="@string/treatments_wizard_bgtrend_label" />
|
||||
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="true"
|
||||
android:dependency="wearcontrol"
|
||||
android:key="@string/key_wearwizard_cob"
|
||||
android:title="@string/treatments_wizard_cob_label" />
|
||||
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="true"
|
||||
android:dependency="wearcontrol"
|
||||
android:key="@string/key_wearwizard_bolusiob"
|
||||
android:title="@string/treatments_wizard_bolusiob_label" />
|
||||
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="true"
|
||||
android:dependency="wearcontrol"
|
||||
android:key="@string/key_wearwizard_basaliob"
|
||||
android:title="@string/treatments_wizard_basaliob_label" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory
|
||||
android:title="@string/wear_display_settings"
|
||||
app:initialExpandedChildrenCount="0">
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="wearcontrol"
|
||||
android:summary="@string/wearcontrol_summary"
|
||||
android:title="@string/wearcontrol_title" />
|
||||
android:key="@string/key_wear_detailediob"
|
||||
android:summary="@string/wear_detailedIOB_summary"
|
||||
android:title="@string/wear_detailedIOB_title" />
|
||||
|
||||
<PreferenceCategory
|
||||
android:key="wearplugin"
|
||||
android:title="@string/wear_wizard_settings"
|
||||
android:summary="@string/wear_wizard_settings_summary"
|
||||
android:dependency="wearcontrol">
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="@string/key_wear_detailed_delta"
|
||||
android:summary="@string/wear_detailed_delta_summary"
|
||||
android:title="@string/wear_detailed_delta_title" />
|
||||
|
||||
<CheckBoxPreference
|
||||
android:key="@string/key_wearwizard_bg"
|
||||
android:title="@string/treatments_wizard_bg_label"
|
||||
android:defaultValue="true"
|
||||
android:dependency="wearcontrol"/>
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="@string/key_wear_showbgi"
|
||||
android:summary="@string/wear_showbgi_summary"
|
||||
android:title="@string/wear_showbgi_title" />
|
||||
<SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="wear_predictions"
|
||||
android:summary="@string/wear_predictions_summary"
|
||||
android:title="@string/wear_predictions_title" />
|
||||
|
||||
<CheckBoxPreference
|
||||
android:key="@string/key_wearwizard_tt"
|
||||
android:title="@string/treatments_wizard_tt_label"
|
||||
android:defaultValue="false"
|
||||
android:dependency="@string/key_wearwizard_bg"/>
|
||||
</PreferenceCategory>
|
||||
|
||||
<CheckBoxPreference
|
||||
android:key="@string/key_wearwizard_trend"
|
||||
android:title="@string/treatments_wizard_bgtrend_label"
|
||||
android:defaultValue="false"
|
||||
android:dependency="wearcontrol"/>
|
||||
<PreferenceCategory
|
||||
android:title="@string/wear_general_settings"
|
||||
app:initialExpandedChildrenCount="0">
|
||||
|
||||
<CheckBoxPreference
|
||||
android:key="@string/key_wearwizard_cob"
|
||||
android:title="@string/treatments_wizard_cob_label"
|
||||
android:defaultValue="true"
|
||||
android:dependency="wearcontrol"/>
|
||||
<SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="wear_notifySMB"
|
||||
android:summary="@string/wear_notifysmb_summary"
|
||||
android:title="@string/wear_notifysmb_title" />
|
||||
|
||||
<CheckBoxPreference
|
||||
android:key="@string/key_wearwizard_bolusiob"
|
||||
android:title="@string/treatments_wizard_bolusiob_label"
|
||||
android:defaultValue="true"
|
||||
android:dependency="wearcontrol"/>
|
||||
</PreferenceCategory>
|
||||
|
||||
<CheckBoxPreference
|
||||
android:key="@string/key_wearwizard_basaliob"
|
||||
android:title="@string/treatments_wizard_basaliob_label"
|
||||
android:defaultValue="true"
|
||||
android:dependency="wearcontrol"/>
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory
|
||||
android:key="wearplugin"
|
||||
android:title="@string/wear_display_settings">
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="@string/key_wear_detailediob"
|
||||
android:summary="@string/wear_detailedIOB_summary"
|
||||
android:title="@string/wear_detailedIOB_title" />
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="@string/key_wear_detailed_delta"
|
||||
android:summary="@string/wear_detailed_delta_summary"
|
||||
android:title="@string/wear_detailed_delta_title" />
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="@string/key_wear_showbgi"
|
||||
android:summary="@string/wear_showbgi_summary"
|
||||
android:title="@string/wear_showbgi_title" />
|
||||
<SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="wear_predictions"
|
||||
android:summary="@string/wear_predictions_summary"
|
||||
android:title="@string/wear_predictions_title" />
|
||||
</PreferenceCategory>
|
||||
<PreferenceCategory
|
||||
android:key="wearplugin"
|
||||
android:title="@string/wear_general_settings">
|
||||
<SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="wear_notifySMB"
|
||||
android:summary="@string/wear_notifysmb_summary"
|
||||
android:title="@string/wear_notifysmb_title" />
|
||||
</PreferenceCategory>
|
||||
</androidx.preference.PreferenceScreen>
|
||||
</PreferenceCategory>
|
||||
|
||||
</androidx.preference.PreferenceScreen>
|
||||
|
|
|
@ -1,19 +1,23 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<PreferenceCategory
|
||||
android:key="xdripstatus"
|
||||
android:title="@string/xdripstatus_settings">
|
||||
android:title="@string/xdripstatus_settings"
|
||||
app:initialExpandedChildrenCount="0">
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="@string/key_xdripstatus_detailediob"
|
||||
android:title="@string/wear_detailedIOB_title"
|
||||
android:summary="@string/wear_detailedIOB_summary"/>
|
||||
android:summary="@string/wear_detailedIOB_summary"
|
||||
android:title="@string/wear_detailedIOB_title" />
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="@string/key_xdripstatus_showbgi"
|
||||
android:title="@string/wear_showbgi_title"
|
||||
android:summary="@string/wear_showbgi_summary"/>
|
||||
android:summary="@string/wear_showbgi_summary"
|
||||
android:title="@string/wear_showbgi_title" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
</androidx.preference.PreferenceScreen>
|
Loading…
Reference in a new issue