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

214 lines
7.9 KiB
XML
Raw Normal View History

2019-12-20 13:58:51 +01:00
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
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"
2019-12-20 18:55:54 +01:00
tools:context=".dialogs.CarbsDialog">
2019-12-20 13:58:51 +01:00
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
2019-12-20 18:55:54 +01:00
<RelativeLayout
2019-12-20 13:58:51 +01:00
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
2019-12-21 15:26:41 +01:00
android:background="@color/dialog_title_background"
2019-12-20 13:58:51 +01:00
android:orientation="horizontal"
2019-12-20 18:55:54 +01:00
android:padding="5dp">
2019-12-20 13:58:51 +01:00
2019-12-20 18:55:54 +01:00
<ImageView
2019-12-20 13:58:51 +01:00
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/carbs"
android:src="@drawable/icon_cp_bolus_carbs" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
2019-12-20 18:55:54 +01:00
android:layout_centerInParent="true"
2019-12-20 13:58:51 +01:00
android:layout_gravity="center"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:text="@string/carbs"
android:textAlignment="center"
android:textAppearance="?android:attr/textAppearanceLarge" />
2019-12-20 18:55:54 +01:00
</RelativeLayout>
<LinearLayout
android:id="@+id/spacer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="5dp" />
2019-12-20 13:58:51 +01:00
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
2019-12-20 18:55:54 +01:00
android:orientation="vertical"
android:padding="5dp">
2019-12-20 13:58:51 +01:00
<CheckBox
android:id="@+id/overview_carbs_activity_tt"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginTop="5dp"
android:text="@string/start_activity_tt" />
<CheckBox
android:id="@+id/overview_carbs_eating_soon_tt"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="@string/start_eating_soon_tt" />
<CheckBox
android:id="@+id/overview_carbs_hypo_tt"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="@string/start_hypo_tt" />
</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/time_offset"
android:textAppearance="@android:style/TextAppearance.Material.Small"
android:textStyle="bold" />
<info.nightscout.androidaps.utils.NumberPicker
android:id="@+id/overview_carbs_time"
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_horizontal"
android:width="120dp"
android:padding="10dp"
android:text="@string/careportal_newnstreatment_duration_label"
android:textAppearance="@android:style/TextAppearance.Material.Small"
android:textStyle="bold" />
<info.nightscout.androidaps.utils.NumberPicker
android:id="@+id/overview_carbs_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/shorthour"
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/overview_carbs_label"
android:textAppearance="@android:style/TextAppearance.Material.Small"
android:textStyle="bold" />
<info.nightscout.androidaps.utils.NumberPicker
android:id="@+id/overview_carbs_carbs"
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/shortgramm"
android:textAppearance="?android:attr/textAppearanceSmall" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
2019-12-20 18:55:54 +01:00
android:orientation="horizontal"
android:padding="5dp">
2019-12-20 13:58:51 +01:00
<Button
android:id="@+id/overview_carbs_plus1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="+5" />
<Button
android:id="@+id/overview_carbs_plus2"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="+10" />
<Button
android:id="@+id/overview_carbs_plus3"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="+20" />
</LinearLayout>
<include layout="@layout/notes" />
2020-01-02 00:40:03 +01:00
<include layout="@layout/datetime" />
2019-12-20 13:58:51 +01:00
<include layout="@layout/okcancel" />
</LinearLayout>
</ScrollView>