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

307 lines
12 KiB
XML
Raw Normal View History

2019-08-26 22:40:54 +02:00
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
2016-12-31 20:10:36 +01:00
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
2019-02-28 23:16:50 +01:00
tools:context=".plugins.profile.local.LocalProfileFragment">
2016-12-31 20:10:36 +01:00
2019-08-26 22:40:54 +02:00
<LinearLayout
2016-12-31 20:10:36 +01:00
android:layout_width="match_parent"
2019-08-26 22:40:54 +02:00
android:layout_height="wrap_content"
android:orientation="vertical">
2016-12-31 20:10:36 +01:00
2019-09-16 09:20:23 +02:00
<LinearLayout
2019-08-26 22:40:54 +02:00
android:layout_width="match_parent"
2019-09-16 09:20:23 +02:00
android:layout_height="match_parent"
android:gravity="start"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:text="@string/selected_profile"
android:textAppearance="?android:attr/textAppearanceMedium" />
<Spinner
2019-09-16 15:49:45 +02:00
android:id="@+id/localprofile_spinner"
2019-09-16 09:20:23 +02:00
android:layout_width="0dp"
android:layout_height="wrap_content"
2019-09-16 15:49:45 +02:00
android:layout_gravity="center_vertical"
2019-09-16 09:20:23 +02:00
android:layout_marginStart="10dp"
android:layout_weight="1" />
</LinearLayout>
2019-08-26 22:40:54 +02:00
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
2019-11-28 23:18:42 +01:00
android:layout_marginBottom="10dp"
2019-09-16 09:20:23 +02:00
android:gravity="start"
2019-08-26 22:40:54 +02:00
android:orientation="horizontal">
2019-09-16 09:20:23 +02:00
<TextView
2019-11-28 23:18:42 +01:00
android:id="@+id/localprofile_units"
2019-09-16 09:20:23 +02:00
android:layout_width="wrap_content"
android:layout_height="wrap_content"
2019-11-28 23:18:42 +01:00
android:layout_gravity="center_vertical"
2019-09-16 09:20:23 +02:00
android:layout_marginStart="10dp"
2019-11-28 23:18:42 +01:00
android:text="@string/units_colon"
2019-09-16 09:20:23 +02:00
android:textAppearance="?android:attr/textAppearanceMedium" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
2019-11-28 23:18:42 +01:00
android:layout_gravity="center_vertical"
2019-09-16 09:20:23 +02:00
android:layout_weight="1" />
2019-11-28 23:18:42 +01:00
<ImageView
android:id="@+id/localprofile_profile_add"
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_gravity="center_vertical"
android:layout_marginStart="15dp"
android:contentDescription="@string/addnew"
android:src="@drawable/add" />
2018-01-21 13:37:38 +01:00
2019-11-28 23:18:42 +01:00
<ImageView
android:id="@+id/localprofile_profile_clone"
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_gravity="center_vertical"
android:layout_marginStart="15dp"
android:contentDescription="@string/clone_label"
android:src="@drawable/clone" />
<ImageView
android:id="@+id/localprofile_profile_remove"
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_gravity="center_vertical"
android:layout_marginStart="15dp"
android:contentDescription="@string/remove_label"
android:src="@drawable/remove" />
2016-12-31 20:10:36 +01:00
2019-08-26 22:40:54 +02:00
</LinearLayout>
2016-12-31 20:10:36 +01:00
2019-08-26 22:40:54 +02:00
<LinearLayout
2019-11-28 21:58:07 +01:00
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
2019-11-28 23:41:22 +01:00
android:weightSum="5"
2019-11-28 21:58:07 +01:00
android:paddingBottom="10dp">
<TextView
android:id="@+id/dia_tab"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_weight="1"
android:text="@string/dia_short"
android:textAlignment="center"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textStyle="bold" />
<TextView
android:id="@+id/ic_tab"
2019-11-28 23:41:22 +01:00
android:layout_width="0dp"
2019-11-28 21:58:07 +01:00
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_weight="1"
android:text="@string/ic_short"
android:textAlignment="center"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textStyle="bold" />
<TextView
android:id="@+id/isf_tab"
2019-11-28 23:41:22 +01:00
android:layout_width="0dp"
2019-11-28 21:58:07 +01:00
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_weight="1"
android:text="@string/isf_short"
android:textAlignment="center"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textStyle="bold" />
<TextView
android:id="@+id/basal_tab"
2019-11-28 23:41:22 +01:00
android:layout_width="0dp"
2019-11-28 21:58:07 +01:00
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_weight="1"
android:text="@string/basal_short"
android:textAlignment="center"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textStyle="bold" />
<TextView
android:id="@+id/target_tab"
2019-11-28 23:41:22 +01:00
android:layout_width="0dp"
2019-11-28 21:58:07 +01:00
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_weight="1"
android:text="@string/target_short"
android:textAlignment="center"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:id="@+id/localprofile_dia_placeholder"
2019-08-26 22:40:54 +02:00
android:layout_width="match_parent"
android:layout_height="wrap_content"
2019-11-28 23:18:42 +01:00
android:orientation="vertical">
2016-12-31 20:10:36 +01:00
2019-11-28 23:18:42 +01:00
<LinearLayout
android:layout_width="match_parent"
2016-12-31 20:10:36 +01:00
android:layout_height="wrap_content"
2019-11-28 23:18:42 +01:00
android:layout_marginBottom="10dp"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_marginBottom="10dp"
android:labelFor="@+id/localprofile_name"
android:text="@string/profile_name"
android:textAppearance="?android:attr/textAppearanceMedium" />
<EditText
android:id="@+id/localprofile_name"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_weight="1"
android:ems="10"
android:importantForAutofill="no"
android:inputType="text" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
2019-08-26 22:40:54 +02:00
android:layout_height="wrap_content"
2019-11-28 23:18:42 +01:00
android:gravity="center_horizontal"
android:orientation="horizontal"
android:paddingTop="5dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginEnd="10dp"
android:text="@string/dia"
android:textAppearance="?android:attr/textAppearanceMedium" />
<info.nightscout.androidaps.utils.NumberPicker
android:id="@+id/localprofile_dia"
android:layout_width="130dp"
android:layout_height="40dp"
android:layout_marginEnd="10dp"
android:layout_marginBottom="10dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:text="@string/hours"
android:textAppearance="?android:attr/textAppearanceSmall" />
</LinearLayout>
2019-08-26 22:40:54 +02:00
</LinearLayout>
2016-12-31 20:10:36 +01:00
2019-08-26 22:40:54 +02:00
<LinearLayout
android:id="@+id/localprofile_ic"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="10dp"
android:orientation="vertical" />
2016-12-31 20:10:36 +01:00
2019-08-26 22:40:54 +02:00
<LinearLayout
android:id="@+id/localprofile_isf"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="10dp"
android:orientation="vertical" />
2016-12-31 20:10:36 +01:00
2019-08-26 22:40:54 +02:00
<LinearLayout
android:id="@+id/localprofile_basal"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="10dp"
android:orientation="vertical" />
2016-12-31 20:10:36 +01:00
2019-08-26 22:40:54 +02:00
<LinearLayout
android:id="@+id/localprofile_target"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="10dp"
android:orientation="vertical">
2016-12-31 20:10:36 +01:00
2019-08-26 22:40:54 +02:00
</LinearLayout>
<Button
android:id="@+id/localprofile_profileswitch"
style="?android:attr/buttonStyle"
android:layout_width="wrap_content"
2019-09-16 09:20:23 +02:00
android:layout_height="0dp"
2019-08-26 22:40:54 +02:00
android:layout_gravity="center_horizontal"
android:layout_marginBottom="3dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="3dp"
android:layout_weight="1"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:text="@string/activate_profile"
android:drawableStart="@drawable/icon_local_activate" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:orientation="horizontal">
2016-12-31 20:10:36 +01:00
<Button
2019-08-26 22:40:54 +02:00
android:id="@+id/localprofile_reset"
2016-12-31 20:10:36 +01:00
style="?android:attr/buttonStyle"
2019-08-26 22:40:54 +02:00
android:layout_width="match_parent"
2016-12-31 20:10:36 +01:00
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginLeft="10dp"
android:layout_marginTop="3dp"
2019-08-26 22:40:54 +02:00
android:layout_marginRight="10dp"
android:layout_marginBottom="3dp"
2016-12-31 20:10:36 +01:00
android:layout_weight="1"
2019-08-26 22:40:54 +02:00
android:drawableStart="@drawable/icon_local_reset"
2016-12-31 20:10:36 +01:00
android:paddingLeft="10dp"
android:paddingRight="10dp"
2019-08-26 22:40:54 +02:00
android:text="@string/reset" />
2016-12-31 20:10:36 +01:00
2019-08-26 22:40:54 +02:00
<Button
android:id="@+id/localprofile_save"
style="?android:attr/buttonStyle"
android:layout_width="match_parent"
2018-04-03 14:34:15 +02:00
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
2019-08-26 22:40:54 +02:00
android:layout_marginLeft="10dp"
android:layout_marginTop="3dp"
android:layout_marginRight="10dp"
android:layout_marginBottom="3dp"
android:layout_weight="1"
android:drawableStart="@drawable/icon_local_save"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:text="@string/save" />
2016-12-31 20:10:36 +01:00
</LinearLayout>
2019-08-26 22:40:54 +02:00
</LinearLayout>
</ScrollView>
2016-12-31 20:10:36 +01:00