AndroidAPS/app/src/main/res/layout/dialog_loop.xml
2022-04-19 10:36:10 +02:00

409 lines
18 KiB
XML

<?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"
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"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center">
<ImageView
android:id="@+id/loop_icon"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:importantForAccessibility="no"
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"
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"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/overview_loop_header"
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"
android:textAppearance="?android:attr/textAppearanceLarge" />
<LinearLayout
android:id="@+id/overview_loop_buttons"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:orientation="horizontal">
<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" />
<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" />
</LinearLayout>
<LinearLayout
android:id="@+id/overview_suspend"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
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"
android:text="@string/suspendloop"
android:textAppearance="?android:attr/textAppearanceLarge" />
<info.nightscout.androidaps.utils.ui.SingleClickButton
android:id="@+id/overview_resume"
style="?android:attr/buttonStyle"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_gravity="center"
android:layout_marginEnd="-4dp"
android:layout_weight="0.5"
android:drawableTop="@drawable/ic_loop_resume"
android:paddingStart="10dp"
android:paddingEnd="10dp"
android:text="@string/resumeloop"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:textSize="11sp"
android:visibility="gone" />
<LinearLayout
android:id="@+id/overview_suspend_buttons"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:orientation="horizontal">
<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"
android:drawableTop="@drawable/ic_loop_paused"
android:text="@string/duration1h"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:textSize="11sp" />
<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"
android:drawableTop="@drawable/ic_loop_paused"
android:text="@string/duration2h"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:textSize="11sp" />
<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"
android:drawableTop="@drawable/ic_loop_paused"
android:text="@string/duration3h"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:textSize="11sp" />
<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"
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" />
</LinearLayout>
<LinearLayout
android:id="@+id/overview_pump"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<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"
android:text="@string/disconnectpump"
android:textAppearance="?android:attr/textAppearanceLarge" />
<info.nightscout.androidaps.utils.ui.SingleClickButton
android:id="@+id/overview_reconnect"
style="?android:attr/buttonStyle"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_gravity="center"
android:layout_marginEnd="-4dp"
android:layout_weight="0.5"
android:drawableTop="@drawable/ic_loop_reconnect"
android:paddingStart="10dp"
android:paddingEnd="10dp"
android:text="@string/reconnect"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:textSize="11sp"
android:visibility="gone" />
<LinearLayout
android:id="@+id/overview_disconnect_buttons"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:orientation="horizontal">
<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"
android:drawableTop="@drawable/ic_loop_disconnected"
android:text="@string/duration15m"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:textSize="11sp" />
<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"
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"
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"
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"
android:drawableTop="@drawable/ic_loop_disconnected"
android:text="@string/duration3h"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:textSize="11sp" />
</LinearLayout>
</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" />
<com.google.android.material.button.MaterialButton
android:id="@+id/cancel"
style="@style/OkCancelButton.Text"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_marginEnd="8dp"
android:layout_weight="1"
android:text="@string/cancel"
android:padding="10dp"
android:textAlignment="textEnd" />
</LinearLayout>
</ScrollView>