Add test button
This commit is contained in:
parent
779124f8b9
commit
80e0992faa
4 changed files with 18 additions and 2 deletions
|
@ -29,6 +29,7 @@ import info.nightscout.androidaps.plugins.pump.omnipod.driver.manager.PodStateMa
|
||||||
import info.nightscout.androidaps.plugins.pump.omnipod.event.EventOmnipodPumpValuesChanged
|
import info.nightscout.androidaps.plugins.pump.omnipod.event.EventOmnipodPumpValuesChanged
|
||||||
import info.nightscout.androidaps.plugins.pump.omnipod.manager.AapsOmnipodManager
|
import info.nightscout.androidaps.plugins.pump.omnipod.manager.AapsOmnipodManager
|
||||||
import info.nightscout.androidaps.plugins.pump.omnipod.queue.command.*
|
import info.nightscout.androidaps.plugins.pump.omnipod.queue.command.*
|
||||||
|
import info.nightscout.androidaps.plugins.pump.omnipod.ui.wizard2.WizardActivity
|
||||||
import info.nightscout.androidaps.plugins.pump.omnipod.util.AapsOmnipodUtil
|
import info.nightscout.androidaps.plugins.pump.omnipod.util.AapsOmnipodUtil
|
||||||
import info.nightscout.androidaps.queue.Callback
|
import info.nightscout.androidaps.queue.Callback
|
||||||
import info.nightscout.androidaps.queue.events.EventQueueChanged
|
import info.nightscout.androidaps.queue.events.EventQueueChanged
|
||||||
|
@ -92,6 +93,10 @@ class OmnipodFragment : DaggerFragment() {
|
||||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
super.onViewCreated(view, savedInstanceState)
|
super.onViewCreated(view, savedInstanceState)
|
||||||
|
|
||||||
|
omnipod_button_replace_pod.setOnClickListener {
|
||||||
|
startActivity(Intent(context, WizardActivity::class.java))
|
||||||
|
}
|
||||||
|
|
||||||
omnipod_button_pod_mgmt.setOnClickListener {
|
omnipod_button_pod_mgmt.setOnClickListener {
|
||||||
if (omnipodPumpPlugin.rileyLinkService?.verifyConfiguration() == true) {
|
if (omnipodPumpPlugin.rileyLinkService?.verifyConfiguration() == true) {
|
||||||
activity?.let { activity ->
|
activity?.let { activity ->
|
||||||
|
|
|
@ -57,7 +57,7 @@ class PodManagementActivity : NoSplashAppCompatActivity() {
|
||||||
initPodAction()
|
initPodAction()
|
||||||
}
|
}
|
||||||
|
|
||||||
initpod_init_pod_new.setOnClickListener {
|
initpod_replace_pod.setOnClickListener {
|
||||||
val myIntent = Intent(this@PodManagementActivity, WizardActivity::class.java)
|
val myIntent = Intent(this@PodManagementActivity, WizardActivity::class.java)
|
||||||
this@PodManagementActivity.startActivity(myIntent)
|
this@PodManagementActivity.startActivity(myIntent)
|
||||||
}
|
}
|
||||||
|
|
|
@ -750,6 +750,17 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/omnipod_button_replace_pod"
|
||||||
|
style="@style/ButtonSmallFontStyle"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:drawableTop="@drawable/ic_actions_refill"
|
||||||
|
android:paddingLeft="0dp"
|
||||||
|
android:paddingRight="0dp"
|
||||||
|
android:text="@string/omnipod_button_replace_pod" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/omnipod_button_refresh_status"
|
android:id="@+id/omnipod_button_refresh_status"
|
||||||
style="@style/ButtonSmallFontStyle"
|
style="@style/ButtonSmallFontStyle"
|
||||||
|
|
|
@ -78,7 +78,7 @@
|
||||||
android:text="" />
|
android:text="" />
|
||||||
|
|
||||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||||
android:id="@+id/initpod_init_pod_new"
|
android:id="@+id/initpod_replace_pod"
|
||||||
style="?android:attr/buttonStyle"
|
style="?android:attr/buttonStyle"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
|
Loading…
Reference in a new issue