110 lines
No EOL
4.8 KiB
XML
110 lines
No EOL
4.8 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<layout 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">
|
|
|
|
<data>
|
|
<import type="info.nightscout.androidaps.plugins.pump.eopatch.code.PatchStep" />
|
|
<variable
|
|
name="viewModel"
|
|
type="info.nightscout.androidaps.plugins.pump.eopatch.ui.viewmodel.EopatchViewModel" />
|
|
</data>
|
|
|
|
<androidx.constraintlayout.widget.ConstraintLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:layout_marginStart="30dp"
|
|
android:layout_marginEnd="30dp"
|
|
tools:context=".ui.EopatchActivity">
|
|
|
|
<ImageView
|
|
android:id="@+id/image_patch_remove"
|
|
android:layout_width="16dp"
|
|
android:layout_height="16dp"
|
|
android:layout_marginTop="3dp"
|
|
android:contentDescription="@string/patch_discard_complete_desc"
|
|
app:layout_constraintLeft_toLeftOf="parent"
|
|
app:layout_constraintTop_toTopOf="@+id/text_patch_remove_desc" />
|
|
|
|
<TextView
|
|
android:id="@+id/text_patch_remove_desc"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="5dp"
|
|
android:layout_marginStart="9dp"
|
|
android:text="@string/patch_discard_complete_desc"
|
|
android:textSize="16sp"
|
|
app:layout_constraintLeft_toRightOf="@+id/image_patch_remove"
|
|
app:layout_constraintRight_toRightOf="parent"
|
|
app:layout_constraintTop_toTopOf="parent" />
|
|
|
|
<ImageView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="16dp"
|
|
android:adjustViewBounds="true"
|
|
android:contentDescription="@string/patch_discard_complete_desc"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toBottomOf="@+id/text_patch_remove_desc" />
|
|
|
|
<Button
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:text="@string/confirm"
|
|
android:contentDescription="@string/confirm"
|
|
android:visibility="@{!viewModel.isDiscardedWithNotConn}"
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:onSafeClick="@{() -> viewModel.onConfirm() }"
|
|
tools:visibility="gone" />
|
|
|
|
<androidx.constraintlayout.widget.ConstraintLayout
|
|
android:id="@+id/layout_button"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="16dp"
|
|
android:visibility="@{viewModel.isDiscardedWithNotConn}"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
tools:visibility="visible">
|
|
|
|
<Button
|
|
android:id="@+id/btn_negative"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginEnd="3dp"
|
|
android:text="@string/patch_finish"
|
|
android:contentDescription="@string/patch_finish"
|
|
app:layout_constraintEnd_toStartOf="@id/guideline_button"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toTopOf="parent"
|
|
app:onSafeClick="@{() -> viewModel.onConfirm()}"
|
|
tools:visibility="visible"/>
|
|
|
|
<androidx.constraintlayout.widget.Guideline
|
|
android:id="@+id/guideline_button"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical"
|
|
app:layout_constraintGuide_percent="0.5" />
|
|
|
|
<Button
|
|
android:id="@+id/btn_positive"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginStart="4dp"
|
|
android:text="@string/string_activate_patch"
|
|
android:contentDescription="@string/string_activate_patch"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintStart_toStartOf="@id/guideline_button"
|
|
app:layout_constraintTop_toTopOf="parent"
|
|
app:onSafeClick="@{() -> viewModel.moveStep(PatchStep.WAKE_UP)}" />
|
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
|
|
</layout> |