Show total dose delivered by pod in OmnipodFragment
This includes the units delivered during priming and cannula insertion, but it gives a nice approximation of the remaining insulin if you remember what you injected.
This commit is contained in:
parent
61d6c638b7
commit
e66033ab1e
3 changed files with 42 additions and 0 deletions
|
@ -248,6 +248,7 @@ class OmnipodFragment : DaggerFragment() {
|
||||||
omnipod_pod_firmware_version.text = "-"
|
omnipod_pod_firmware_version.text = "-"
|
||||||
omnipod_pod_expiry.text = "-"
|
omnipod_pod_expiry.text = "-"
|
||||||
omnipod_basabasalrate.text = "-"
|
omnipod_basabasalrate.text = "-"
|
||||||
|
omnipod_total_delivered.text = "-"
|
||||||
omnipod_reservoir.text = "-"
|
omnipod_reservoir.text = "-"
|
||||||
omnipod_tempbasal.text = "-"
|
omnipod_tempbasal.text = "-"
|
||||||
omnipod_lastbolus.text = "-"
|
omnipod_lastbolus.text = "-"
|
||||||
|
@ -279,6 +280,9 @@ class OmnipodFragment : DaggerFragment() {
|
||||||
omnipod_tempbasal.text = activePlugin.activeTreatments
|
omnipod_tempbasal.text = activePlugin.activeTreatments
|
||||||
.getTempBasalFromHistory(System.currentTimeMillis())?.toStringFull() ?: "-"
|
.getTempBasalFromHistory(System.currentTimeMillis())?.toStringFull() ?: "-"
|
||||||
|
|
||||||
|
// total delivered
|
||||||
|
omnipod_total_delivered.text = resourceHelper.gs(R.string.omnipod_total_delivered,podStateManager.totalInsulinDelivered);
|
||||||
|
|
||||||
// reservoir
|
// reservoir
|
||||||
if (podStateManager.reservoirLevel == null) {
|
if (podStateManager.reservoirLevel == null) {
|
||||||
omnipod_reservoir.text = resourceHelper.gs(R.string.omnipod_reservoir_over50)
|
omnipod_reservoir.text = resourceHelper.gs(R.string.omnipod_reservoir_over50)
|
||||||
|
|
|
@ -517,6 +517,42 @@
|
||||||
android:layout_marginBottom="5dp"
|
android:layout_marginBottom="5dp"
|
||||||
android:background="@color/listdelimiter" />
|
android:background="@color/listdelimiter" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1.5"
|
||||||
|
android:gravity="end"
|
||||||
|
android:paddingRight="5dp"
|
||||||
|
android:text="@string/omnipod_total_delivered_label"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="5dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="0"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:paddingStart="2dp"
|
||||||
|
android:paddingEnd="2dp"
|
||||||
|
android:text=":"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/omnipod_total_delivered"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="start"
|
||||||
|
android:paddingLeft="5dp"
|
||||||
|
android:textColor="@android:color/white"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
|
@ -26,6 +26,8 @@
|
||||||
<string name="omnipod_moments_ago">Moments ago</string>
|
<string name="omnipod_moments_ago">Moments ago</string>
|
||||||
<string name="omnipod_pod_mgmt">Pod Mgmt</string>
|
<string name="omnipod_pod_mgmt">Pod Mgmt</string>
|
||||||
<string name="omnipod_pod_status">Pod Status</string>
|
<string name="omnipod_pod_status">Pod Status</string>
|
||||||
|
<string name="omnipod_total_delivered_label">Total Delivered</string>
|
||||||
|
<string name="omnipod_total_delivered">%1$.2f U</string>
|
||||||
<string name="omnipod_reservoir_left">%1$.2f U left</string>
|
<string name="omnipod_reservoir_left">%1$.2f U left</string>
|
||||||
<string name="omnipod_reservoir_over50">Over 50 U</string>
|
<string name="omnipod_reservoir_over50">Over 50 U</string>
|
||||||
<string name="omnipod_pod_address">Pod Address</string>
|
<string name="omnipod_pod_address">Pod Address</string>
|
||||||
|
|
Loading…
Reference in a new issue