AndroidAPS/app/src/main/res/layout/dialog_temptarget.xml
2021-01-21 20:41:29 +01:00

220 lines
8.7 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"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:focusableInTouchMode="true"
android:minWidth="300dp"
android:orientation="vertical"
tools:context=".dialogs.TempTargetDialog">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:background="@color/dialog_title_background"
android:orientation="horizontal"
android:padding="5dp">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/careportal_temporarytarget"
app:srcCompat="@drawable/ic_temptarget_high" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_gravity="center"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:text="@string/careportal_temporarytarget"
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:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:width="120dp"
android:padding="10dp"
android:text="@string/target_label"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
android:textStyle="bold" />
<info.nightscout.androidaps.utils.ui.NumberPicker
android:id="@+id/temptarget"
android:layout_width="130dp"
android:layout_height="40dp"
android:layout_gravity="center_vertical" />
<TextView
android:id="@+id/units"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:gravity="start"
android:minWidth="45dp"
android:paddingStart="5dp"
android:paddingEnd="5dp"
android:text="@string/mgdl"
android:textAppearance="?android:attr/textAppearanceSmall" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:width="120dp"
android:padding="10dp"
android:text="@string/careportal_newnstreatment_duration_label"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
android:textStyle="bold" />
<info.nightscout.androidaps.utils.ui.MinutesNumberPicker
android:id="@+id/duration"
android:layout_width="130dp"
android:layout_height="40dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:gravity="start"
android:minWidth="45dp"
android:paddingStart="5dp"
android:paddingEnd="5dp"
android:text="@string/unit_minute_short"
android:textAppearance="?android:attr/textAppearanceSmall" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:width="120dp"
android:padding="10dp"
android:text="@string/reason"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
android:textStyle="bold" />
<Spinner
android:id="@+id/reason"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:paddingLeft="5dp"
android:paddingRight="5dp" />
</LinearLayout>
<include layout="@layout/datetime" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<info.nightscout.androidaps.utils.ui.SingleClickButton
android:id="@+id/target_cancel"
style="?android:attr/buttonStyle"
android:layout_width="0px"
android:layout_height="fill_parent"
android:layout_marginEnd="-4dp"
android:layout_weight="0.5"
android:drawableTop="@drawable/ic_target_cancel"
android:paddingLeft="5dp"
android:paddingRight="5dp"
android:text="@string/cancel"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:textColor="@color/tempTargetConfirmation"
android:textSize="11sp" />
<info.nightscout.androidaps.utils.ui.SingleClickButton
android:id="@+id/eating_soon"
style="?android:attr/buttonStyle"
android:layout_width="0px"
android:layout_height="fill_parent"
android:layout_marginEnd="-4dp"
android:layout_weight="0.5"
android:drawableTop="@drawable/ic_target_eatingsoon"
android:paddingLeft="5dp"
android:paddingRight="5dp"
android:text="@string/eatingsoon"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:textColor="@color/carbs"
android:textSize="11sp" />
<info.nightscout.androidaps.utils.ui.SingleClickButton
android:id="@+id/activity"
style="?android:attr/buttonStyle"
android:layout_width="0px"
android:layout_height="fill_parent"
android:layout_marginEnd="-4dp"
android:layout_weight="0.5"
android:drawableTop="@drawable/ic_target_activity"
android:paddingLeft="5dp"
android:paddingRight="5dp"
android:text="@string/activity"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:textColor="@color/exercise"
android:textSize="11sp" />
<info.nightscout.androidaps.utils.ui.SingleClickButton
android:id="@+id/hypo"
style="?android:attr/buttonStyle"
android:layout_width="0px"
android:layout_height="fill_parent"
android:layout_weight="0.5"
android:drawableTop="@drawable/ic_target_hypo"
android:paddingLeft="5dp"
android:paddingRight="5dp"
android:text="@string/hypo"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:textColor="@color/low"
android:textSize="11sp" />
</LinearLayout>
<include
android:id="@+id/okcancel"
layout="@layout/okcancel" />
</LinearLayout>
</ScrollView>