299 lines
12 KiB
XML
299 lines
12 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.CarbsDialog">
|
|
|
|
<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="?attr/dialogTitleBackground"
|
|
android:orientation="horizontal"
|
|
android:padding="5dp">
|
|
|
|
<ImageView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:importantForAccessibility="no"
|
|
app:srcCompat="@drawable/ic_cp_bolus_carbs" />
|
|
|
|
<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/carbs"
|
|
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="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical"
|
|
android:padding="5dp">
|
|
|
|
<CheckBox
|
|
android:id="@+id/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/eating_soon_tt"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="match_parent"
|
|
android:text="@string/start_eating_soon_tt" />
|
|
|
|
<CheckBox
|
|
android:id="@+id/hypo_tt"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="match_parent"
|
|
android:text="@string/start_hypo_tt" />
|
|
|
|
</LinearLayout>
|
|
|
|
<TableLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:paddingEnd="5dp">
|
|
|
|
<TableRow
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:layout_gravity="center_vertical">
|
|
|
|
<LinearLayout
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:gravity="center_vertical"
|
|
android:layout_weight="1"
|
|
android:orientation="horizontal">
|
|
|
|
<TextView
|
|
android:id="@+id/time_label"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center"
|
|
android:width="120dp"
|
|
android:paddingLeft="10dp"
|
|
android:paddingRight="10dp"
|
|
android:text="@string/time_offset"
|
|
android:gravity="center_vertical"
|
|
android:layout_weight="1"
|
|
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
|
android:textStyle="bold" />
|
|
|
|
<CheckBox
|
|
android:id="@+id/alarmCheckBox"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="40dp"
|
|
android:layout_gravity="center_vertical"
|
|
android:checked="false"
|
|
android:padding="2dp"
|
|
android:layoutDirection="rtl"
|
|
android:contentDescription="@string/a11y_carb_reminder"
|
|
android:drawableEnd="@drawable/ic_access_alarm_24dp" />
|
|
|
|
</LinearLayout>
|
|
|
|
<info.nightscout.androidaps.utils.ui.MinutesNumberPicker
|
|
android:id="@+id/time"
|
|
android:layout_width="130dp"
|
|
android:layout_height="40dp"
|
|
android:layout_marginBottom="2dp"
|
|
app:customContentDescription="@string/time_offset" />
|
|
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center_vertical"
|
|
android:gravity="start"
|
|
android:paddingStart="5dp"
|
|
android:paddingEnd="5dp"
|
|
android:text="@string/unit_minute_short"
|
|
android:textAppearance="?android:attr/textAppearanceSmall" />
|
|
|
|
</TableRow>
|
|
|
|
<TableRow
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:layout_gravity="center_vertical">
|
|
|
|
<TextView
|
|
android:id="@+id/duration_label"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:padding="10dp"
|
|
android:width="120dp"
|
|
android:text="@string/careportal_newnstreatment_duration_label"
|
|
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
|
android:textStyle="bold" />
|
|
|
|
<info.nightscout.androidaps.utils.ui.NumberPicker
|
|
android:id="@+id/duration"
|
|
android:layout_width="130dp"
|
|
android:layout_height="40dp"
|
|
android:layout_gravity="center_horizontal"
|
|
android:layout_marginBottom="2dp"
|
|
app:customContentDescription="@string/careportal_newnstreatment_duration_label" />
|
|
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center_vertical"
|
|
android:gravity="start"
|
|
android:paddingStart="5dp"
|
|
android:paddingEnd="5dp"
|
|
android:text="@string/shorthour"
|
|
android:textAppearance="?android:attr/textAppearanceSmall" />
|
|
|
|
</TableRow>
|
|
|
|
<TableRow
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:layout_gravity="center_vertical">
|
|
|
|
<TextView
|
|
android:id="@+id/carbs_label"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:padding="10dp"
|
|
android:width="120dp"
|
|
android:paddingLeft="10dp"
|
|
android:paddingRight="10dp"
|
|
android:text="@string/treatments_wizard_carbs_label"
|
|
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
|
android:textStyle="bold" />
|
|
|
|
<info.nightscout.androidaps.utils.ui.NumberPicker
|
|
android:id="@+id/carbs"
|
|
android:layout_width="130dp"
|
|
android:layout_height="40dp"
|
|
app:customContentDescription="@string/treatments_wizard_carbs_label" />
|
|
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:gravity="start"
|
|
android:minWidth="45dp"
|
|
android:paddingStart="5dp"
|
|
android:paddingEnd="5dp"
|
|
android:text="@string/shortgramm"
|
|
android:textAppearance="?android:attr/textAppearanceSmall" />
|
|
|
|
</TableRow>
|
|
</TableLayout>
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:orientation="horizontal"
|
|
android:padding="5dp">
|
|
|
|
<com.google.android.material.button.MaterialButton
|
|
style="@style/GrayButton"
|
|
android:id="@+id/plus1"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:layout_weight="1"
|
|
android:text="+5"
|
|
tools:ignore="HardcodedText" />
|
|
|
|
<com.google.android.material.button.MaterialButton
|
|
style="@style/GrayButton"
|
|
android:id="@+id/plus2"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:layout_weight="1"
|
|
android:text="+10"
|
|
tools:ignore="HardcodedText" />
|
|
|
|
<com.google.android.material.button.MaterialButton
|
|
style="@style/GrayButton"
|
|
android:id="@+id/plus3"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:layout_weight="1"
|
|
android:text="+20"
|
|
tools:ignore="HardcodedText" />
|
|
|
|
|
|
</LinearLayout>
|
|
|
|
<LinearLayout
|
|
android:id="@+id/bolusReminder"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:gravity="center_vertical"
|
|
android:visibility="gone"
|
|
android:orientation="horizontal">
|
|
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center"
|
|
android:paddingLeft="10dp"
|
|
android:paddingRight="10dp"
|
|
android:text="@string/bolus_reminder"
|
|
android:gravity="center_vertical"
|
|
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
|
android:textStyle="bold" />
|
|
|
|
<ImageView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center"
|
|
android:src="@drawable/ic_access_alarm_24dp" />
|
|
|
|
<CheckBox
|
|
android:id="@+id/bolusReminderCheckBox"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center_vertical"
|
|
android:checked="false"
|
|
android:padding="2dp" />
|
|
</LinearLayout>
|
|
|
|
<include
|
|
android:id="@+id/notes_layout"
|
|
layout="@layout/notes" />
|
|
|
|
<include
|
|
android:id="@+id/datetime"
|
|
layout="@layout/datetime" />
|
|
|
|
<include
|
|
android:id="@+id/okcancel"
|
|
layout="@layout/okcancel" />
|
|
|
|
</LinearLayout>
|
|
|
|
</ScrollView>
|