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

188 lines
7 KiB
XML
Raw Normal View History

2019-12-20 14:52:10 +01:00
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
2020-10-19 19:24:33 +02:00
xmlns:app="http://schemas.android.com/apk/res-auto"
2019-12-20 14:52:10 +01:00
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.InsulinDialog">
2019-12-20 14:52:10 +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 14:52:10 +01:00
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:background="?attr/dialogTitleBackground"
2019-12-20 14:52:10 +01:00
android:orientation="horizontal"
2019-12-20 18:55:54 +01:00
android:padding="5dp">
2019-12-20 14:52:10 +01:00
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:importantForAccessibility="no"
2020-10-19 19:24:33 +02:00
app:srcCompat="@drawable/ic_bolus" />
2019-12-20 14:52:10 +01:00
<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 14:52:10 +01:00
android:layout_gravity="center"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:text="@string/overview_insulin_label"
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 14:52:10 +01:00
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
2021-01-21 20:31:20 +01:00
android:orientation="vertical"
android:padding="5dp">
2019-12-20 14:52:10 +01:00
<CheckBox
2021-01-21 20:31:20 +01:00
android:id="@+id/start_eating_soon_tt"
2019-12-20 14:52:10 +01:00
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginTop="5dp"
android:text="@string/start_eating_soon_tt" />
<CheckBox
2021-01-21 20:31:20 +01:00
android:id="@+id/record_only"
2019-12-20 14:52:10 +01:00
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="@string/do_not_bolus_record_only" />
</LinearLayout>
<LinearLayout
2021-01-21 20:31:20 +01:00
android:id="@+id/time_layout"
2019-12-20 14:52:10 +01:00
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:id="@+id/time_label"
2019-12-20 14:52:10 +01:00
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:width="120dp"
android:padding="10dp"
2022-01-27 22:06:14 +01:00
android:text="@string/time_offset"
2020-10-19 19:24:33 +02:00
android:textAppearance="@style/TextAppearance.AppCompat.Small"
2019-12-20 14:52:10 +01:00
android:textStyle="bold" />
2022-01-27 22:06:14 +01:00
<info.nightscout.androidaps.utils.ui.MinutesNumberPicker
2021-01-21 20:31:20 +01:00
android:id="@+id/time"
2019-12-20 14:52:10 +01:00
android:layout_width="130dp"
android:layout_height="40dp"
2022-03-18 14:32:20 +01:00
android:layout_marginBottom="2dp"
app:customContentDescription="@string/time_offset" />
2019-12-20 14:52:10 +01:00
<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:id="@+id/insulin_label"
2019-12-20 14:52:10 +01:00
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_insulin_label"
2020-10-19 19:24:33 +02:00
android:textAppearance="@style/TextAppearance.AppCompat.Small"
2019-12-20 14:52:10 +01:00
android:textStyle="bold" />
2020-07-27 21:11:57 +02:00
<info.nightscout.androidaps.utils.ui.NumberPicker
2021-01-21 20:31:20 +01:00
android:id="@+id/amount"
2019-12-20 14:52:10 +01:00
android:layout_width="130dp"
android:layout_height="40dp"
app:customContentDescription="@string/overview_insulin_label"/>
2019-12-20 14:52:10 +01:00
<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/insulin_unit_shortname"
android:textAppearance="?android:attr/textAppearanceSmall" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
2021-01-21 20:31:20 +01:00
android:orientation="horizontal"
android:padding="5dp">
2019-12-20 14:52:10 +01:00
2022-02-23 19:05:55 +01:00
<com.google.android.material.button.MaterialButton
style="@style/GrayButton"
2021-01-21 20:31:20 +01:00
android:id="@+id/plus05"
2019-12-20 14:52:10 +01:00
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
2022-02-23 19:05:55 +01:00
android:contentDescription="Increment insulin with 0.5"
2019-12-20 14:52:10 +01:00
android:text="+0.5" />
2022-02-23 19:05:55 +01:00
<com.google.android.material.button.MaterialButton
style="@style/GrayButton"
2021-01-21 20:31:20 +01:00
android:id="@+id/plus10"
2019-12-20 14:52:10 +01:00
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="+1.0" />
2022-02-23 19:05:55 +01:00
<com.google.android.material.button.MaterialButton
style="@style/GrayButton"
2021-01-21 20:31:20 +01:00
android:id="@+id/plus20"
2019-12-20 14:52:10 +01:00
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="+2.0" />
</LinearLayout>
2021-01-21 20:31:20 +01:00
<include
android:id="@+id/notes_layout"
layout="@layout/notes" />
2019-12-20 14:52:10 +01:00
2021-01-21 20:31:20 +01:00
<include
android:id="@+id/okcancel"
layout="@layout/okcancel" />
2019-12-20 14:52:10 +01:00
</LinearLayout>
</ScrollView>