elements -> :core:ui
This commit is contained in:
parent
359b3f41b5
commit
b6b3600410
|
@ -42,7 +42,7 @@ import info.nightscout.androidaps.utils.extensions.isRunningRealPumpTest
|
|||
import info.nightscout.androidaps.utils.protection.PasswordCheck
|
||||
import info.nightscout.androidaps.utils.protection.ProtectionCheck
|
||||
import info.nightscout.androidaps.utils.tabs.TabPageAdapter
|
||||
import info.nightscout.androidaps.utils.ui.UIRunnable
|
||||
import info.nightscout.core.ui.UIRunnable
|
||||
import info.nightscout.core.fabric.FabricPrivacy
|
||||
import info.nightscout.core.ui.dialogs.OKDialog
|
||||
import info.nightscout.database.entities.UserEntry.Action
|
||||
|
|
|
@ -47,8 +47,8 @@ import info.nightscout.androidaps.plugins.pump.omnipod.eros.OmnipodErosPumpPlugi
|
|||
import info.nightscout.androidaps.utils.DefaultValueHelper
|
||||
import info.nightscout.androidaps.utils.ToastUtils
|
||||
import info.nightscout.androidaps.utils.protection.ProtectionCheck
|
||||
import info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
import info.nightscout.androidaps.utils.ui.UIRunnable
|
||||
import info.nightscout.core.ui.elements.SingleClickButton
|
||||
import info.nightscout.core.ui.UIRunnable
|
||||
import info.nightscout.automation.AutomationPlugin
|
||||
import info.nightscout.core.fabric.FabricPrivacy
|
||||
import info.nightscout.core.iob.displayText
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
android:padding="10dip"
|
||||
app:columnCount="2">
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
<info.nightscout.core.ui.elements.SingleClickButton
|
||||
android:id="@+id/nav_logsettings"
|
||||
style="@style/GrayButton"
|
||||
android:layout_width="0dp"
|
||||
|
@ -70,7 +70,7 @@
|
|||
app:layout_gravity="fill"
|
||||
app:layout_row="0" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
<info.nightscout.core.ui.elements.SingleClickButton
|
||||
android:id="@+id/log_send"
|
||||
style="@style/GrayButton"
|
||||
android:layout_width="0dp"
|
||||
|
@ -85,7 +85,7 @@
|
|||
app:layout_gravity="fill"
|
||||
app:layout_row="0" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
<info.nightscout.core.ui.elements.SingleClickButton
|
||||
android:id="@+id/log_delete"
|
||||
style="@style/GrayButton"
|
||||
android:layout_width="0dp"
|
||||
|
@ -133,7 +133,7 @@
|
|||
android:padding="10dip"
|
||||
app:columnCount="2">
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
<info.nightscout.core.ui.elements.SingleClickButton
|
||||
android:id="@+id/nav_export"
|
||||
style="@style/GrayButton"
|
||||
android:layout_width="0dp"
|
||||
|
@ -148,7 +148,7 @@
|
|||
app:layout_gravity="fill"
|
||||
app:layout_row="0" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
<info.nightscout.core.ui.elements.SingleClickButton
|
||||
android:id="@+id/nav_import"
|
||||
style="@style/GrayButton"
|
||||
android:layout_width="0dp"
|
||||
|
@ -196,7 +196,7 @@
|
|||
android:padding="10dip"
|
||||
app:columnCount="2">
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
<info.nightscout.core.ui.elements.SingleClickButton
|
||||
android:id="@+id/export_csv"
|
||||
style="@style/GrayButton"
|
||||
android:layout_width="0dp"
|
||||
|
@ -211,7 +211,7 @@
|
|||
app:layout_gravity="fill"
|
||||
app:layout_row="0" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
<info.nightscout.core.ui.elements.SingleClickButton
|
||||
android:id="@+id/cleanup_db"
|
||||
style="@style/GrayButton"
|
||||
android:layout_width="0dp"
|
||||
|
@ -226,7 +226,7 @@
|
|||
app:layout_gravity="fill"
|
||||
app:layout_row="1" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
<info.nightscout.core.ui.elements.SingleClickButton
|
||||
android:id="@+id/nav_resetdb"
|
||||
style="@style/GrayButton"
|
||||
android:layout_width="0dp"
|
||||
|
|
|
@ -11,7 +11,7 @@ import com.google.common.base.Optional
|
|||
import dagger.android.HasAndroidInjector
|
||||
import info.nightscout.shared.interfaces.ResourceHelper
|
||||
import info.nightscout.interfaces.utils.JsonHelper.safeGetString
|
||||
import info.nightscout.androidaps.utils.ui.VerticalTextView
|
||||
import info.nightscout.core.ui.elements.VerticalTextView
|
||||
import info.nightscout.automation.R
|
||||
import info.nightscout.automation.dialogs.ChooseOperationDialog
|
||||
import info.nightscout.rx.logging.LTag
|
||||
|
|
|
@ -5,7 +5,7 @@ import dagger.android.ContributesAndroidInjector
|
|||
import info.nightscout.androidaps.dialogs.BolusProgressDialog
|
||||
import info.nightscout.androidaps.dialogs.ErrorDialog
|
||||
import info.nightscout.androidaps.plugins.general.maintenance.activities.PrefImportListActivity
|
||||
import info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
import info.nightscout.core.ui.elements.SingleClickButton
|
||||
|
||||
@Module
|
||||
@Suppress("unused")
|
||||
|
|
|
@ -12,20 +12,16 @@ import android.widget.Toast
|
|||
import androidx.annotation.DrawableRes
|
||||
import androidx.annotation.StringRes
|
||||
import androidx.appcompat.view.ContextThemeWrapper
|
||||
import info.nightscout.core.main.R
|
||||
import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification
|
||||
import info.nightscout.core.main.R
|
||||
import info.nightscout.core.ui.getThemeColor
|
||||
import info.nightscout.interfaces.notifications.Notification
|
||||
import info.nightscout.androidaps.utils.resources.getThemeColor
|
||||
import info.nightscout.interfaces.utils.HtmlHelper
|
||||
import info.nightscout.rx.bus.RxBus
|
||||
|
||||
object ToastUtils {
|
||||
|
||||
private var lastToast: Toast? = null
|
||||
fun showToastInUiThread(ctx: Context, stringId: Int) {
|
||||
showToastInUiThread(ctx, ctx.getString(stringId))
|
||||
}
|
||||
|
||||
fun warnToast(ctx: Context?, string: String?) {
|
||||
graphicalToast(ctx, string, R.drawable.ic_toast_warn, true)
|
||||
}
|
||||
|
|
|
@ -1,34 +0,0 @@
|
|||
package info.nightscout.androidaps.utils.ui
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import dagger.android.HasAndroidInjector
|
||||
import info.nightscout.core.main.R
|
||||
import info.nightscout.rx.logging.AAPSLogger
|
||||
import info.nightscout.rx.logging.LTag
|
||||
|
||||
import javax.inject.Inject
|
||||
|
||||
class SingleClickButton @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = R.style.Widget_MaterialComponents_Button) :
|
||||
com.google.android.material.button.MaterialButton(context, attrs, defStyleAttr) {
|
||||
|
||||
init {
|
||||
(context.applicationContext as HasAndroidInjector).androidInjector().inject(this)
|
||||
}
|
||||
|
||||
@Inject lateinit var aapsLogger: AAPSLogger
|
||||
|
||||
override fun performClick(): Boolean = guardClick { super.performClick() }
|
||||
override fun callOnClick(): Boolean = guardClick { super.callOnClick() }
|
||||
|
||||
private fun guardClick(block: () -> Boolean): Boolean {
|
||||
isEnabled = false
|
||||
postDelayed({ isEnabled = true; aapsLogger.debug(LTag.UI, "Button enabled") }, BUTTON_REFRACTION_PERIOD)
|
||||
return block()
|
||||
}
|
||||
|
||||
companion object {
|
||||
|
||||
const val BUTTON_REFRACTION_PERIOD = 3000L
|
||||
}
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
package info.nightscout.androidaps.utils.ui
|
||||
|
||||
import info.nightscout.shared.extensions.runOnUiThread
|
||||
|
||||
class UIRunnable (val runnable: Runnable) : Runnable {
|
||||
override fun run() {
|
||||
runOnUiThread(runnable)
|
||||
}
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package info.nightscout.androidaps.utils.resources
|
||||
package info.nightscout.core.ui
|
||||
|
||||
import android.content.Context
|
||||
import android.util.TypedValue
|
14
core/ui/src/main/java/info/nightscout/core/ui/UIRunnable.kt
Normal file
14
core/ui/src/main/java/info/nightscout/core/ui/UIRunnable.kt
Normal file
|
@ -0,0 +1,14 @@
|
|||
package info.nightscout.core.ui
|
||||
|
||||
import android.os.Handler
|
||||
import android.os.Looper
|
||||
|
||||
class UIRunnable (val runnable: Runnable) : Runnable {
|
||||
private fun runOnUiThread(theRunnable: Runnable?) = theRunnable?.let {
|
||||
Handler(Looper.getMainLooper()).post(it)
|
||||
}
|
||||
|
||||
override fun run() {
|
||||
runOnUiThread(runnable)
|
||||
}
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
package info.nightscout.core.ui.elements
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import com.google.android.material.button.MaterialButton
|
||||
import info.nightscout.core.ui.R
|
||||
|
||||
class SingleClickButton @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = R.style.Widget_MaterialComponents_Button) :
|
||||
MaterialButton(context, attrs, defStyleAttr) {
|
||||
|
||||
override fun performClick(): Boolean = guardClick { super.performClick() }
|
||||
override fun callOnClick(): Boolean = guardClick { super.callOnClick() }
|
||||
|
||||
private fun guardClick(block: () -> Boolean): Boolean {
|
||||
isEnabled = false
|
||||
postDelayed({ isEnabled = true }, BUTTON_REFRACTION_PERIOD)
|
||||
return block()
|
||||
}
|
||||
|
||||
companion object {
|
||||
|
||||
const val BUTTON_REFRACTION_PERIOD = 3000L
|
||||
}
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package info.nightscout.androidaps.utils.ui
|
||||
package info.nightscout.core.ui.elements
|
||||
|
||||
import android.content.Context
|
||||
import android.graphics.Canvas
|
|
@ -18,7 +18,7 @@ import androidx.annotation.StringRes
|
|||
import androidx.appcompat.app.AppCompatDelegate
|
||||
import androidx.appcompat.view.ContextThemeWrapper
|
||||
import androidx.core.content.ContextCompat
|
||||
import info.nightscout.androidaps.utils.resources.getThemeColor
|
||||
import info.nightscout.core.ui.getThemeColor
|
||||
import info.nightscout.core.fabric.FabricPrivacy
|
||||
import info.nightscout.core.main.R
|
||||
import info.nightscout.shared.interfaces.ResourceHelper
|
||||
|
|
|
@ -14,10 +14,10 @@ import info.nightscout.androidaps.extensions.toStringMedium
|
|||
import info.nightscout.androidaps.extensions.toStringShort
|
||||
import info.nightscout.androidaps.logging.UserEntryLogger
|
||||
import info.nightscout.androidaps.utils.protection.ProtectionCheck
|
||||
import info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
import info.nightscout.androidaps.utils.ui.UIRunnable
|
||||
import info.nightscout.core.fabric.FabricPrivacy
|
||||
import info.nightscout.core.ui.UIRunnable
|
||||
import info.nightscout.core.ui.dialogs.OKDialog
|
||||
import info.nightscout.core.ui.elements.SingleClickButton
|
||||
import info.nightscout.database.entities.UserEntry.Action
|
||||
import info.nightscout.database.entities.UserEntry.Sources
|
||||
import info.nightscout.database.impl.AppRepository
|
||||
|
|
|
@ -14,7 +14,7 @@ import androidx.recyclerview.widget.RecyclerView
|
|||
import dagger.android.support.DaggerFragment
|
||||
import info.nightscout.androidaps.logging.UserEntryLogger
|
||||
import info.nightscout.androidaps.utils.protection.ProtectionCheck
|
||||
import info.nightscout.androidaps.utils.ui.UIRunnable
|
||||
import info.nightscout.core.ui.UIRunnable
|
||||
import info.nightscout.core.fabric.FabricPrivacy
|
||||
import info.nightscout.core.ui.dialogs.OKDialog
|
||||
import info.nightscout.database.entities.Food
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
android:padding="10dip"
|
||||
app:columnCount="2">
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
<info.nightscout.core.ui.elements.SingleClickButton
|
||||
android:id="@+id/profile_switch"
|
||||
style="@style/GrayButton"
|
||||
android:layout_width="0dp"
|
||||
|
@ -56,7 +56,7 @@
|
|||
app:layout_gravity="fill"
|
||||
app:layout_row="0" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
<info.nightscout.core.ui.elements.SingleClickButton
|
||||
android:id="@+id/temp_target"
|
||||
style="@style/GrayButton"
|
||||
android:layout_width="0dp"
|
||||
|
@ -71,7 +71,7 @@
|
|||
app:layout_gravity="fill"
|
||||
app:layout_row="0" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
<info.nightscout.core.ui.elements.SingleClickButton
|
||||
android:id="@+id/set_temp_basal"
|
||||
style="@style/GrayButton"
|
||||
android:layout_width="0dp"
|
||||
|
@ -86,7 +86,7 @@
|
|||
app:layout_gravity="fill"
|
||||
app:layout_row="1" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
<info.nightscout.core.ui.elements.SingleClickButton
|
||||
android:id="@+id/cancel_temp_basal"
|
||||
style="@style/GrayButton"
|
||||
android:layout_width="0dp"
|
||||
|
@ -102,7 +102,7 @@
|
|||
app:layout_gravity="fill"
|
||||
app:layout_row="1" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
<info.nightscout.core.ui.elements.SingleClickButton
|
||||
android:id="@+id/extended_bolus"
|
||||
style="@style/GrayButton"
|
||||
android:layout_width="0dp"
|
||||
|
@ -117,7 +117,7 @@
|
|||
app:layout_gravity="fill"
|
||||
app:layout_row="1" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
<info.nightscout.core.ui.elements.SingleClickButton
|
||||
android:id="@+id/extended_bolus_cancel"
|
||||
style="@style/GrayButton"
|
||||
android:layout_width="0dp"
|
||||
|
@ -188,7 +188,7 @@
|
|||
android:padding="10dip"
|
||||
app:columnCount="2">
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
<info.nightscout.core.ui.elements.SingleClickButton
|
||||
android:id="@+id/bg_check"
|
||||
style="@style/GrayButton"
|
||||
android:layout_width="0dp"
|
||||
|
@ -203,7 +203,7 @@
|
|||
app:layout_gravity="fill"
|
||||
app:layout_row="2" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
<info.nightscout.core.ui.elements.SingleClickButton
|
||||
android:id="@+id/fill"
|
||||
style="@style/GrayButton"
|
||||
android:layout_width="0dp"
|
||||
|
@ -218,7 +218,7 @@
|
|||
app:layout_gravity="fill"
|
||||
app:layout_row="2" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
<info.nightscout.core.ui.elements.SingleClickButton
|
||||
android:id="@+id/cgm_sensor_insert"
|
||||
style="@style/GrayButton"
|
||||
android:layout_width="0dp"
|
||||
|
@ -233,7 +233,7 @@
|
|||
app:layout_gravity="fill"
|
||||
app:layout_row="3" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
<info.nightscout.core.ui.elements.SingleClickButton
|
||||
android:id="@+id/pump_battery_change"
|
||||
style="@style/GrayButton"
|
||||
android:layout_width="0dp"
|
||||
|
@ -248,7 +248,7 @@
|
|||
app:layout_gravity="fill"
|
||||
app:layout_row="3" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
<info.nightscout.core.ui.elements.SingleClickButton
|
||||
android:id="@+id/note"
|
||||
style="@style/GrayButton"
|
||||
android:layout_width="0dp"
|
||||
|
@ -263,7 +263,7 @@
|
|||
app:layout_gravity="fill"
|
||||
app:layout_row="4" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
<info.nightscout.core.ui.elements.SingleClickButton
|
||||
android:id="@+id/exercise"
|
||||
style="@style/GrayButton"
|
||||
android:layout_width="0dp"
|
||||
|
@ -278,7 +278,7 @@
|
|||
app:layout_gravity="fill"
|
||||
app:layout_row="4" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
<info.nightscout.core.ui.elements.SingleClickButton
|
||||
android:id="@+id/announcement"
|
||||
style="@style/GrayButton"
|
||||
android:layout_width="0dp"
|
||||
|
@ -293,7 +293,7 @@
|
|||
app:layout_gravity="fill"
|
||||
app:layout_row="5" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
<info.nightscout.core.ui.elements.SingleClickButton
|
||||
android:id="@+id/question"
|
||||
style="@style/GrayButton"
|
||||
android:layout_width="0dp"
|
||||
|
@ -341,7 +341,7 @@
|
|||
android:padding="10dip"
|
||||
app:columnCount="2">
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
<info.nightscout.core.ui.elements.SingleClickButton
|
||||
android:id="@+id/history_browser"
|
||||
style="@style/GrayButton"
|
||||
android:layout_width="0dp"
|
||||
|
@ -356,7 +356,7 @@
|
|||
app:layout_gravity="fill"
|
||||
app:layout_row="6" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
<info.nightscout.core.ui.elements.SingleClickButton
|
||||
android:id="@+id/tdd_stats"
|
||||
style="@style/GrayButton"
|
||||
android:layout_width="0dp"
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
<info.nightscout.core.ui.elements.SingleClickButton
|
||||
android:id="@+id/accept_temp_button"
|
||||
style="@style/ButtonSmallFontStyle"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -35,7 +35,7 @@
|
|||
android:paddingStart="0dp"
|
||||
android:paddingEnd="5dp">
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
<info.nightscout.core.ui.elements.SingleClickButton
|
||||
android:id="@+id/treatment_button"
|
||||
style="@style/ButtonSmallFontStyle"
|
||||
android:layout_width="0px"
|
||||
|
@ -50,7 +50,7 @@
|
|||
android:visibility="gone"
|
||||
app:iconPadding="-4dp" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
<info.nightscout.core.ui.elements.SingleClickButton
|
||||
android:id="@+id/insulin_button"
|
||||
style="@style/ButtonSmallFontStyle"
|
||||
android:layout_width="0px"
|
||||
|
@ -64,7 +64,7 @@
|
|||
android:textColor="?attr/icBolusColor"
|
||||
app:iconPadding="-4dp" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
<info.nightscout.core.ui.elements.SingleClickButton
|
||||
android:id="@+id/carbs_button"
|
||||
style="@style/ButtonSmallFontStyle"
|
||||
android:layout_width="0px"
|
||||
|
@ -78,7 +78,7 @@
|
|||
android:textColor="?attr/icBolusCarbsColor"
|
||||
app:iconPadding="-4dp" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
<info.nightscout.core.ui.elements.SingleClickButton
|
||||
android:id="@+id/wizard_button"
|
||||
style="@style/ButtonSmallFontStyle"
|
||||
android:layout_width="0px"
|
||||
|
@ -92,7 +92,7 @@
|
|||
android:textColor="?attr/icCalculatorColor"
|
||||
app:iconPadding="-4dp" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
<info.nightscout.core.ui.elements.SingleClickButton
|
||||
android:id="@+id/calibration_button"
|
||||
style="@style/ButtonSmallFontStyle"
|
||||
android:layout_width="0px"
|
||||
|
@ -107,7 +107,7 @@
|
|||
android:visibility="gone"
|
||||
app:iconPadding="-4dp" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
<info.nightscout.core.ui.elements.SingleClickButton
|
||||
android:id="@+id/cgm_button"
|
||||
style="@style/ButtonSmallFontStyle"
|
||||
android:layout_width="0px"
|
||||
|
@ -122,7 +122,7 @@
|
|||
android:visibility="gone"
|
||||
app:iconPadding="-4dp" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
<info.nightscout.core.ui.elements.SingleClickButton
|
||||
android:id="@+id/quick_wizard_button"
|
||||
style="@style/ButtonSmallFontStyle"
|
||||
android:layout_width="0px"
|
||||
|
|
|
@ -93,7 +93,7 @@
|
|||
style="@style/warning_label"
|
||||
android:text="@string/smscommunicator_otp_reset_warning" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
<info.nightscout.core.ui.elements.SingleClickButton
|
||||
android:id="@+id/otp_reset"
|
||||
style="@style/GrayButton"
|
||||
android:layout_width="fill_parent"
|
||||
|
|
|
@ -18,6 +18,7 @@ android {
|
|||
dependencies {
|
||||
implementation project(':libraries')
|
||||
implementation project(':core:core-main')
|
||||
implementation project(':core:ui')
|
||||
implementation project(':core:fabric')
|
||||
implementation project(':app-wear-shared:rx')
|
||||
implementation project(':app-wear-shared:shared')
|
||||
|
|
|
@ -613,7 +613,7 @@
|
|||
android:orientation="horizontal"
|
||||
android:paddingEnd="4dp">
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
<info.nightscout.core.ui.elements.SingleClickButton
|
||||
android:id="@+id/combo_refresh_button"
|
||||
style="@style/GrayButton"
|
||||
android:layout_width="0dp"
|
||||
|
|
|
@ -660,7 +660,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
<info.nightscout.core.ui.elements.SingleClickButton
|
||||
android:id="@+id/view_profile"
|
||||
style="@style/ButtonSmallFontStyle"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -673,7 +673,7 @@
|
|||
android:text="@string/viewprofile"
|
||||
app:iconPadding="-4dp" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
<info.nightscout.core.ui.elements.SingleClickButton
|
||||
android:id="@+id/history"
|
||||
style="@style/ButtonSmallFontStyle"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -687,7 +687,7 @@
|
|||
app:iconPadding="-4dp"
|
||||
tools:ignore="TooManyViews" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
<info.nightscout.core.ui.elements.SingleClickButton
|
||||
android:id="@+id/stats"
|
||||
style="@style/ButtonSmallFontStyle"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -700,7 +700,7 @@
|
|||
android:text="@string/stats"
|
||||
app:iconPadding="-4dp" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
<info.nightscout.core.ui.elements.SingleClickButton
|
||||
android:id="@+id/user_options"
|
||||
style="@style/ButtonSmallFontStyle"
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
@ -26,7 +26,7 @@ import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.definitio
|
|||
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.definition.PodConstants
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.state.OmnipodDashPodStateManager
|
||||
import info.nightscout.androidaps.utils.protection.ProtectionCheck
|
||||
import info.nightscout.androidaps.utils.ui.UIRunnable
|
||||
import info.nightscout.core.ui.UIRunnable
|
||||
import info.nightscout.core.fabric.FabricPrivacy
|
||||
import info.nightscout.core.ui.dialogs.OKDialog
|
||||
import info.nightscout.interfaces.BuildHelper
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
android:orientation="horizontal"
|
||||
app:layout_constraintGuide_percent="0" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
<info.nightscout.core.ui.elements.SingleClickButton
|
||||
android:id="@+id/button_activate_pod"
|
||||
style="@style/ButtonSmallFontStyle"
|
||||
android:layout_width="0dp"
|
||||
|
@ -66,7 +66,7 @@
|
|||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.5" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
<info.nightscout.core.ui.elements.SingleClickButton
|
||||
android:id="@+id/button_deactivate_pod"
|
||||
style="@style/ButtonSmallFontStyle"
|
||||
android:layout_width="0dp"
|
||||
|
@ -95,7 +95,7 @@
|
|||
android:orientation="horizontal"
|
||||
app:layout_constraintGuide_percent="0" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
<info.nightscout.core.ui.elements.SingleClickButton
|
||||
android:id="@+id/button_play_test_beep"
|
||||
style="@style/ButtonSmallFontStyle"
|
||||
android:layout_width="0dp"
|
||||
|
@ -109,7 +109,7 @@
|
|||
app:layout_constraintRight_toLeftOf="@+id/Actions_Col_1_Row_2_vertical_guideline"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
<info.nightscout.core.ui.elements.SingleClickButton
|
||||
android:id="@+id/button_pod_history"
|
||||
style="@style/ButtonSmallFontStyle"
|
||||
android:layout_width="0dp"
|
||||
|
@ -130,7 +130,7 @@
|
|||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.5" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
<info.nightscout.core.ui.elements.SingleClickButton
|
||||
android:id="@+id/button_discard_pod"
|
||||
style="@style/ButtonSmallFontStyle"
|
||||
android:layout_width="0dp"
|
||||
|
|
|
@ -24,7 +24,7 @@ import info.nightscout.androidaps.plugins.pump.omnipod.eros.manager.AapsOmnipodE
|
|||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.queue.command.CommandReadPulseLog
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.wizard.activation.ErosPodActivationWizardActivity
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.wizard.deactivation.ErosPodDeactivationWizardActivity
|
||||
import info.nightscout.androidaps.utils.ui.UIRunnable
|
||||
import info.nightscout.core.ui.UIRunnable
|
||||
import info.nightscout.core.fabric.FabricPrivacy
|
||||
import info.nightscout.core.ui.dialogs.OKDialog
|
||||
import info.nightscout.interfaces.BuildHelper
|
||||
|
@ -239,7 +239,7 @@ class ErosPodManagementActivity : NoSplashAppCompatActivity() {
|
|||
|
||||
private fun displayNotConfiguredDialog() {
|
||||
context.let {
|
||||
UIRunnable {
|
||||
info.nightscout.core.ui.UIRunnable {
|
||||
OKDialog.show(
|
||||
it, rh.gs(R.string.omnipod_common_warning),
|
||||
rh.gs(R.string.omnipod_eros_error_operation_not_possible_no_configuration), null
|
||||
|
|
|
@ -35,7 +35,7 @@ import info.nightscout.androidaps.plugins.pump.omnipod.eros.queue.command.Comman
|
|||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.util.AapsOmnipodUtil
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.util.OmnipodAlertUtil
|
||||
import info.nightscout.androidaps.utils.protection.ProtectionCheck
|
||||
import info.nightscout.androidaps.utils.ui.UIRunnable
|
||||
import info.nightscout.core.ui.UIRunnable
|
||||
import info.nightscout.core.fabric.FabricPrivacy
|
||||
import info.nightscout.core.ui.dialogs.OKDialog
|
||||
import info.nightscout.interfaces.Constants
|
||||
|
@ -124,7 +124,7 @@ class OmnipodErosOverviewFragment : DaggerFragment() {
|
|||
context?.let { context ->
|
||||
protectionCheck.queryProtection(
|
||||
activity, ProtectionCheck.Protection.PREFERENCES,
|
||||
UIRunnable { startActivity(Intent(context, ErosPodManagementActivity::class.java)) }
|
||||
info.nightscout.core.ui.UIRunnable { startActivity(Intent(context, ErosPodManagementActivity::class.java)) }
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@ -581,7 +581,7 @@ class OmnipodErosOverviewFragment : DaggerFragment() {
|
|||
|
||||
private fun displayNotConfiguredDialog() {
|
||||
context?.let {
|
||||
UIRunnable {
|
||||
info.nightscout.core.ui.UIRunnable {
|
||||
OKDialog.show(
|
||||
it, rh.gs(R.string.omnipod_common_warning),
|
||||
rh.gs(R.string.omnipod_eros_error_operation_not_possible_no_configuration), null
|
||||
|
@ -598,7 +598,7 @@ class OmnipodErosOverviewFragment : DaggerFragment() {
|
|||
|
||||
private fun displayOkDialog(title: String, message: String) {
|
||||
context?.let {
|
||||
UIRunnable {
|
||||
info.nightscout.core.ui.UIRunnable {
|
||||
OKDialog.show(it, title, message, null)
|
||||
}.run()
|
||||
}
|
||||
|
|
|
@ -73,7 +73,7 @@
|
|||
android:orientation="horizontal"
|
||||
app:layout_constraintGuide_percent="0" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
<info.nightscout.core.ui.elements.SingleClickButton
|
||||
android:id="@+id/button_activate_pod"
|
||||
style="@style/ButtonSmallFontStyle"
|
||||
android:layout_width="0dp"
|
||||
|
@ -94,7 +94,7 @@
|
|||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.5" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
<info.nightscout.core.ui.elements.SingleClickButton
|
||||
android:id="@+id/button_deactivate_pod"
|
||||
style="@style/ButtonSmallFontStyle"
|
||||
android:layout_width="0dp"
|
||||
|
@ -123,7 +123,7 @@
|
|||
android:orientation="horizontal"
|
||||
app:layout_constraintGuide_percent="0" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
<info.nightscout.core.ui.elements.SingleClickButton
|
||||
android:id="@+id/button_play_test_beep"
|
||||
style="@style/ButtonSmallFontStyle"
|
||||
android:layout_width="0dp"
|
||||
|
@ -144,7 +144,7 @@
|
|||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.5" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
<info.nightscout.core.ui.elements.SingleClickButton
|
||||
android:id="@+id/button_discard_pod"
|
||||
style="@style/ButtonSmallFontStyle"
|
||||
android:layout_width="0dp"
|
||||
|
@ -182,7 +182,7 @@
|
|||
android:orientation="horizontal"
|
||||
app:layout_constraintGuide_percent="0" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
<info.nightscout.core.ui.elements.SingleClickButton
|
||||
android:id="@+id/button_reset_rileylink_config"
|
||||
style="@style/ButtonSmallFontStyle"
|
||||
android:layout_width="0dp"
|
||||
|
@ -203,7 +203,7 @@
|
|||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.5" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
<info.nightscout.core.ui.elements.SingleClickButton
|
||||
android:id="@+id/button_pod_history"
|
||||
style="@style/ButtonSmallFontStyle"
|
||||
android:layout_width="0dp"
|
||||
|
@ -231,7 +231,7 @@
|
|||
android:orientation="horizontal"
|
||||
app:layout_constraintGuide_percent="0" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
<info.nightscout.core.ui.elements.SingleClickButton
|
||||
android:id="@+id/button_rileylink_stats"
|
||||
style="@style/ButtonSmallFontStyle"
|
||||
android:layout_width="0dp"
|
||||
|
@ -252,7 +252,7 @@
|
|||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.5" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
<info.nightscout.core.ui.elements.SingleClickButton
|
||||
android:id="@+id/button_pulse_log"
|
||||
style="@style/ButtonSmallFontStyle"
|
||||
android:layout_width="0dp"
|
||||
|
|
|
@ -160,7 +160,7 @@
|
|||
android:layout_marginStart="10dp"
|
||||
android:orientation="vertical" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
<info.nightscout.core.ui.elements.SingleClickButton
|
||||
android:id="@+id/copy_to_local_profile"
|
||||
style="@style/GrayButton"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -234,7 +234,7 @@
|
|||
|
||||
</LinearLayout>
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
<info.nightscout.core.ui.elements.SingleClickButton
|
||||
android:id="@+id/compare_profiles"
|
||||
style="@style/GrayButton"
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
@ -69,7 +69,7 @@
|
|||
android:layout_gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
<info.nightscout.core.ui.elements.SingleClickButton
|
||||
android:id="@+id/overview_closeloop"
|
||||
style="@style/ButtonSmallFontStyle"
|
||||
android:layout_width="0dp"
|
||||
|
@ -84,7 +84,7 @@
|
|||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||
android:visibility="gone" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
<info.nightscout.core.ui.elements.SingleClickButton
|
||||
android:id="@+id/overview_lgsloop"
|
||||
style="@style/ButtonSmallFontStyle"
|
||||
android:layout_width="0dp"
|
||||
|
@ -98,7 +98,7 @@
|
|||
android:text="@string/lowglucosesuspend"
|
||||
android:visibility="gone" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
<info.nightscout.core.ui.elements.SingleClickButton
|
||||
android:id="@+id/overview_openloop"
|
||||
style="@style/ButtonSmallFontStyle"
|
||||
android:layout_width="0dp"
|
||||
|
@ -112,7 +112,7 @@
|
|||
android:text="@string/openloop"
|
||||
android:visibility="gone" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
<info.nightscout.core.ui.elements.SingleClickButton
|
||||
android:id="@+id/overview_enable"
|
||||
style="@style/ButtonSmallFontStyle"
|
||||
android:layout_width="0dp"
|
||||
|
@ -127,7 +127,7 @@
|
|||
android:textSize="11sp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
<info.nightscout.core.ui.elements.SingleClickButton
|
||||
android:id="@+id/overview_disable"
|
||||
style="@style/ButtonSmallFontStyle"
|
||||
android:layout_width="0dp"
|
||||
|
@ -168,7 +168,7 @@
|
|||
android:text="@string/suspendloop"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
<info.nightscout.core.ui.elements.SingleClickButton
|
||||
android:id="@+id/overview_resume"
|
||||
style="@style/ButtonSmallFontStyle"
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -189,7 +189,7 @@
|
|||
android:layout_gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
<info.nightscout.core.ui.elements.SingleClickButton
|
||||
android:id="@+id/overview_suspend_1h"
|
||||
style="@style/ButtonSmallFontStyle"
|
||||
android:layout_width="0px"
|
||||
|
@ -201,7 +201,7 @@
|
|||
android:drawableTop="@drawable/ic_loop_paused"
|
||||
android:text="@string/duration1h" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
<info.nightscout.core.ui.elements.SingleClickButton
|
||||
android:id="@+id/overview_suspend_2h"
|
||||
style="@style/ButtonSmallFontStyle"
|
||||
android:layout_width="0px"
|
||||
|
@ -213,7 +213,7 @@
|
|||
android:drawableTop="@drawable/ic_loop_paused"
|
||||
android:text="@string/duration2h" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
<info.nightscout.core.ui.elements.SingleClickButton
|
||||
android:id="@+id/overview_suspend_3h"
|
||||
style="@style/ButtonSmallFontStyle"
|
||||
android:layout_width="0px"
|
||||
|
@ -225,7 +225,7 @@
|
|||
android:drawableTop="@drawable/ic_loop_paused"
|
||||
android:text="@string/duration3h" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
<info.nightscout.core.ui.elements.SingleClickButton
|
||||
android:id="@+id/overview_suspend_10h"
|
||||
style="@style/ButtonSmallFontStyle"
|
||||
android:layout_width="0px"
|
||||
|
@ -265,7 +265,7 @@
|
|||
android:text="@string/disconnectpump"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
<info.nightscout.core.ui.elements.SingleClickButton
|
||||
android:id="@+id/overview_reconnect"
|
||||
style="@style/ButtonSmallFontStyle"
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -286,7 +286,7 @@
|
|||
android:layout_gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
<info.nightscout.core.ui.elements.SingleClickButton
|
||||
android:id="@+id/overview_disconnect_15m"
|
||||
style="@style/ButtonSmallFontStyle"
|
||||
android:layout_width="0px"
|
||||
|
@ -298,7 +298,7 @@
|
|||
android:drawableTop="@drawable/ic_loop_disconnected"
|
||||
android:text="@string/duration15m" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
<info.nightscout.core.ui.elements.SingleClickButton
|
||||
android:id="@+id/overview_disconnect_30m"
|
||||
style="@style/ButtonSmallFontStyle"
|
||||
android:layout_width="0px"
|
||||
|
@ -310,7 +310,7 @@
|
|||
android:drawableTop="@drawable/ic_loop_disconnected"
|
||||
android:text="@string/duration30m" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
<info.nightscout.core.ui.elements.SingleClickButton
|
||||
android:id="@+id/overview_disconnect_1h"
|
||||
style="@style/ButtonSmallFontStyle"
|
||||
android:layout_width="0px"
|
||||
|
@ -322,7 +322,7 @@
|
|||
android:drawableTop="@drawable/ic_loop_disconnected"
|
||||
android:text="@string/duration1h" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
<info.nightscout.core.ui.elements.SingleClickButton
|
||||
android:id="@+id/overview_disconnect_2h"
|
||||
style="@style/ButtonSmallFontStyle"
|
||||
android:layout_width="0px"
|
||||
|
@ -334,7 +334,7 @@
|
|||
android:drawableTop="@drawable/ic_loop_disconnected"
|
||||
android:text="@string/duration2h" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
<info.nightscout.core.ui.elements.SingleClickButton
|
||||
android:id="@+id/overview_disconnect_3h"
|
||||
style="@style/ButtonSmallFontStyle"
|
||||
android:layout_width="0px"
|
||||
|
|
|
@ -69,7 +69,7 @@
|
|||
android:orientation="horizontal"
|
||||
android:visibility="gone">
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
<info.nightscout.core.ui.elements.SingleClickButton
|
||||
android:id="@+id/reusebutton"
|
||||
style="@style/ButtonSmallFontStyle"
|
||||
android:drawablePadding="10dp"
|
||||
|
|
|
@ -138,7 +138,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
<info.nightscout.core.ui.elements.SingleClickButton
|
||||
android:id="@+id/target_cancel"
|
||||
style="@style/ButtonSmallFontStyle"
|
||||
android:layout_width="0px"
|
||||
|
@ -151,7 +151,7 @@
|
|||
android:text="@string/cancel"
|
||||
android:textColor="?attr/tempTargetConfirmation" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
<info.nightscout.core.ui.elements.SingleClickButton
|
||||
android:id="@+id/eating_soon"
|
||||
style="@style/ButtonSmallFontStyle"
|
||||
android:layout_width="0px"
|
||||
|
@ -164,7 +164,7 @@
|
|||
android:text="@string/eatingsoon"
|
||||
android:textColor="?attr/carbsColor" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
<info.nightscout.core.ui.elements.SingleClickButton
|
||||
android:id="@+id/activity"
|
||||
style="@style/ButtonSmallFontStyle"
|
||||
android:layout_width="0px"
|
||||
|
@ -177,7 +177,7 @@
|
|||
android:text="@string/activity"
|
||||
android:textColor="?attr/exerciseColor" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
<info.nightscout.core.ui.elements.SingleClickButton
|
||||
android:id="@+id/hypo"
|
||||
style="@style/ButtonSmallFontStyle"
|
||||
android:layout_width="0px"
|
||||
|
|
Loading…
Reference in a new issue