Updated Pod Management Layout and cleaned up XML to make layout items match parent elements.

Added a few dynamic text elements for Pod Management interface to strings.xml
This commit is contained in:
TeleRiddler 2020-12-03 22:42:34 +01:00
parent b3f0a0f4bc
commit e02438cc8c
3 changed files with 229 additions and 219 deletions

View file

@ -56,7 +56,8 @@
android:layout_height="wrap_content"
android:layout_weight="1.5"
android:gravity="end"
android:paddingRight="5dp"
android:paddingStart="5dp"
android:paddingEnd="5dp"
android:text="@string/rileylink_status"
android:textSize="14sp" />
@ -76,7 +77,8 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="start"
android:paddingLeft="5dp"
android:paddingStart="5dp"
android:paddingEnd="5dp"
android:text="{fa-bluetooth-b}"
android:textColor="@android:color/white"
android:textSize="14sp" />
@ -103,7 +105,8 @@
android:layout_height="wrap_content"
android:layout_weight="1.5"
android:gravity="end"
android:paddingRight="5dp"
android:paddingStart="5dp"
android:paddingEnd="5dp"
android:text="@string/omnipod_overview_pod_address"
android:textSize="14sp" />
@ -123,7 +126,8 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="start"
android:paddingLeft="5dp"
android:paddingStart="5dp"
android:paddingEnd="5dp"
android:textColor="@android:color/white"
android:textSize="14sp" />
</LinearLayout>
@ -139,7 +143,8 @@
android:layout_height="wrap_content"
android:layout_weight="1.5"
android:gravity="end"
android:paddingRight="5dp"
android:paddingStart="5dp"
android:paddingEnd="5dp"
android:text="@string/omnipod_lot"
android:textSize="14sp" />
@ -159,7 +164,8 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="start"
android:paddingLeft="5dp"
android:paddingStart="5dp"
android:paddingEnd="5dp"
android:textColor="@android:color/white"
android:textSize="14sp" />
</LinearLayout>
@ -175,7 +181,8 @@
android:layout_height="wrap_content"
android:layout_weight="1.5"
android:gravity="end"
android:paddingRight="5dp"
android:paddingStart="5dp"
android:paddingEnd="5dp"
android:text="@string/omnipod_tid"
android:textSize="14sp" />
@ -195,7 +202,8 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="start"
android:paddingLeft="5dp"
android:paddingStart="5dp"
android:paddingEnd="5dp"
android:textColor="@android:color/white"
android:textSize="14sp" />
</LinearLayout>
@ -211,7 +219,8 @@
android:layout_height="wrap_content"
android:layout_weight="1.5"
android:gravity="end"
android:paddingRight="5dp"
android:paddingStart="5dp"
android:paddingEnd="5dp"
android:text="@string/omnipod_overview_firmware_version"
android:textSize="14sp" />
@ -231,7 +240,8 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="start"
android:paddingLeft="5dp"
android:paddingStart="5dp"
android:paddingEnd="5dp"
android:textColor="@android:color/white"
android:textSize="14sp" />
</LinearLayout>
@ -247,7 +257,8 @@
android:layout_height="wrap_content"
android:layout_weight="1.5"
android:gravity="end"
android:paddingRight="5dp"
android:paddingStart="5dp"
android:paddingEnd="5dp"
android:text="@string/omnipod_overview_time_on_pod"
android:textSize="14sp" />
@ -267,7 +278,8 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="start"
android:paddingLeft="5dp"
android:paddingStart="5dp"
android:paddingEnd="5dp"
android:textColor="@android:color/white"
android:textSize="14sp" />
@ -284,7 +296,8 @@
android:layout_height="wrap_content"
android:layout_weight="1.5"
android:gravity="end"
android:paddingRight="5dp"
android:paddingStart="5dp"
android:paddingEnd="5dp"
android:text="@string/omnipod_overview_pod_expiry_date"
android:textSize="14sp" />
@ -304,7 +317,8 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="start"
android:paddingLeft="5dp"
android:paddingStart="5dp"
android:paddingEnd="5dp"
android:textColor="@android:color/white"
android:textSize="14sp" />
@ -321,7 +335,8 @@
android:layout_height="wrap_content"
android:layout_weight="1.5"
android:gravity="end"
android:paddingRight="5dp"
android:paddingStart="5dp"
android:paddingEnd="5dp"
android:text="@string/omnipod_overview_pod_status"
android:textSize="14sp" />
@ -375,7 +390,8 @@
android:layout_height="wrap_content"
android:layout_weight="1.5"
android:gravity="end"
android:paddingRight="5dp"
android:paddingStart="5dp"
android:paddingEnd="5dp"
android:text="@string/omnipod_overview_last_connection"
android:textSize="14sp" />
@ -395,7 +411,8 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="start"
android:paddingLeft="5dp"
android:paddingStart="5dp"
android:paddingEnd="5dp"
android:textColor="@android:color/white"
android:textSize="14sp" />
@ -420,7 +437,8 @@
android:layout_height="wrap_content"
android:layout_weight="1.5"
android:gravity="end"
android:paddingRight="5dp"
android:paddingStart="5dp"
android:paddingEnd="5dp"
android:text="@string/omnipod_overview_last_bolus"
android:textSize="14sp" />
@ -440,7 +458,8 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="start"
android:paddingLeft="5dp"
android:paddingStart="5dp"
android:paddingEnd="5dp"
android:textColor="@android:color/white"
android:textSize="14sp" />
@ -465,7 +484,8 @@
android:layout_height="wrap_content"
android:layout_weight="1.5"
android:gravity="end"
android:paddingRight="5dp"
android:paddingStart="5dp"
android:paddingEnd="5dp"
android:text="@string/omnipod_overview_base_basal_rate"
android:textSize="14sp" />
@ -485,7 +505,8 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="start"
android:paddingLeft="5dp"
android:paddingStart="5dp"
android:paddingEnd="5dp"
android:textColor="@android:color/white"
android:textSize="14sp" />
@ -510,7 +531,8 @@
android:layout_height="wrap_content"
android:layout_weight="1.5"
android:gravity="end"
android:paddingRight="5dp"
android:paddingStart="5dp"
android:paddingEnd="5dp"
android:text="@string/omnipod_overview_temp_basal_rate"
android:textSize="14sp" />
@ -530,7 +552,8 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="start"
android:paddingLeft="5dp"
android:paddingStart="5dp"
android:paddingEnd="5dp"
android:textColor="@android:color/white"
android:textSize="14sp" />
@ -555,7 +578,8 @@
android:layout_height="wrap_content"
android:layout_weight="1.5"
android:gravity="end"
android:paddingRight="5dp"
android:paddingStart="5dp"
android:paddingEnd="5dp"
android:text="@string/omnipod_overview_reservoir"
android:textSize="14sp" />
@ -575,7 +599,8 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="start"
android:paddingLeft="5dp"
android:paddingStart="5dp"
android:paddingEnd="5dp"
android:textColor="@android:color/white"
android:textSize="14sp" />
@ -600,7 +625,8 @@
android:layout_height="wrap_content"
android:layout_weight="1.5"
android:gravity="end"
android:paddingRight="5dp"
android:paddingStart="5dp"
android:paddingEnd="5dp"
android:text="@string/omnipod_overview_total_delivered"
android:textSize="14sp" />
@ -620,7 +646,8 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="start"
android:paddingLeft="5dp"
android:paddingStart="5dp"
android:paddingEnd="5dp"
android:textColor="@android:color/white"
android:textSize="14sp" />
@ -645,7 +672,8 @@
android:layout_height="wrap_content"
android:layout_weight="1.5"
android:gravity="end"
android:paddingRight="5dp"
android:paddingStart="5dp"
android:paddingEnd="5dp"
android:text="@string/omnipod_overview_errors"
android:textSize="14sp" />
@ -665,7 +693,8 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="start"
android:paddingLeft="5dp"
android:paddingStart="5dp"
android:paddingEnd="5dp"
android:textColor="@android:color/white"
android:textSize="14sp" />
@ -690,7 +719,8 @@
android:layout_height="wrap_content"
android:layout_weight="1.5"
android:gravity="end"
android:paddingRight="5dp"
android:paddingStart="5dp"
android:paddingEnd="5dp"
android:text="@string/omnipod_overview_pod_active_alerts"
android:textSize="14sp" />
@ -710,7 +740,8 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="start"
android:paddingLeft="5dp"
android:paddingStart="5dp"
android:paddingEnd="5dp"
android:textColor="@android:color/white"
android:textSize="14sp" />
@ -802,7 +833,7 @@
android:drawableTop="@drawable/icon_omnipod_overview_suspend_delivery"
android:drawablePadding="@dimen/omnipod_icon_button_drawable_padding"
android:text="@string/omnipod_overview_button_suspend_delivery"
android:visibility="gone" />
android:visibility="visible" />
</LinearLayout>

