AndroidAPS/app/src/main/res/layout/activity_profilehelper.xml
2022-03-21 19:23:37 +01:00

272 lines
11 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:orientation="vertical"
tools:context=".activities.ProfileHelperActivity">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/defaultbackground"
android:orientation="horizontal"
android:paddingBottom="10dp">
<TextView
android:id="@+id/menu1"
android:layout_width="0dp"
android:layout_height="30dp"
android:layout_weight="1"
android:gravity="center"
android:paddingLeft="5dp"
android:paddingRight="5dp"
android:text="1"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/menu2"
android:layout_width="0dp"
android:layout_height="30dp"
android:layout_weight="1"
android:gravity="center"
android:paddingLeft="5dp"
android:paddingRight="5dp"
android:text="2"
tools:ignore="HardcodedText" />
</LinearLayout>
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/profile_type_title"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:hint="@string/profiletype"
android:textColorHint="?attr/tabBgColorSelected"
app:boxStrokeColor="?attr/tabBgColorSelected">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/profile_type"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clickable="true"
android:cursorVisible="false"
android:focusable="false"
android:focusableInTouchMode="false"
android:importantForAutofill="no" />
</com.google.android.material.textfield.TextInputLayout>
<LinearLayout
android:id="@+id/default_profile"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TableLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TableRow
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_vertical">
<TextView
android:id="@+id/age_label"
android:layout_width="150dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_marginTop="4dp"
android:text="@string/age"
android:textAppearance="@style/TextAppearance.AppCompat.Medium" />
<info.nightscout.androidaps.utils.ui.NumberPicker
android:id="@+id/age"
android:layout_width="130dp"
android:layout_height="40dp"
android:layout_marginTop="4dp"
android:layout_marginBottom="2dp"
app:customContentDescription="@string/age" />
</TableRow>
<TableRow
android:id="@+id/tdd_row"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_vertical">
<TextView
android:id="@+id/tdd_label"
android:layout_width="150dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_marginTop="1dp"
android:text="@string/tdd_total"
android:textAppearance="@style/TextAppearance.AppCompat.Medium" />
<info.nightscout.androidaps.utils.ui.NumberPicker
android:id="@+id/tdd"
android:layout_width="130dp"
android:layout_height="40dp"
android:layout_marginTop="1dp"
android:layout_marginBottom="2dp"
app:customContentDescription="@string/tdd_total" />
</TableRow>
<TableRow
android:id="@+id/weight_row"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_vertical">
<TextView
android:id="@+id/weight_label"
android:layout_width="150dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:text="@string/weight_label"
android:textAppearance="@style/TextAppearance.AppCompat.Medium" />
<info.nightscout.androidaps.utils.ui.NumberPicker
android:id="@+id/weight"
android:layout_width="130dp"
android:layout_height="40dp"
android:layout_marginBottom="2dp"
app:customContentDescription="@string/weight_label" />
</TableRow>
<TableRow
android:id="@+id/basal_pct_from_tdd_row"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_vertical">
<TextView
android:id="@+id/basal_pct_from_tdd_label"
android:layout_width="150dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:text="@string/basalpctfromtdd_label"
android:textAppearance="@style/TextAppearance.AppCompat.Medium" />
<info.nightscout.androidaps.utils.ui.NumberPicker
android:id="@+id/basal_pct_from_tdd"
android:layout_width="130dp"
android:layout_height="40dp"
app:customContentDescription="@string/basalpctfromtdd_label" />
</TableRow>
</TableLayout>
<LinearLayout
android:id="@+id/tdds"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:orientation="vertical" />
<info.nightscout.androidaps.utils.ui.SingleClickButton
android:id="@+id/copy_to_local_profile"
style="?android:attr/buttonStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableStart="@drawable/ic_clone_48"
android:text="@string/clone_label" />
</LinearLayout>
<LinearLayout
android:id="@+id/current_profile"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/current_profile_text"
android:layout_width="150dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:textAppearance="@style/TextAppearance.AppCompat.Medium" />
</LinearLayout>
<LinearLayout
android:id="@+id/available_profile"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<com.google.android.material.textfield.TextInputLayout
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/selected_profile"
app:boxStrokeColor="?attr/boxStrokeColor">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/available_profile_list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:clickable="true"
android:cursorVisible="false"
android:focusable="false"
android:focusableInTouchMode="false"
android:importantForAutofill="no" />
</com.google.android.material.textfield.TextInputLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/profile_switch"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<com.google.android.material.textfield.TextInputLayout
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/careportal_profileswitch"
app:boxStrokeColor="?attr/boxStrokeColor">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/profileswitch_list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:clickable="true"
android:cursorVisible="false"
android:focusable="false"
android:focusableInTouchMode="false"
android:importantForAutofill="no" />
</com.google.android.material.textfield.TextInputLayout>
</LinearLayout>
<info.nightscout.androidaps.utils.ui.SingleClickButton
android:id="@+id/compare_profiles"
style="?android:attr/buttonStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableStart="@drawable/ic_compare_profiles"
android:text="@string/comapareprofile" />
</LinearLayout>
</ScrollView>