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" />
|
|
|
|
|
|
|
|
<ImageView
|
|
|
|
android:id="@+id/localprofile_profile_add"
|
2019-09-16 15:49:45 +02:00
|
|
|
android:layout_width="35dp"
|
|
|
|
android:layout_height="35dp"
|
2019-09-16 09:20:23 +02:00
|
|
|
android:layout_gravity="center_vertical"
|
|
|
|
android:layout_marginStart="15dp"
|
|
|
|
android:src="@drawable/add"
|
|
|
|
android:contentDescription="@string/addnew" />
|
|
|
|
|
|
|
|
<ImageView
|
|
|
|
android:id="@+id/localprofile_profile_remove"
|
2019-09-16 15:49:45 +02:00
|
|
|
android:layout_width="35dp"
|
|
|
|
android:layout_height="35dp"
|
2019-09-16 09:20:23 +02:00
|
|
|
android:layout_gravity="center_vertical"
|
|
|
|
android:layout_marginStart="15dp"
|
|
|
|
android:layout_marginEnd="10dp"
|
|
|
|
android:src="@drawable/remove"
|
|
|
|
android:contentDescription="@string/remove_label"/>
|
|
|
|
|
|
|
|
</LinearLayout>
|
2019-08-26 22:40:54 +02:00
|
|
|
|
|
|
|
<LinearLayout
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="match_parent"
|
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
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_marginStart="10dp"
|
|
|
|
android:layout_marginBottom="10dp"
|
|
|
|
android:text="@string/profile_name"
|
|
|
|
android:labelFor="@+id/localprofile_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:inputType="text"
|
|
|
|
android:importantForAutofill="no" />
|
|
|
|
|
|
|
|
</LinearLayout>
|
|
|
|
|
|
|
|
<LinearLayout
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
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_marginBottom="20dp"
|
2019-11-12 15:19:18 +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"
|
|
|
|
android:layout_weight="1" />
|
|
|
|
|
2019-08-26 22:40:54 +02:00
|
|
|
<RadioButton
|
|
|
|
android:id="@+id/localprofile_mgdl"
|
|
|
|
android:layout_width="wrap_content"
|
2018-01-21 13:37:38 +01:00
|
|
|
android:layout_height="wrap_content"
|
2019-08-26 22:40:54 +02:00
|
|
|
android:text="@string/mgdl" />
|
2018-01-21 13:37:38 +01:00
|
|
|
|
2019-08-26 22:40:54 +02:00
|
|
|
<RadioButton
|
|
|
|
android:id="@+id/localprofile_mmol"
|
|
|
|
android:layout_width="wrap_content"
|
2016-12-31 20:10:36 +01:00
|
|
|
android:layout_height="wrap_content"
|
2019-09-16 09:20:23 +02:00
|
|
|
android:layout_marginEnd="10dp"
|
2019-08-26 22:40:54 +02:00
|
|
|
android:text="@string/mmol" />
|
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"
|
|
|
|
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"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
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"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
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"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
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"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
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 21:58:07 +01:00
|
|
|
android:gravity="center_horizontal"
|
2019-08-26 22:40:54 +02:00
|
|
|
android:orientation="horizontal"
|
2019-09-16 09:20:23 +02:00
|
|
|
android:paddingTop="5dp">
|
2016-12-31 20:10:36 +01:00
|
|
|
|
2019-09-16 09:20:23 +02:00
|
|
|
<TextView
|
2019-08-26 22:40:54 +02:00
|
|
|
android:layout_width="wrap_content"
|
2016-12-31 20:10:36 +01:00
|
|
|
android:layout_height="wrap_content"
|
2019-09-16 09:20:23 +02:00
|
|
|
android:layout_gravity="center_vertical"
|
2019-11-28 21:58:07 +01:00
|
|
|
android:layout_marginEnd="10dp"
|
2019-09-16 09:20:23 +02:00
|
|
|
android:text="@string/dia"
|
|
|
|
android:textAppearance="?android:attr/textAppearanceMedium" />
|
|
|
|
|
2019-08-26 22:40:54 +02:00
|
|
|
<info.nightscout.androidaps.utils.NumberPicker
|
|
|
|
android:id="@+id/localprofile_dia"
|
|
|
|
android:layout_width="130dp"
|
|
|
|
android:layout_height="40dp"
|
2019-09-16 09:20:23 +02:00
|
|
|
android:layout_marginEnd="10dp"
|
|
|
|
android:layout_marginBottom="10dp" />
|
2019-08-26 22:40:54 +02:00
|
|
|
|
2019-09-16 09:20:23 +02:00
|
|
|
<TextView
|
2019-08-26 22:40:54 +02:00
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_gravity="center_vertical"
|
2019-09-16 09:20:23 +02:00
|
|
|
android:text="@string/hours"
|
2019-11-28 21:58:07 +01:00
|
|
|
android:textAppearance="?android:attr/textAppearanceSmall" />
|
2019-08-26 22:40:54 +02:00
|
|
|
|
|
|
|
</LinearLayout>
|
2016-12-31 20:10:36 +01:00
|
|
|
|
2017-10-11 20:19:42 +02: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
|
|
|
|
|
|
|
|