NumberPicker -> :core:ui
This commit is contained in:
parent
a2f048adc4
commit
d50d1bf9c9
|
@ -8,8 +8,8 @@ import android.widget.LinearLayout
|
|||
import android.widget.TextView
|
||||
import dagger.android.HasAndroidInjector
|
||||
import info.nightscout.androidaps.setupwizard.SWIntNumberValidator
|
||||
import info.nightscout.core.ui.elements.NumberPicker
|
||||
import info.nightscout.shared.SafeParse
|
||||
import info.nightscout.androidaps.utils.ui.NumberPicker
|
||||
import java.text.DecimalFormat
|
||||
|
||||
class SWEditIntNumber(injector: HasAndroidInjector, private val init: Int, private val min: Int, private val max: Int) : SWItem(injector, Type.NUMBER) {
|
||||
|
|
|
@ -8,8 +8,8 @@ import android.widget.LinearLayout
|
|||
import android.widget.TextView
|
||||
import dagger.android.HasAndroidInjector
|
||||
import info.nightscout.androidaps.setupwizard.SWNumberValidator
|
||||
import info.nightscout.core.ui.elements.NumberPicker
|
||||
import info.nightscout.shared.SafeParse
|
||||
import info.nightscout.androidaps.utils.ui.NumberPicker
|
||||
import java.text.DecimalFormat
|
||||
|
||||
class SWEditNumber(injector: HasAndroidInjector, private val init: Double, private val min: Double, private val max: Double) : SWItem(injector, Type.DECIMAL_NUMBER) {
|
||||
|
|
|
@ -8,8 +8,8 @@ import android.widget.LinearLayout
|
|||
import android.widget.TextView
|
||||
import dagger.android.HasAndroidInjector
|
||||
import info.nightscout.androidaps.setupwizard.SWNumberValidator
|
||||
import info.nightscout.androidaps.utils.ui.NumberPicker
|
||||
import info.nightscout.core.profile.toCurrentUnits
|
||||
import info.nightscout.core.ui.elements.NumberPicker
|
||||
import info.nightscout.interfaces.GlucoseUnit
|
||||
import info.nightscout.interfaces.profile.Profile
|
||||
import info.nightscout.interfaces.profile.ProfileFunction
|
||||
|
|
|
@ -2,8 +2,8 @@ package info.nightscout.automation.elements
|
|||
|
||||
import android.view.Gravity
|
||||
import android.widget.LinearLayout
|
||||
import info.nightscout.androidaps.utils.ui.NumberPicker
|
||||
import info.nightscout.automation.R
|
||||
import info.nightscout.core.ui.elements.NumberPicker
|
||||
import info.nightscout.interfaces.GlucoseUnit
|
||||
import info.nightscout.interfaces.profile.ProfileFunction
|
||||
import java.text.DecimalFormat
|
||||
|
|
|
@ -7,9 +7,9 @@ import android.widget.ArrayAdapter
|
|||
import android.widget.LinearLayout
|
||||
import android.widget.Spinner
|
||||
import androidx.annotation.StringRes
|
||||
import info.nightscout.shared.interfaces.ResourceHelper
|
||||
import info.nightscout.androidaps.utils.ui.NumberPicker
|
||||
import info.nightscout.automation.R
|
||||
import info.nightscout.core.ui.elements.NumberPicker
|
||||
import info.nightscout.shared.interfaces.ResourceHelper
|
||||
import java.text.DecimalFormat
|
||||
|
||||
class InputDelta(private val rh: ResourceHelper) : Element() {
|
||||
|
|
|
@ -2,8 +2,8 @@ package info.nightscout.automation.elements
|
|||
|
||||
import android.view.Gravity
|
||||
import android.widget.LinearLayout
|
||||
import info.nightscout.androidaps.utils.ui.NumberPicker
|
||||
import info.nightscout.automation.R
|
||||
import info.nightscout.core.ui.elements.NumberPicker
|
||||
import java.text.DecimalFormat
|
||||
|
||||
class InputDouble() : Element() {
|
||||
|
|
|
@ -2,9 +2,9 @@ package info.nightscout.automation.elements
|
|||
|
||||
import android.view.Gravity
|
||||
import android.widget.LinearLayout
|
||||
import info.nightscout.androidaps.utils.ui.MinutesNumberPicker
|
||||
import info.nightscout.androidaps.utils.ui.NumberPicker
|
||||
import info.nightscout.automation.R
|
||||
import info.nightscout.core.ui.elements.MinutesNumberPicker
|
||||
import info.nightscout.core.ui.elements.NumberPicker
|
||||
import java.text.DecimalFormat
|
||||
|
||||
class InputDuration(
|
||||
|
|
|
@ -2,8 +2,8 @@ package info.nightscout.automation.elements
|
|||
|
||||
import android.view.Gravity
|
||||
import android.widget.LinearLayout
|
||||
import info.nightscout.androidaps.utils.ui.NumberPicker
|
||||
import info.nightscout.automation.R
|
||||
import info.nightscout.core.ui.elements.NumberPicker
|
||||
import java.text.DecimalFormat
|
||||
|
||||
class InputInsulin() : Element() {
|
||||
|
|
|
@ -2,8 +2,8 @@ package info.nightscout.automation.elements
|
|||
|
||||
import android.view.Gravity
|
||||
import android.widget.LinearLayout
|
||||
import info.nightscout.androidaps.utils.ui.NumberPicker
|
||||
import info.nightscout.automation.R
|
||||
import info.nightscout.core.ui.elements.NumberPicker
|
||||
import java.text.DecimalFormat
|
||||
|
||||
class InputPercent() : Element() {
|
||||
|
|
|
@ -2,8 +2,8 @@ package info.nightscout.automation.elements
|
|||
|
||||
import android.view.Gravity
|
||||
import android.widget.LinearLayout
|
||||
import info.nightscout.androidaps.utils.ui.NumberPicker
|
||||
import info.nightscout.automation.R
|
||||
import info.nightscout.core.ui.elements.NumberPicker
|
||||
import info.nightscout.interfaces.Constants
|
||||
import info.nightscout.interfaces.GlucoseUnit
|
||||
import info.nightscout.interfaces.profile.ProfileFunction
|
||||
|
|
|
@ -46,7 +46,6 @@ dependencies {
|
|||
api "androidx.navigation:navigation-runtime-ktx:$nav_version"
|
||||
api "androidx.navigation:navigation-ui-ktx:$nav_version"
|
||||
api 'androidx.percentlayout:percentlayout:1.0.0'
|
||||
api "androidx.preference:preference-ktx:$preferencektx_version"
|
||||
api 'androidx.recyclerview:recyclerview:1.2.1'
|
||||
|
||||
api 'androidx.gridlayout:gridlayout:1.0.0'
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
<string name="format_mins">%1$d min</string>
|
||||
<string name="pumpbusy">Pumpa je zaneprázdněna</string>
|
||||
<string name="connectionerror">Chyba připojování pumpy</string>
|
||||
<string name="youareonallowedlimit">Byl dosažen povolený limit</string>
|
||||
<string name="you_are_on_allowed_limit">Byl dosažen povolený limit</string>
|
||||
<string name="objectives">Cíle</string>
|
||||
<string name="close">Zavřít</string>
|
||||
<string name="please_wait">Počkejte prosím…</string>
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
<string name="format_mins">%1$d min</string>
|
||||
<string name="pumpbusy">Bomba ocupada</string>
|
||||
<string name="connectionerror">Error de conexión de la bomba</string>
|
||||
<string name="youareonallowedlimit">Límite permitido alcanzado</string>
|
||||
<string name="you_are_on_allowed_limit">Límite permitido alcanzado</string>
|
||||
<string name="objectives">Objetivos</string>
|
||||
<string name="close">Cerrar</string>
|
||||
<string name="please_wait">Por favor, espere…</string>
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
<string name="format_mins">%1$d min</string>
|
||||
<string name="pumpbusy">Pompe occupée</string>
|
||||
<string name="connectionerror">Erreur connection pompe</string>
|
||||
<string name="youareonallowedlimit">Limite autorisée atteinte</string>
|
||||
<string name="you_are_on_allowed_limit">Limite autorisée atteinte</string>
|
||||
<string name="objectives">Objectifs</string>
|
||||
<string name="close">Fermer</string>
|
||||
<string name="please_wait">Merci de patienter...</string>
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
<string name="format_mins">%1$d min</string>
|
||||
<string name="pumpbusy">Il micro è occupato</string>
|
||||
<string name="connectionerror">Errore connessione micro</string>
|
||||
<string name="youareonallowedlimit">Limite consentito raggiunto</string>
|
||||
<string name="you_are_on_allowed_limit">Limite consentito raggiunto</string>
|
||||
<string name="objectives">Obiettivi</string>
|
||||
<string name="close">Chiudi</string>
|
||||
<string name="please_wait">Attendi…</string>
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
<string name="format_mins">%1$d minuten</string>
|
||||
<string name="pumpbusy">Pomp is bezig</string>
|
||||
<string name="connectionerror">Pomp verbindingsstoring</string>
|
||||
<string name="youareonallowedlimit">Toegestane limiet bereikt</string>
|
||||
<string name="you_are_on_allowed_limit">Toegestane limiet bereikt</string>
|
||||
<string name="objectives">Doelen</string>
|
||||
<string name="close">Sluiten</string>
|
||||
<string name="please_wait">Even geduld a.u.b.…</string>
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
<string name="format_mins">%1$d min</string>
|
||||
<string name="pumpbusy">Pumpen er opptatt</string>
|
||||
<string name="connectionerror">Tilkoblingsfeil til pumpe</string>
|
||||
<string name="youareonallowedlimit">Tillatt grense nådd</string>
|
||||
<string name="you_are_on_allowed_limit">Tillatt grense nådd</string>
|
||||
<string name="objectives">Opplæringsmål</string>
|
||||
<string name="close">Lukk</string>
|
||||
<string name="please_wait">Vennligst vent…</string>
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
<string name="format_mins">%1$d мин</string>
|
||||
<string name="pumpbusy">помпа занята</string>
|
||||
<string name="connectionerror">ошибка соединения</string>
|
||||
<string name="youareonallowedlimit">Разрешенный предел достигнут</string>
|
||||
<string name="you_are_on_allowed_limit">Разрешенный предел достигнут</string>
|
||||
<string name="objectives">Цели</string>
|
||||
<string name="close">Закрыть</string>
|
||||
<string name="please_wait">Подождите…</string>
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
<string name="format_mins">%1$d min</string>
|
||||
<string name="pumpbusy">Pumpa je zaneprázdnená</string>
|
||||
<string name="connectionerror">Chyba pripájania pumpy</string>
|
||||
<string name="youareonallowedlimit">Dosiahnutý povolený limit</string>
|
||||
<string name="you_are_on_allowed_limit">Dosiahnutý povolený limit</string>
|
||||
<string name="objectives">Ciele</string>
|
||||
<string name="close">Zavrieť</string>
|
||||
<string name="please_wait">Čakajte prosím...</string>
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
<string name="format_mins">%1$d dakika</string>
|
||||
<string name="pumpbusy">Pompa meşgul</string>
|
||||
<string name="connectionerror">Pompa bağlantı hatası</string>
|
||||
<string name="youareonallowedlimit">İzin verilen limite ulaşıldı</string>
|
||||
<string name="you_are_on_allowed_limit">İzin verilen limite ulaşıldı</string>
|
||||
<string name="objectives">Görevler</string>
|
||||
<string name="close">Kapat</string>
|
||||
<string name="please_wait">Lütfen bekleyin…</string>
|
||||
|
|
|
@ -124,7 +124,6 @@
|
|||
<string name="format_mins">%1$d mins</string>
|
||||
<string name="pumpbusy">Pump is busy</string>
|
||||
<string name="connectionerror">Pump connection error</string>
|
||||
<string name="youareonallowedlimit">Allowed limit reached</string>
|
||||
<string name="objectives">Objectives</string>
|
||||
<string name="close">Close</string>
|
||||
<string name="please_wait">Please wait…</string>
|
||||
|
@ -199,7 +198,6 @@
|
|||
<string name="time">Time</string>
|
||||
<string name="ns_wifi_ssids">WiFi SSID</string>
|
||||
<string name="loading">Loading …</string>
|
||||
<string name="event_time_label">Event time</string>
|
||||
<string name="notes_label">Notes</string>
|
||||
<string name="remove_button">Remove</string>
|
||||
<string name="addnew">Add new</string>
|
||||
|
@ -390,7 +388,6 @@
|
|||
|
||||
<!-- Ntp-->
|
||||
<string name="timedetection">Time detection</string>
|
||||
<string name="format_hour_minute">%1$dh %2$dm</string>
|
||||
|
||||
<string name="mute5min">Mute for 5 minutes</string>
|
||||
|
||||
|
@ -575,8 +572,6 @@
|
|||
<string name="bolus_ok" comment="26 characters max for translation">Bolus OK</string>
|
||||
<string name="pump_paired" comment="26 characters max for translation">Pump paired</string>
|
||||
<string name="insight_refresh_button" comment="26 characters max for translation">Insight Refresh Button</string>
|
||||
<string name="a11y_min_button_description">decrement %1$s by %2$s</string>
|
||||
<string name="a11y_plus_button_description">increment %1$s by %2$s</string>
|
||||
<string name="formatPercent">%1$.0f%%</string>
|
||||
<string name="basal">Basal</string>
|
||||
<string name="basalpct">Basal %</string>
|
||||
|
@ -643,7 +638,6 @@
|
|||
<string name="autotune_run_with_autoswitch">Autotune ran and profile automatically switched</string>
|
||||
<string name="autotune_run_with_error">Error during last Autotune run</string>
|
||||
<string name="autotune_run_cancelled">Another run of Autotune is detected, run cancelled</string>
|
||||
<string name="needconnectpermission">Application needs bluetooth permission</string>
|
||||
|
||||
<!-- Alerts -->
|
||||
<string name="key_raise_notifications_as_android_notifications" translatable="false">raise_urgent_alarms_as_android_notification</string>
|
||||
|
|
|
@ -17,7 +17,9 @@ android {
|
|||
|
||||
dependencies {
|
||||
|
||||
implementation "androidx.core:core-ktx:$core_version"
|
||||
implementation "androidx.appcompat:appcompat:$appcompat_version"
|
||||
implementation "com.google.android.material:material:$material_version"
|
||||
api "androidx.core:core-ktx:$core_version"
|
||||
api "androidx.appcompat:appcompat:$appcompat_version"
|
||||
api "androidx.preference:preference-ktx:$preferencektx_version"
|
||||
|
||||
api "com.google.android.material:material:$material_version"
|
||||
}
|
|
@ -1,4 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
|
||||
</manifest>
|
|
@ -1,4 +1,4 @@
|
|||
package info.nightscout.androidaps.utils.ui
|
||||
package info.nightscout.core.ui.elements
|
||||
|
||||
import android.Manifest
|
||||
import android.bluetooth.BluetoothManager
|
||||
|
@ -8,7 +8,7 @@ import android.os.Build
|
|||
import android.util.AttributeSet
|
||||
import androidx.core.app.ActivityCompat
|
||||
import androidx.preference.ListPreference
|
||||
import info.nightscout.core.main.R
|
||||
import info.nightscout.core.ui.R
|
||||
import info.nightscout.core.ui.toast.ToastUtils
|
||||
import java.util.Vector
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package info.nightscout.androidaps.utils.ui;
|
||||
package info.nightscout.core.ui.elements;
|
||||
|
||||
import android.text.InputType;
|
||||
import android.text.SpannableStringBuilder;
|
|
@ -1,9 +1,9 @@
|
|||
package info.nightscout.androidaps.utils.ui
|
||||
package info.nightscout.core.ui.elements
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.widget.Button
|
||||
import info.nightscout.core.main.R
|
||||
import info.nightscout.core.ui.R
|
||||
import java.text.DecimalFormat
|
||||
|
||||
class MinutesNumberPicker constructor(context: Context, attrs: AttributeSet? = null) : NumberPicker(context, attrs) {
|
|
@ -1,4 +1,4 @@
|
|||
package info.nightscout.androidaps.utils.ui
|
||||
package info.nightscout.core.ui.elements
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.app.Service
|
||||
|
@ -21,8 +21,8 @@ import android.view.accessibility.AccessibilityManager
|
|||
import android.view.inputmethod.InputMethodManager
|
||||
import android.widget.Button
|
||||
import android.widget.LinearLayout
|
||||
import info.nightscout.core.main.R
|
||||
import info.nightscout.core.main.databinding.NumberPickerLayoutBinding
|
||||
import info.nightscout.core.ui.R
|
||||
import info.nightscout.core.ui.databinding.NumberPickerLayoutBinding
|
||||
import info.nightscout.core.ui.toast.ToastUtils
|
||||
import java.text.NumberFormat
|
||||
import java.util.concurrent.Executors
|
||||
|
@ -189,13 +189,13 @@ open class NumberPicker(context: Context, attrs: AttributeSet? = null) : LinearL
|
|||
currentValue = stringToDouble(binding.editText.text.toString())
|
||||
if (currentValue > maxValue) {
|
||||
currentValue = maxValue
|
||||
ToastUtils.warnToast(context, R.string.youareonallowedlimit)
|
||||
ToastUtils.warnToast(context, R.string.you_are_on_allowed_limit)
|
||||
updateEditText()
|
||||
okButton?.visibility = VISIBLE
|
||||
}
|
||||
if (currentValue < minValue) {
|
||||
currentValue = minValue
|
||||
ToastUtils.warnToast(context, R.string.youareonallowedlimit)
|
||||
ToastUtils.warnToast(context, R.string.you_are_on_allowed_limit)
|
||||
updateEditText()
|
||||
okButton?.visibility = VISIBLE
|
||||
}
|
||||
|
@ -232,11 +232,11 @@ open class NumberPicker(context: Context, attrs: AttributeSet? = null) : LinearL
|
|||
get() {
|
||||
if (currentValue > maxValue) {
|
||||
currentValue = maxValue
|
||||
ToastUtils.warnToast(context, R.string.youareonallowedlimit)
|
||||
ToastUtils.warnToast(context, R.string.you_are_on_allowed_limit)
|
||||
}
|
||||
if (currentValue < minValue) {
|
||||
currentValue = minValue
|
||||
ToastUtils.warnToast(context, R.string.youareonallowedlimit)
|
||||
ToastUtils.warnToast(context, R.string.you_are_on_allowed_limit)
|
||||
}
|
||||
return currentValue
|
||||
}
|
||||
|
@ -245,11 +245,11 @@ open class NumberPicker(context: Context, attrs: AttributeSet? = null) : LinearL
|
|||
currentValue = value
|
||||
if (currentValue > maxValue) {
|
||||
currentValue = maxValue
|
||||
ToastUtils.warnToast(context, R.string.youareonallowedlimit)
|
||||
ToastUtils.warnToast(context, R.string.you_are_on_allowed_limit)
|
||||
}
|
||||
if (currentValue < minValue) {
|
||||
currentValue = minValue
|
||||
ToastUtils.warnToast(context, R.string.youareonallowedlimit)
|
||||
ToastUtils.warnToast(context, R.string.you_are_on_allowed_limit)
|
||||
}
|
||||
callValueChangedListener()
|
||||
updateEditText()
|
||||
|
@ -264,7 +264,7 @@ open class NumberPicker(context: Context, attrs: AttributeSet? = null) : LinearL
|
|||
if (currentValue > maxValue) {
|
||||
currentValue = maxValue
|
||||
callValueChangedListener()
|
||||
ToastUtils.warnToast(context, R.string.youareonallowedlimit)
|
||||
ToastUtils.warnToast(context, R.string.you_are_on_allowed_limit)
|
||||
stopUpdating()
|
||||
}
|
||||
updateEditText()
|
||||
|
@ -275,7 +275,7 @@ open class NumberPicker(context: Context, attrs: AttributeSet? = null) : LinearL
|
|||
if (currentValue < minValue) {
|
||||
currentValue = minValue
|
||||
callValueChangedListener()
|
||||
ToastUtils.warnToast(context, R.string.youareonallowedlimit)
|
||||
ToastUtils.warnToast(context, R.string.you_are_on_allowed_limit)
|
||||
stopUpdating()
|
||||
}
|
||||
updateEditText()
|
|
@ -1,9 +1,9 @@
|
|||
package info.nightscout.androidaps.utils.ui
|
||||
package info.nightscout.core.ui.elements
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import info.nightscout.core.main.databinding.NumberPickerLayoutVerticalBinding
|
||||
import info.nightscout.core.ui.databinding.NumberPickerLayoutVerticalBinding
|
||||
|
||||
class NumberPickerVertical(context: Context, attrs: AttributeSet? = null) : NumberPicker(context, attrs) {
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
package info.nightscout.androidaps.utils.ui
|
||||
package info.nightscout.core.ui.elements
|
||||
|
||||
import info.nightscout.core.main.databinding.NumberPickerLayoutBinding
|
||||
import info.nightscout.core.main.databinding.NumberPickerLayoutVerticalBinding
|
||||
import info.nightscout.core.ui.databinding.NumberPickerLayoutBinding
|
||||
import info.nightscout.core.ui.databinding.NumberPickerLayoutVerticalBinding
|
||||
|
||||
/**
|
||||
* NumberPickerViewAdapter binds both NumberPickerLayoutBinding and NumberPickerLayoutVerticalBinding shared attributes to one common view adapter.
|
||||
|
@ -9,7 +9,7 @@ import info.nightscout.core.main.databinding.NumberPickerLayoutVerticalBinding
|
|||
*/
|
||||
class NumberPickerViewAdapter(
|
||||
val nH: NumberPickerLayoutBinding?,
|
||||
val nV: NumberPickerLayoutVerticalBinding?,
|
||||
nV: NumberPickerLayoutVerticalBinding?,
|
||||
) {
|
||||
|
||||
init {
|
|
@ -4,7 +4,7 @@
|
|||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="130dp"
|
||||
android:layout_height="40dp"
|
||||
tools:context="info.nightscout.androidaps.utils.ui.NumberPicker">
|
||||
tools:context="info.nightscout.core.ui.elements.NumberPicker">
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/textInputLayout"
|
|
@ -4,7 +4,7 @@
|
|||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="100dp"
|
||||
tools:context="info.nightscout.androidaps.utils.ui.NumberPickerVertical">
|
||||
tools:context="info.nightscout.core.ui.elements.NumberPickerVertical">
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/textInputLayout"
|
|
@ -1,5 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2013 The Android Open Source Project
|
||||
<?xml version="1.0" encoding="utf-8"?><!-- Copyright (C) 2013 The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
|
@ -12,4 +12,16 @@
|
|||
<!-- TwoMessagesDialog -->
|
||||
<string name="password_preferences_decrypt_prompt">You will be asked for master password, which is needed to decrypt imported preferences.</string>
|
||||
|
||||
<!-- NumberPicker -->
|
||||
<string name="a11y_min_button_description">decrement %1$s by %2$s</string>
|
||||
<string name="a11y_plus_button_description">increment %1$s by %2$s</string>
|
||||
<string name="you_are_on_allowed_limit">Allowed limit reached</string>
|
||||
<string name="format_hour_minute">%1$dh %2$dm</string>
|
||||
|
||||
<!-- datetime layout -->
|
||||
<string name="event_time_label">Event time</string>
|
||||
|
||||
<!-- BluetoothDevicePreference -->
|
||||
<string name="needconnectpermission">Application needs bluetooth permission</string>
|
||||
|
||||
</resources>
|
|
@ -24,7 +24,7 @@ import java.text.NumberFormat;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import info.nightscout.androidaps.utils.ui.NumberPicker;
|
||||
import info.nightscout.core.ui.elements.NumberPicker;
|
||||
import info.nightscout.core.ui.elements.SpinnerHelper;
|
||||
import info.nightscout.plugins.R;
|
||||
import info.nightscout.rx.logging.AAPSLogger;
|
||||
|
|
|
@ -81,7 +81,7 @@
|
|||
android:textSize="14sp" />
|
||||
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.NumberPicker
|
||||
<info.nightscout.core.ui.elements.NumberPicker
|
||||
android:id="@+id/tune_days"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
|
@ -181,7 +181,7 @@
|
|||
android:text="@string/dia"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.NumberPicker
|
||||
<info.nightscout.core.ui.elements.NumberPicker
|
||||
android:id="@+id/dia"
|
||||
android:layout_width="130dp"
|
||||
android:layout_height="40dp"
|
||||
|
|
|
@ -20,13 +20,13 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.NumberPicker
|
||||
<info.nightscout.core.ui.elements.NumberPicker
|
||||
android:id="@+id/timelistedit_edit1"
|
||||
android:layout_width="130dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginEnd="5dp" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.NumberPicker
|
||||
<info.nightscout.core.ui.elements.NumberPicker
|
||||
android:id="@+id/timelistedit_edit2"
|
||||
android:layout_width="130dp"
|
||||
android:layout_height="40dp" />
|
||||
|
|
|
@ -20,13 +20,13 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.NumberPickerVertical
|
||||
<info.nightscout.core.ui.elements.NumberPickerVertical
|
||||
android:id="@+id/timelistedit_edit1"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="100dp"
|
||||
android:layout_marginEnd="5dp" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.NumberPickerVertical
|
||||
<info.nightscout.core.ui.elements.NumberPickerVertical
|
||||
android:id="@+id/timelistedit_edit2"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="100dp" />
|
||||
|
|
|
@ -177,7 +177,7 @@
|
|||
android:text="@string/danar_screentimeout"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.NumberPicker
|
||||
<info.nightscout.core.ui.elements.NumberPicker
|
||||
android:id="@+id/screentimeout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="40dp"
|
||||
|
@ -214,7 +214,7 @@
|
|||
android:text="@string/danar_backlight"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.NumberPicker
|
||||
<info.nightscout.core.ui.elements.NumberPicker
|
||||
android:id="@+id/backlight"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="40dp"
|
||||
|
@ -270,7 +270,7 @@
|
|||
android:text="@string/danar_shutdown"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.NumberPicker
|
||||
<info.nightscout.core.ui.elements.NumberPicker
|
||||
android:id="@+id/shutdown"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="40dp"
|
||||
|
@ -307,7 +307,7 @@
|
|||
android:text="@string/danar_lowreservoir"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.NumberPicker
|
||||
<info.nightscout.core.ui.elements.NumberPicker
|
||||
android:id="@+id/lowreservoir"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="40dp"
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
android:title="@string/danar_pump_settings"
|
||||
app:initialExpandedChildrenCount="0">
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.BluetoothDevicePreference
|
||||
<info.nightscout.core.ui.elements.BluetoothDevicePreference
|
||||
android:dialogTitle="@string/danar_bt_name_title"
|
||||
android:key="@string/key_danar_bt_name"
|
||||
android:title="@string/danar_bt_name_title" />
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
android:title="@string/danar_pump_settings"
|
||||
app:initialExpandedChildrenCount="0">
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.BluetoothDevicePreference
|
||||
<info.nightscout.core.ui.elements.BluetoothDevicePreference
|
||||
android:dialogTitle="@string/danar_bt_name_title"
|
||||
android:key="@string/key_danar_bt_name"
|
||||
android:title="@string/danar_bt_name_title" />
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
android:title="@string/danar_pump_settings"
|
||||
app:initialExpandedChildrenCount="0">
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.BluetoothDevicePreference
|
||||
<info.nightscout.core.ui.elements.BluetoothDevicePreference
|
||||
android:dialogTitle="@string/danar_bt_name_title"
|
||||
android:key="@string/key_danar_bt_name"
|
||||
android:title="@string/danar_bt_name_title" />
|
||||
|
|
|
@ -296,7 +296,7 @@
|
|||
android:layout_marginEnd="20dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.NumberPicker
|
||||
<info.nightscout.core.ui.elements.NumberPicker
|
||||
android:id="@+id/bolus_speed"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="40dp"
|
||||
|
|
|
@ -71,7 +71,7 @@
|
|||
android:text="@string/age"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.NumberPicker
|
||||
<info.nightscout.core.ui.elements.NumberPicker
|
||||
android:id="@+id/age"
|
||||
android:layout_width="130dp"
|
||||
android:layout_height="40dp"
|
||||
|
@ -96,7 +96,7 @@
|
|||
android:text="@string/tdd_total"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.NumberPicker
|
||||
<info.nightscout.core.ui.elements.NumberPicker
|
||||
android:id="@+id/tdd"
|
||||
android:layout_width="130dp"
|
||||
android:layout_height="40dp"
|
||||
|
@ -120,7 +120,7 @@
|
|||
android:text="@string/weight_label"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.NumberPicker
|
||||
<info.nightscout.core.ui.elements.NumberPicker
|
||||
android:id="@+id/weight"
|
||||
android:layout_width="130dp"
|
||||
android:layout_height="40dp"
|
||||
|
@ -143,7 +143,7 @@
|
|||
android:text="@string/basal_pct_from_tdd_label"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.NumberPicker
|
||||
<info.nightscout.core.ui.elements.NumberPicker
|
||||
android:id="@+id/basal_pct_from_tdd"
|
||||
android:layout_width="130dp"
|
||||
android:layout_height="40dp"
|
||||
|
|
|
@ -64,7 +64,7 @@
|
|||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.NumberPicker
|
||||
<info.nightscout.core.ui.elements.NumberPicker
|
||||
android:id="@+id/bg"
|
||||
android:layout_width="130dp"
|
||||
android:layout_height="40dp"
|
||||
|
|
|
@ -117,7 +117,7 @@
|
|||
|
||||
</LinearLayout>
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.MinutesNumberPicker
|
||||
<info.nightscout.core.ui.elements.MinutesNumberPicker
|
||||
android:id="@+id/time"
|
||||
android:layout_width="130dp"
|
||||
android:layout_height="40dp"
|
||||
|
@ -152,7 +152,7 @@
|
|||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.NumberPicker
|
||||
<info.nightscout.core.ui.elements.NumberPicker
|
||||
android:id="@+id/duration"
|
||||
android:layout_width="130dp"
|
||||
android:layout_height="40dp"
|
||||
|
@ -190,11 +190,11 @@
|
|||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.NumberPicker
|
||||
android:id="@+id/carbs"
|
||||
android:layout_width="130dp"
|
||||
android:layout_height="40dp"
|
||||
app:customContentDescription="@string/carbs" />
|
||||
<info.nightscout.core.ui.elements.NumberPicker
|
||||
android:id="@+id/carbs"
|
||||
android:layout_width="130dp"
|
||||
android:layout_height="40dp"
|
||||
app:customContentDescription="@string/carbs" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
|
|
|
@ -94,7 +94,7 @@
|
|||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.NumberPicker
|
||||
<info.nightscout.core.ui.elements.NumberPicker
|
||||
android:id="@+id/bg"
|
||||
android:layout_width="130dp"
|
||||
android:layout_height="40dp"
|
||||
|
@ -132,7 +132,7 @@
|
|||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.MinutesNumberPicker
|
||||
<info.nightscout.core.ui.elements.MinutesNumberPicker
|
||||
android:id="@+id/duration"
|
||||
android:layout_width="130dp"
|
||||
android:layout_height="40dp"
|
||||
|
|
|
@ -60,7 +60,7 @@
|
|||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.NumberPicker
|
||||
<info.nightscout.core.ui.elements.NumberPicker
|
||||
android:id="@+id/insulin"
|
||||
android:layout_width="130dp"
|
||||
android:layout_height="40dp"
|
||||
|
@ -96,11 +96,11 @@
|
|||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.MinutesNumberPicker
|
||||
<info.nightscout.core.ui.elements.MinutesNumberPicker
|
||||
android:id="@+id/duration"
|
||||
android:layout_width="130dp"
|
||||
android:layout_height="40dp"
|
||||
app:customContentDescription="@string/duration_label" />
|
||||
app:customContentDescription="@string/duration_label" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
|
|
|
@ -81,7 +81,7 @@
|
|||
android:text="@string/overview_insulin_label"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.NumberPicker
|
||||
<info.nightscout.core.ui.elements.NumberPicker
|
||||
android:id="@+id/fill_insulin_amount"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="40dp"
|
||||
|
|
|
@ -83,7 +83,7 @@
|
|||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.MinutesNumberPicker
|
||||
<info.nightscout.core.ui.elements.MinutesNumberPicker
|
||||
android:id="@+id/time"
|
||||
android:layout_width="130dp"
|
||||
android:layout_height="40dp"
|
||||
|
@ -119,11 +119,11 @@
|
|||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.NumberPicker
|
||||
<info.nightscout.core.ui.elements.NumberPicker
|
||||
android:id="@+id/amount"
|
||||
android:layout_width="130dp"
|
||||
android:layout_height="40dp"
|
||||
app:customContentDescription="@string/overview_insulin_label"/>
|
||||
app:customContentDescription="@string/overview_insulin_label" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
|
|
|
@ -97,7 +97,7 @@
|
|||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.MinutesNumberPicker
|
||||
<info.nightscout.core.ui.elements.MinutesNumberPicker
|
||||
android:id="@+id/duration"
|
||||
android:layout_width="130dp"
|
||||
android:layout_height="40dp"
|
||||
|
@ -134,7 +134,7 @@
|
|||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.NumberPicker
|
||||
<info.nightscout.core.ui.elements.NumberPicker
|
||||
android:id="@+id/percentage"
|
||||
android:layout_width="130dp"
|
||||
android:layout_height="40dp"
|
||||
|
@ -172,11 +172,11 @@
|
|||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.NumberPicker
|
||||
<info.nightscout.core.ui.elements.NumberPicker
|
||||
android:id="@+id/timeshift"
|
||||
android:layout_width="130dp"
|
||||
android:layout_height="40dp"
|
||||
app:customContentDescription="@string/timeshift_label"/>
|
||||
app:customContentDescription="@string/timeshift_label" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
|
|
|
@ -61,7 +61,7 @@
|
|||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.NumberPicker
|
||||
<info.nightscout.core.ui.elements.NumberPicker
|
||||
android:id="@+id/basal_percent_input"
|
||||
android:layout_width="130dp"
|
||||
android:layout_height="40dp"
|
||||
|
@ -99,7 +99,7 @@
|
|||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.NumberPicker
|
||||
<info.nightscout.core.ui.elements.NumberPicker
|
||||
android:id="@+id/basal_absolute_input"
|
||||
android:layout_width="130dp"
|
||||
android:layout_height="40dp"
|
||||
|
@ -135,7 +135,7 @@
|
|||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.MinutesNumberPicker
|
||||
<info.nightscout.core.ui.elements.MinutesNumberPicker
|
||||
android:id="@+id/duration"
|
||||
android:layout_width="130dp"
|
||||
android:layout_height="40dp"
|
||||
|
|
|
@ -61,7 +61,7 @@
|
|||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.NumberPicker
|
||||
<info.nightscout.core.ui.elements.NumberPicker
|
||||
android:id="@+id/temptarget"
|
||||
android:layout_width="130dp"
|
||||
android:layout_height="40dp"
|
||||
|
@ -98,7 +98,7 @@
|
|||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.MinutesNumberPicker
|
||||
<info.nightscout.core.ui.elements.MinutesNumberPicker
|
||||
android:id="@+id/duration"
|
||||
android:layout_width="130dp"
|
||||
android:layout_height="40dp"
|
||||
|
|
|
@ -72,7 +72,7 @@
|
|||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.NumberPicker
|
||||
<info.nightscout.core.ui.elements.NumberPicker
|
||||
android:id="@+id/insulin"
|
||||
android:layout_width="130dp"
|
||||
android:layout_height="40dp"
|
||||
|
@ -108,7 +108,7 @@
|
|||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.NumberPicker
|
||||
<info.nightscout.core.ui.elements.NumberPicker
|
||||
android:id="@+id/carbs"
|
||||
android:layout_width="130dp"
|
||||
android:layout_height="40dp"
|
||||
|
|
|
@ -65,7 +65,7 @@
|
|||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.NumberPicker
|
||||
<info.nightscout.core.ui.elements.NumberPicker
|
||||
android:id="@+id/bg_input"
|
||||
android:layout_width="130dp"
|
||||
android:layout_height="40dp"
|
||||
|
@ -99,7 +99,7 @@
|
|||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.NumberPicker
|
||||
<info.nightscout.core.ui.elements.NumberPicker
|
||||
android:id="@+id/carbs_input"
|
||||
android:layout_width="130dp"
|
||||
android:layout_height="40dp"
|
||||
|
@ -154,7 +154,7 @@
|
|||
|
||||
</LinearLayout>
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.NumberPicker
|
||||
<info.nightscout.core.ui.elements.NumberPicker
|
||||
android:id="@+id/correction_input"
|
||||
android:layout_width="130dp"
|
||||
android:layout_height="40dp"
|
||||
|
@ -353,7 +353,7 @@
|
|||
android:layoutDirection="rtl"
|
||||
android:padding="2dp" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.NumberPicker
|
||||
<info.nightscout.core.ui.elements.NumberPicker
|
||||
android:id="@+id/carb_time_input"
|
||||
android:layout_width="130dp"
|
||||
android:layout_height="40dp"
|
||||
|
|
Loading…
Reference in a new issue