AndroidAPS/app/src/main/res/layout/dialog_loop.xml

409 lines
18 KiB
XML
Raw Normal View History

2020-12-25 16:47:42 +01:00
<?xml version="1.0" encoding="utf-8"?>
<ScrollView 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"
style="@style/StyleDialog"
2020-12-25 16:47:42 +01:00
android:layout_width="match_parent"
android:layout_height="match_parent"
android:focusableInTouchMode="true"
tools:context=".dialogs.LoopDialog">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<RelativeLayout
style="@style/StyleDialogHeader"
2020-12-25 16:47:42 +01:00
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center">
2020-12-25 16:47:42 +01:00
<ImageView
2020-12-26 17:40:16 +01:00
android:id="@+id/loop_icon"
2020-12-25 16:47:42 +01:00
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:importantForAccessibility="no"
2020-12-25 16:47:42 +01:00
app:srcCompat="@drawable/ic_loop_closed" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_gravity="center"
android:layout_marginStart="10dp"
android:layout_marginEnd="10dp"
2020-12-25 16:47:42 +01:00
android:text="@string/loop"
android:textAlignment="center"
android:textAppearance="?android:attr/textAppearanceLarge" />
</RelativeLayout>
<LinearLayout
android:id="@+id/spacer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="5dp" />
<LinearLayout
android:id="@+id/overview_loop"
2020-12-26 17:40:16 +01:00
android:layout_width="fill_parent"
2020-12-25 16:47:42 +01:00
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
2020-12-26 18:26:46 +01:00
android:id="@+id/overview_loop_header"
2020-12-25 16:47:42 +01:00
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginStart="10dp"
android:layout_marginEnd="10dp"
android:text="@string/loop"
2020-12-25 16:47:42 +01:00
android:textAppearance="?android:attr/textAppearanceLarge" />
<LinearLayout
android:id="@+id/overview_loop_buttons"
2020-12-26 17:40:16 +01:00
android:layout_width="wrap_content"
android:layout_height="wrap_content"
2020-12-26 17:40:16 +01:00
android:layout_gravity="center"
android:orientation="horizontal">
2020-12-26 17:40:16 +01:00
<info.nightscout.androidaps.utils.ui.SingleClickButton
android:id="@+id/overview_closeloop"
style="?android:attr/buttonStyle"
android:layout_width="0dp"
android:layout_height="fill_parent"
android:layout_gravity="center"
android:layout_marginEnd="-4dp"
android:layout_weight="0.5"
android:paddingStart="10dp"
android:paddingEnd="10dp"
android:drawableTop="@drawable/ic_loop_closed"
android:text="@string/closedloop"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:textSize="11sp"
android:visibility="gone" />
2020-12-25 16:47:42 +01:00
<info.nightscout.androidaps.utils.ui.SingleClickButton
android:id="@+id/overview_lgsloop"
style="?android:attr/buttonStyle"
android:layout_width="0dp"
android:layout_height="fill_parent"
android:layout_gravity="center"
android:layout_marginEnd="-4dp"
android:layout_weight="0.5"
android:paddingStart="10dp"
android:paddingEnd="10dp"
android:drawableTop="@drawable/ic_loop_lgs"
android:text="@string/lowglucosesuspend"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:textSize="11sp"
android:visibility="gone" />
<info.nightscout.androidaps.utils.ui.SingleClickButton
android:id="@+id/overview_openloop"
style="?android:attr/buttonStyle"
android:layout_width="0dp"
android:layout_height="fill_parent"
android:layout_gravity="center"
android:layout_marginEnd="-4dp"
android:layout_weight="0.5"
android:paddingStart="10dp"
android:paddingEnd="10dp"
android:drawableTop="@drawable/ic_loop_open"
android:text="@string/openloop"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:textSize="11sp"
android:visibility="gone" />
<info.nightscout.androidaps.utils.ui.SingleClickButton
android:id="@+id/overview_enable"
style="?android:attr/buttonStyle"
android:layout_width="0dp"
android:layout_height="fill_parent"
android:layout_gravity="center"
android:layout_marginEnd="-4dp"
android:layout_weight="0.5"
android:paddingStart="10dp"
android:paddingEnd="10dp"
android:drawableTop="@drawable/ic_loop_resume"
android:text="@string/enableloop"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:textSize="11sp"
android:visibility="gone" />
<info.nightscout.androidaps.utils.ui.SingleClickButton
android:id="@+id/overview_disable"
style="?android:attr/buttonStyle"
android:layout_width="0dp"
android:layout_height="fill_parent"
android:layout_gravity="center"
android:layout_marginEnd="-4dp"
android:layout_weight="0.5"
android:paddingStart="10dp"
android:paddingEnd="10dp"
android:drawableTop="@drawable/ic_loop_disabled"
android:text="@string/disableloop"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:textSize="11sp" />
</LinearLayout>
<View
android:layout_width="fill_parent"
android:layout_height="2dip"
android:layout_marginStart="5dp"
android:layout_marginTop="5dp"
android:layout_marginBottom="5dp"
android:background="?android:attr/dividerHorizontal" />
2020-12-25 16:47:42 +01:00
</LinearLayout>
2020-12-25 16:47:42 +01:00
<LinearLayout
android:id="@+id/overview_suspend"
2020-12-26 17:40:16 +01:00
android:layout_width="fill_parent"
2020-12-25 16:47:42 +01:00
android:layout_height="wrap_content"
2020-12-26 17:40:16 +01:00
android:orientation="vertical">
<TextView
android:id="@+id/overview_suspend_header"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginStart="10dp"
android:layout_marginEnd="10dp"
2020-12-26 17:40:16 +01:00
android:text="@string/suspendloop"
android:textAppearance="?android:attr/textAppearanceLarge" />
2020-12-25 16:47:42 +01:00
<info.nightscout.androidaps.utils.ui.SingleClickButton
2020-12-26 17:40:16 +01:00
android:id="@+id/overview_resume"
2020-12-25 16:47:42 +01:00
style="?android:attr/buttonStyle"
2020-12-26 17:40:16 +01:00
android:layout_width="wrap_content"
2022-04-19 10:36:10 +02:00
android:layout_height="0dp"
2020-12-26 17:40:16 +01:00
android:layout_gravity="center"
2020-12-25 16:47:42 +01:00
android:layout_marginEnd="-4dp"
android:layout_weight="0.5"
2020-12-26 17:40:16 +01:00
android:drawableTop="@drawable/ic_loop_resume"
android:paddingStart="10dp"
android:paddingEnd="10dp"
2020-12-26 17:40:16 +01:00
android:text="@string/resumeloop"
2020-12-25 16:47:42 +01:00
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
2020-12-26 17:40:16 +01:00
android:textSize="11sp"
android:visibility="gone" />
2020-12-25 16:47:42 +01:00
2020-12-26 17:40:16 +01:00
<LinearLayout
android:id="@+id/overview_suspend_buttons"
android:layout_width="wrap_content"
2020-12-26 17:40:16 +01:00
android:layout_height="wrap_content"
android:layout_gravity="center"
2020-12-26 17:40:16 +01:00
android:orientation="horizontal">
2020-12-25 16:47:42 +01:00
2020-12-26 17:40:16 +01:00
<info.nightscout.androidaps.utils.ui.SingleClickButton
android:id="@+id/overview_suspend_1h"
style="?android:attr/buttonStyle"
android:layout_width="0px"
android:layout_height="fill_parent"
android:layout_marginEnd="-4dp"
android:layout_weight="0.5"
android:paddingStart="5dp"
android:paddingEnd="5dp"
2020-12-26 17:40:16 +01:00
android:drawableTop="@drawable/ic_loop_paused"
android:text="@string/duration1h"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:textSize="11sp" />
2020-12-25 16:47:42 +01:00
2020-12-26 17:40:16 +01:00
<info.nightscout.androidaps.utils.ui.SingleClickButton
android:id="@+id/overview_suspend_2h"
style="?android:attr/buttonStyle"
android:layout_width="0px"
android:layout_height="fill_parent"
android:layout_marginEnd="-4dp"
android:layout_weight="0.5"
android:paddingStart="5dp"
android:paddingEnd="5dp"
2020-12-26 17:40:16 +01:00
android:drawableTop="@drawable/ic_loop_paused"
android:text="@string/duration2h"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:textSize="11sp" />
2020-12-25 16:47:42 +01:00
2020-12-26 17:40:16 +01:00
<info.nightscout.androidaps.utils.ui.SingleClickButton
android:id="@+id/overview_suspend_3h"
style="?android:attr/buttonStyle"
android:layout_width="0px"
android:layout_height="fill_parent"
android:layout_marginEnd="-4dp"
android:layout_weight="0.5"
android:paddingStart="5dp"
android:paddingEnd="5dp"
2020-12-26 17:40:16 +01:00
android:drawableTop="@drawable/ic_loop_paused"
android:text="@string/duration3h"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:textSize="11sp" />
2020-12-25 16:47:42 +01:00
2020-12-26 17:40:16 +01:00
<info.nightscout.androidaps.utils.ui.SingleClickButton
android:id="@+id/overview_suspend_10h"
style="?android:attr/buttonStyle"
android:layout_width="0px"
android:layout_height="fill_parent"
android:layout_marginEnd="-4dp"
android:layout_weight="0.5"
android:paddingStart="5dp"
android:paddingEnd="5dp"
2020-12-26 17:40:16 +01:00
android:drawableTop="@drawable/ic_loop_paused"
android:text="@string/duration10h"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:textSize="11sp" />
</LinearLayout>
<View
android:layout_width="fill_parent"
android:layout_height="2dip"
android:layout_marginStart="5dp"
android:layout_marginTop="5dp"
android:layout_marginBottom="5dp"
android:background="?android:attr/dividerHorizontal" />
2020-12-26 17:40:16 +01:00
</LinearLayout>
2020-12-25 16:47:42 +01:00
<LinearLayout
2021-08-17 08:30:10 +02:00
android:id="@+id/overview_pump"
2020-12-26 17:40:16 +01:00
android:layout_width="fill_parent"
2020-12-25 16:47:42 +01:00
android:layout_height="wrap_content"
2020-12-26 17:40:16 +01:00
android:orientation="vertical">
2020-12-25 16:47:42 +01:00
2020-12-26 17:40:16 +01:00
<TextView
android:id="@+id/overview_pump_header"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginStart="10dp"
android:layout_marginEnd="10dp"
2020-12-26 17:40:16 +01:00
android:text="@string/disconnectpump"
android:textAppearance="?android:attr/textAppearanceLarge" />
2020-12-25 16:47:42 +01:00
<info.nightscout.androidaps.utils.ui.SingleClickButton
2020-12-26 17:40:16 +01:00
android:id="@+id/overview_reconnect"
2020-12-25 16:47:42 +01:00
style="?android:attr/buttonStyle"
2020-12-26 17:40:16 +01:00
android:layout_width="wrap_content"
2022-04-19 10:36:10 +02:00
android:layout_height="0dp"
2020-12-26 17:40:16 +01:00
android:layout_gravity="center"
2020-12-25 16:47:42 +01:00
android:layout_marginEnd="-4dp"
android:layout_weight="0.5"
2020-12-26 17:40:16 +01:00
android:drawableTop="@drawable/ic_loop_reconnect"
android:paddingStart="10dp"
android:paddingEnd="10dp"
2020-12-26 17:40:16 +01:00
android:text="@string/reconnect"
2020-12-25 16:47:42 +01:00
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
2020-12-26 17:40:16 +01:00
android:textSize="11sp"
android:visibility="gone" />
2020-12-25 16:47:42 +01:00
2020-12-26 17:40:16 +01:00
<LinearLayout
android:id="@+id/overview_disconnect_buttons"
android:layout_width="wrap_content"
2020-12-26 17:40:16 +01:00
android:layout_height="wrap_content"
android:layout_gravity="center"
2020-12-26 17:40:16 +01:00
android:orientation="horizontal">
2020-12-25 16:47:42 +01:00
2020-12-26 17:40:16 +01:00
<info.nightscout.androidaps.utils.ui.SingleClickButton
android:id="@+id/overview_disconnect_15m"
style="?android:attr/buttonStyle"
android:layout_width="0px"
android:layout_height="fill_parent"
android:layout_marginEnd="-4dp"
android:layout_weight="0.5"
android:paddingStart="5dp"
android:paddingEnd="5dp"
2020-12-26 17:40:16 +01:00
android:drawableTop="@drawable/ic_loop_disconnected"
android:text="@string/duration15m"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:textSize="11sp" />
2020-12-25 16:47:42 +01:00
2020-12-26 17:40:16 +01:00
<info.nightscout.androidaps.utils.ui.SingleClickButton
android:id="@+id/overview_disconnect_30m"
style="?android:attr/buttonStyle"
android:layout_width="0px"
android:layout_height="fill_parent"
android:layout_marginEnd="-4dp"
android:layout_weight="0.5"
android:paddingStart="5dp"
android:paddingEnd="5dp"
2020-12-26 17:40:16 +01:00
android:drawableTop="@drawable/ic_loop_disconnected"
android:text="@string/duration30m"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:textSize="11sp" />
<info.nightscout.androidaps.utils.ui.SingleClickButton
android:id="@+id/overview_disconnect_1h"
style="?android:attr/buttonStyle"
android:layout_width="0px"
android:layout_height="fill_parent"
android:layout_marginEnd="-4dp"
android:layout_weight="0.5"
android:paddingStart="5dp"
android:paddingEnd="5dp"
2020-12-26 17:40:16 +01:00
android:drawableTop="@drawable/ic_loop_disconnected"
android:text="@string/duration1h"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:textSize="11sp" />
<info.nightscout.androidaps.utils.ui.SingleClickButton
android:id="@+id/overview_disconnect_2h"
style="?android:attr/buttonStyle"
android:layout_width="0px"
android:layout_height="fill_parent"
android:layout_marginEnd="-4dp"
android:layout_weight="0.5"
android:paddingStart="5dp"
android:paddingEnd="5dp"
2020-12-26 17:40:16 +01:00
android:drawableTop="@drawable/ic_loop_disconnected"
android:text="@string/duration2h"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:textSize="11sp" />
<info.nightscout.androidaps.utils.ui.SingleClickButton
android:id="@+id/overview_disconnect_3h"
style="?android:attr/buttonStyle"
android:layout_width="0px"
android:layout_height="fill_parent"
android:layout_marginEnd="-4dp"
android:layout_weight="0.5"
android:paddingStart="5dp"
android:paddingEnd="5dp"
2020-12-26 17:40:16 +01:00
android:drawableTop="@drawable/ic_loop_disconnected"
android:text="@string/duration3h"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:textSize="11sp" />
</LinearLayout>
2020-12-25 16:47:42 +01:00
</LinearLayout>
<View
android:layout_width="fill_parent"
android:layout_height="2dip"
android:layout_marginStart="5dp"
android:layout_marginTop="5dp"
android:layout_marginBottom="5dp"
android:background="?android:attr/dividerHorizontal" />
2020-12-25 16:47:42 +01:00
2022-02-23 19:05:55 +01:00
<com.google.android.material.button.MaterialButton
2020-12-26 17:40:16 +01:00
android:id="@+id/cancel"
2022-02-23 23:40:10 +01:00
style="@style/OkCancelButton.Text"
2020-12-26 17:40:16 +01:00
android:layout_width="fill_parent"
2022-04-19 10:36:10 +02:00
android:layout_height="0dp"
2020-12-26 17:40:16 +01:00
android:layout_marginEnd="8dp"
android:layout_weight="1"
2022-02-23 19:05:55 +01:00
android:text="@string/cancel"
2020-12-26 17:40:16 +01:00
android:padding="10dp"
android:textAlignment="textEnd" />
2020-12-25 16:47:42 +01:00
</LinearLayout>
2022-04-19 10:36:10 +02:00
</ScrollView>