View file

@ -1,15 +1,6 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="info.nightscout.androidaps.plugins.pump.omnipod.ui.PodManagementActivity">
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/omnipod_pod_management"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
@ -54,12 +45,6 @@
android:textSize="8pt" />
</LinearLayout>
<LinearLayout
android:id="@+id/action_buttons_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
@ -68,77 +53,70 @@
android:paddingEnd="15dp"
android:text="@string/omnipod_pod_management_heading_actions" />
<androidx.gridlayout.widget.GridLayout
<LinearLayout
android:id="@+id/action_buttons_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="10dip"
app:columnCount="2">
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingStart="10dp"
android:paddingEnd="10dp">
<info.nightscout.androidaps.utils.ui.SingleClickButton
android:id="@+id/omnipod_pod_management_button_activate_pod"
style="@style/ButtonSmallFontStyle"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
style="?android:attr/buttonStyle"
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:layout_marginEnd="4dp"
android:layout_weight="0.5"
android:drawableTop="@drawable/icon_pod_management_activate_pod"
android:drawablePadding="@dimen/omnipod_icon_button_drawable_padding"
android:text="@string/omnipod_pod_management_button_activate_pod"
android:textAllCaps="false"
android:textAllCaps="false" />
app:layout_column="0"
app:layout_columnWeight="1"
app:layout_gravity="fill"
app:layout_row="0" />
<info.nightscout.androidaps.utils.ui.SingleClickButton
android:id="@+id/omnipod_pod_management_button_deactivate_pod"
style="@style/ButtonSmallFontStyle"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
style="?android:attr/buttonStyle"
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:layout_marginEnd="4dp"
android:layout_weight="0.5"
android:drawableTop="@drawable/icon_pod_management_deactivate_pod"
android:drawablePadding="@dimen/omnipod_icon_button_drawable_padding"
android:text="@string/omnipod_pod_management_button_deactivate_pod"
android:textAllCaps="false"
android:textAllCaps="false" />
</LinearLayout>
app:layout_column="1"
app:layout_columnWeight="1"
app:layout_gravity="fill"
app:layout_row="0" />
<LinearLayout
<info.nightscout.androidaps.utils.ui.SingleClickButton
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingStart="10dp"
android:paddingEnd="10dp">
<Button
android:id="@+id/omnipod_pod_management_button_play_test_beep"
style="@style/ButtonSmallFontStyle"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
style="?android:attr/buttonStyle"
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:layout_marginEnd="4dp"
android:layout_weight="0.5"
android:drawableTop="@drawable/icon_pod_management_play_test_beep"
android:drawablePadding="@dimen/omnipod_icon_button_drawable_padding"
android:text="@string/omnipod_pod_management_button_play_test_beep"
android:textAllCaps="false"
android:textAllCaps="false" />
app:layout_column="0"
app:layout_columnWeight="1"
app:layout_gravity="fill"
app:layout_row="1" />
<info.nightscout.androidaps.utils.ui.SingleClickButton
android:id="@+id/omnipod_pod_management_button_discard_pod"
style="@style/ButtonSmallFontStyle"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
style="?android:attr/buttonStyle"
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:layout_marginEnd="4dp"
android:layout_weight="0.5"
android:drawableTop="@drawable/icon_pod_management_discard_pod"
android:drawablePadding="@dimen/omnipod_icon_button_drawable_padding"
android:text="@string/omnipod_pod_management_button_discard_pod"
android:textAllCaps="false"
android:textAllCaps="false" />
app:layout_column="1"
app:layout_columnWeight="1"
app:layout_gravity="fill"
app:layout_row="1" />
</androidx.gridlayout.widget.GridLayout>
</LinearLayout>
<TextView
android:layout_width="match_parent"
@ -148,67 +126,67 @@
android:paddingEnd="15dp"
android:text="@string/omnipod_pod_management_heading_tools" />
<androidx.gridlayout.widget.GridLayout
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="10dip"
app:columnCount="2">
android:orientation="horizontal"
android:paddingStart="10dp"
android:paddingEnd="10dp">
<info.nightscout.androidaps.utils.ui.SingleClickButton
android:id="@+id/omnipod_pod_management_button_pod_history"
style="@style/ButtonSmallFontStyle"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
style="?android:attr/buttonStyle"
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:layout_marginEnd="4dp"
android:layout_weight="0.5"
android:drawableTop="@drawable/icon_pod_management_pod_history"
android:drawablePadding="@dimen/omnipod_icon_button_drawable_padding"
android:text="@string/omnipod_pod_management_button_pod_history"
android:textAllCaps="false"
app:layout_column="0"
app:layout_columnWeight="1"
app:layout_gravity="fill"
app:layout_row="2" />
android:textAllCaps="false" />
<info.nightscout.androidaps.utils.ui.SingleClickButton
android:id="@+id/omnipod_pod_management_button_rileylink_stats"
style="@style/ButtonSmallFontStyle"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:id="@+id/omnipod"
style="?android:attr/buttonStyle"
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:layout_marginEnd="4dp"
android:layout_weight="0.5"
android:drawableTop="@drawable/icon_pod_management_rl_stats"
android:drawablePadding="@dimen/omnipod_icon_button_drawable_padding"
android:text="@string/omnipod_pod_management_button_riley_link_stats"
android:textAllCaps="false"
android:textAllCaps="false" />
app:layout_column="1"
app:layout_columnWeight="1"
app:layout_gravity="fill"
app:layout_row="2" />
</LinearLayout>
<info.nightscout.androidaps.utils.ui.SingleClickButton
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingStart="10dp"
android:paddingEnd="10dp">
<Button
android:id="@+id/omnipod_pod_management_button_pulse_log"
style="@style/ButtonSmallFontStyle"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
style="?android:attr/buttonStyle"
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:layout_marginEnd="4dp"
android:layout_weight="0.5"
android:drawableTop="@drawable/icon_pod_management_pulse_log"
android:drawablePadding="@dimen/omnipod_icon_button_drawable_padding"
android:text="@string/omnipod_pod_management_button_read_pulse_log"
android:textAllCaps="false"
android:visibility="gone"
android:visibility="gone" />
app:layout_column="0"
app:layout_columnWeight="1"
app:layout_gravity="fill"
app:layout_row="3" />
</androidx.gridlayout.widget.GridLayout>
<info.nightscout.androidaps.utils.ui.SingleClickButton
android:id="@+id/omnipod_pod_management_button_reset_rileylink_config"
style="?android:attr/buttonStyle"
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:layout_marginEnd="4dp"
android:layout_weight="0.5"
android:drawableTop="@drawable/icon_pod_activity_reset_rileylink_config"
android:text="@string/omnipod_pod_management_button_reset_riley_link_config"
android:textAllCaps="false" />
</LinearLayout>
</LinearLayout>
</ScrollView>
</FrameLayout>
</LinearLayout>

View file

@ -185,6 +185,7 @@
<string name="omnipod_pod_management_button_discard_pod">Discard Pod</string>
<string name="omnipod_pod_management_button_pod_history">Pod history</string>
<string name="omnipod_pod_management_button_riley_link_stats">RileyLink stats</string>
<string name="omnipod_pod_management_button_reset_riley_link_config">Reest RileyLink Config</string>
<string name="omnipod_pod_management_button_read_pulse_log">Read pulse log</string>
<string name="omnipod_pod_management_button_reading_pulse_log">Reading pulse log…</string>
<string name="omnipod_pod_management_discard_pod_confirmation">If you discard the Pod, you will not be able to communicate with it anymore. You should only do this when all communication with the Pod persistently fails. If you can still communicate with the Pod, please use the <b>Deactivate Pod</b> option.\n\nIf you wish to proceed, please make sure to remove the Pod from your body!</string>