Skip to content
Snippets Groups Projects
Unverified Commit 6b87a761 authored by Fabian-K's avatar Fabian-K Committed by GitHub
Browse files

replace include_test_result_step.xml with custom view SimpleStepEntry (#123)

parent 38d5fffe
No related branches found
No related tags found
No related merge requests found
......@@ -10,31 +10,29 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<include
<de.rki.coronawarnapp.ui.view.SimpleStepEntry
android:id="@+id/test_result_invalid_steps_added"
layout="@layout/include_test_result_step"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:bodyText="@{@string/submission_test_result_steps_added_body}"
app:finalStep="@{false}"
app:headingText="@{@string/submission_test_result_steps_added_heading}"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:stepStatus="@{@drawable/ic_test_result_step_done}" />
app:simple_step_entry_text="@string/submission_test_result_steps_added_body"
app:simple_step_entry_title="@string/submission_test_result_steps_added_heading"
app:step_entry_final="false"
app:step_entry_icon="@drawable/ic_test_result_step_done" />
<include
<de.rki.coronawarnapp.ui.view.SimpleStepEntry
android:id="@+id/test_result_invalid_steps_invalid_result"
layout="@layout/include_test_result_step"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:bodyText="@{@string/submission_test_result_invalid_steps_invalid_body}"
app:finalStep="@{true}"
app:headingText="@{@string/submission_test_result_invalid_steps_invalid_heading}"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/test_result_invalid_steps_added"
app:stepStatus="@{@drawable/ic_test_result_step_invalid}" />
app:simple_step_entry_text="@string/submission_test_result_invalid_steps_invalid_body"
app:simple_step_entry_title="@string/submission_test_result_invalid_steps_invalid_heading"
app:step_entry_final="true"
app:step_entry_icon="@drawable/ic_test_result_step_invalid" />
</androidx.constraintlayout.widget.ConstraintLayout>
......
......@@ -10,31 +10,31 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<include
<de.rki.coronawarnapp.ui.view.SimpleStepEntry
android:id="@+id/test_result_negative_steps_added"
layout="@layout/include_test_result_step"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:bodyText="@{@string/submission_test_result_steps_added_body}"
app:finalStep="@{false}"
app:headingText="@{@string/submission_test_result_steps_added_heading}"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:stepStatus="@{@drawable/ic_test_result_step_done}" />
app:simple_step_entry_text="@string/submission_test_result_steps_added_body"
app:simple_step_entry_title="@string/submission_test_result_steps_added_heading"
app:step_entry_final="false"
app:step_entry_icon="@drawable/ic_test_result_step_done" />
<include
<de.rki.coronawarnapp.ui.view.SimpleStepEntry
android:id="@+id/test_result_negative_steps_negative_result"
layout="@layout/include_test_result_step"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:bodyText="@{@string/submission_test_result_negative_steps_negative_body}"
app:finalStep="@{true}"
app:headingText="@{@string/submission_test_result_negative_steps_negative_heading}"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/test_result_negative_steps_added"
app:stepStatus="@{@drawable/ic_test_result_step_done}" />
app:simple_step_entry_text="@string/submission_test_result_negative_steps_negative_body"
app:simple_step_entry_title="@string/submission_test_result_negative_steps_negative_heading"
app:step_entry_final="true"
app:step_entry_icon="@drawable/ic_test_result_step_done" />
</androidx.constraintlayout.widget.ConstraintLayout>
......
......@@ -10,31 +10,29 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<include
<de.rki.coronawarnapp.ui.view.SimpleStepEntry
android:id="@+id/test_result_pending_steps_added"
layout="@layout/include_test_result_step"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:bodyText="@{@string/submission_test_result_steps_added_body}"
app:finalStep="@{false}"
app:headingText="@{@string/submission_test_result_steps_added_heading}"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:stepStatus="@{@drawable/ic_test_result_step_done}" />
app:simple_step_entry_text="@string/submission_test_result_steps_added_body"
app:simple_step_entry_title="@string/submission_test_result_steps_added_heading"
app:step_entry_final="false"
app:step_entry_icon="@drawable/ic_test_result_step_done" />
<include
<de.rki.coronawarnapp.ui.view.SimpleStepEntry
android:id="@+id/test_result_pending_steps_waiting_result"
layout="@layout/include_test_result_step"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:bodyText="@{@string/submission_test_result_pending_steps_waiting_body}"
app:finalStep="@{true}"
app:headingText="@{@string/submission_test_result_pending_steps_waiting_heading}"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/test_result_pending_steps_added"
app:stepStatus="@{@drawable/ic_test_result_step_waiting}" />
app:simple_step_entry_text="@string/submission_test_result_pending_steps_waiting_body"
app:simple_step_entry_title="@string/submission_test_result_pending_steps_waiting_heading"
app:step_entry_final="true"
app:step_entry_icon="@drawable/ic_test_result_step_waiting" />
</androidx.constraintlayout.widget.ConstraintLayout>
......
......@@ -10,44 +10,41 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<include
<de.rki.coronawarnapp.ui.view.SimpleStepEntry
android:id="@+id/test_result_positive_steps_added"
layout="@layout/include_test_result_step"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:bodyText="@{@string/submission_test_result_steps_added_body}"
app:finalStep="@{false}"
app:headingText="@{@string/submission_test_result_steps_added_heading}"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:stepStatus="@{@drawable/ic_test_result_step_done}" />
app:simple_step_entry_text="@string/submission_test_result_steps_added_body"
app:simple_step_entry_title="@string/submission_test_result_steps_added_heading"
app:step_entry_final="false"
app:step_entry_icon="@drawable/ic_test_result_step_done" />
<include
<de.rki.coronawarnapp.ui.view.SimpleStepEntry
android:id="@+id/test_result_positive_steps_positive_result"
layout="@layout/include_test_result_step"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:bodyText="@{@string/submission_test_result_positive_steps_positive_body}"
app:finalStep="@{false}"
app:headingText="@{@string/submission_test_result_positive_steps_positive_heading}"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/test_result_positive_steps_added"
app:stepStatus="@{@drawable/ic_test_result_step_done}" />
app:simple_step_entry_text="@string/submission_test_result_positive_steps_positive_body"
app:simple_step_entry_title="@string/submission_test_result_positive_steps_positive_heading"
app:step_entry_final="false"
app:step_entry_icon="@drawable/ic_test_result_step_done" />
<include
<de.rki.coronawarnapp.ui.view.SimpleStepEntry
android:id="@+id/test_result_positive_steps_warning_others"
layout="@layout/include_test_result_step"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:bodyText="@{@string/submission_test_result_positive_steps_warning_others_body}"
app:finalStep="@{true}"
app:headingText="@{@string/submission_test_result_positive_steps_warning_others_heading}"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/test_result_positive_steps_positive_result"
app:stepStatus="@{@drawable/ic_test_result_step_warning}" />
app:simple_step_entry_text="@string/submission_test_result_positive_steps_warning_others_body"
app:simple_step_entry_title="@string/submission_test_result_positive_steps_warning_others_heading"
app:step_entry_final="true"
app:step_entry_icon="@drawable/ic_test_result_step_warning" />
</androidx.constraintlayout.widget.ConstraintLayout>
......
<?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">
<data>
<import type="de.rki.coronawarnapp.util.formatter.FormatterHelper" />
<variable
name="stepStatus"
type="android.graphics.drawable.Drawable" />
<variable
name="headingText"
type="String" />
<variable
name="bodyText"
type="String" />
<variable
name="finalStep"
type="Boolean" />
</data>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/test_result_step_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@{stepStatus}"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/test_result_step_headline"
style="@style/textTitle"
android:layout_width="@dimen/test_result_step_text_width"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/spacing_small"
android:text="@{headingText}"
app:layout_constraintStart_toEndOf="@+id/test_result_step_icon"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/test_result_step_body"
android:layout_width="@dimen/test_result_step_text_width"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/spacing_small"
android:text="@{bodyText}"
app:layout_constraintStart_toStartOf="@+id/test_result_step_headline"
app:layout_constraintTop_toBottomOf="@+id/test_result_step_headline" />
<View
android:id="@+id/test_result_step_placeholder"
android:layout_width="@dimen/match_constraint"
android:layout_height="@dimen/spacing_large"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@+id/test_result_step_icon"
app:layout_constraintTop_toBottomOf="@id/test_result_step_body" />
<View
android:layout_width="@dimen/test_result_step_progress_line_width"
android:layout_height="@dimen/match_constraint"
android:background="@color/colorGreyLight"
android:visibility="@{FormatterHelper.formatVisibility(!finalStep)}"
app:layout_constraintBottom_toBottomOf="@+id/test_result_step_placeholder"
app:layout_constraintEnd_toEndOf="@+id/test_result_step_icon"
app:layout_constraintStart_toStartOf="@+id/test_result_step_icon"
app:layout_constraintTop_toBottomOf="@id/test_result_step_icon" />
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment