diff --git a/Corona-Warn-App/src/androidTest/java/de/rki/coronawarnapp/ui/submission/SubmissionSymptomIntroFragmentTest.kt b/Corona-Warn-App/src/androidTest/java/de/rki/coronawarnapp/ui/submission/SubmissionSymptomIntroFragmentTest.kt index c106e546bcb67d6bdcf1fe379821713ca8325a63..abd98246044e9e3edcd05b2a18e0e54bfe6ce391 100644 --- a/Corona-Warn-App/src/androidTest/java/de/rki/coronawarnapp/ui/submission/SubmissionSymptomIntroFragmentTest.kt +++ b/Corona-Warn-App/src/androidTest/java/de/rki/coronawarnapp/ui/submission/SubmissionSymptomIntroFragmentTest.kt @@ -76,9 +76,7 @@ class SubmissionSymptomIntroFragmentTest : BaseUITest() { fun testSymptomNextClicked() { val scenario = launchFragmentInContainer<SubmissionSymptomIntroductionFragment>() onView(withId(R.id.symptom_button_next)) - .perform(scrollTo()) .perform(click()) - // TODO verify result } @@ -86,7 +84,7 @@ class SubmissionSymptomIntroFragmentTest : BaseUITest() { @Screenshot fun capture_fragment() { captureScreenshot<SubmissionSymptomIntroductionFragment>() - onView(withId(R.id.symptom_button_next)) + onView(withId(R.id.target_button_verify)) .perform(scrollTo()) Thread.sleep(SCREENSHOT_DELAY_TIME) Screengrab.screenshot(SubmissionSymptomIntroductionFragment::class.simpleName.plus("2")) diff --git a/Corona-Warn-App/src/main/res/layout/fragment_submission_symptom_calendar.xml b/Corona-Warn-App/src/main/res/layout/fragment_submission_symptom_calendar.xml index f58fb7a894afde32bd80313d0c0761e27473838e..d21f46391ab64f4726c77fba18027349ed49fb62 100644 --- a/Corona-Warn-App/src/main/res/layout/fragment_submission_symptom_calendar.xml +++ b/Corona-Warn-App/src/main/res/layout/fragment_submission_symptom_calendar.xml @@ -7,22 +7,31 @@ <import type="de.rki.coronawarnapp.submission.Symptoms.StartOf" /> </data> - <LinearLayout + <androidx.constraintlayout.widget.ConstraintLayout android:layout_width="match_parent" - android:layout_height="wrap_content" - android:orientation="vertical"> + android:layout_height="match_parent" + android:fillViewport="true"> <include android:id="@+id/submission_symptom_calendar_header" layout="@layout/include_header" android:layout_width="match_parent" + app:layout_constraintBottom_toTopOf="@+id/scrollView" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" android:layout_height="wrap_content" app:icon="@{@drawable/ic_close}" app:title="@{@string/submission_symptom_calendar_title}" /> <ScrollView - android:layout_width="match_parent" - android:layout_height="match_parent"> + android:id="@+id/scrollView" + android:layout_width="0dp" + android:layout_height="0dp" + app:layout_constraintBottom_toTopOf="@+id/symptom_button_next" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/submission_symptom_calendar_header"> <LinearLayout android:layout_width="match_parent" @@ -95,16 +104,23 @@ android:enabled="true" android:text="@string/submission_symptom_verify" /> - <Button - android:id="@+id/symptom_button_next" - style="@style/buttonPrimary" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_marginBottom="@dimen/spacing_small" - android:text="@string/submission_done_button_done" /> - </LinearLayout> </ScrollView> - </LinearLayout> + + <Button + android:id="@+id/symptom_button_next" + style="@style/buttonPrimary" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginHorizontal="@dimen/spacing_normal" + android:layout_marginVertical="@dimen/spacing_small" + android:layout_marginBottom="@dimen/spacing_small" + android:text="@string/submission_done_button_done" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/scrollView"/> + + </androidx.constraintlayout.widget.ConstraintLayout> </layout> diff --git a/Corona-Warn-App/src/main/res/layout/fragment_submission_symptom_intro.xml b/Corona-Warn-App/src/main/res/layout/fragment_submission_symptom_intro.xml index fd16d800a5f81b30bc6685e64c605956464bfcee..a2d7596344f3432824a3544d750532496e69b356 100644 --- a/Corona-Warn-App/src/main/res/layout/fragment_submission_symptom_intro.xml +++ b/Corona-Warn-App/src/main/res/layout/fragment_submission_symptom_intro.xml @@ -1,10 +1,12 @@ <?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"> - <LinearLayout + + + <androidx.constraintlayout.widget.ConstraintLayout android:layout_width="match_parent" - android:layout_height="wrap_content" - android:orientation="vertical"> + android:layout_height="match_parent" + android:fillViewport="true"> <include android:id="@+id/submission_symptom_header" @@ -12,11 +14,20 @@ android:layout_width="match_parent" android:layout_height="wrap_content" app:icon="@{@drawable/ic_close}" + app:layout_constraintBottom_toTopOf="@+id/scrollView" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" app:title="@{@string/submission_symptom_title}" /> <ScrollView - android:layout_width="match_parent" - android:layout_height="match_parent"> + android:id="@+id/scrollView" + android:layout_width="0dp" + android:layout_height="0dp" + app:layout_constraintBottom_toTopOf="@+id/symptom_button_next" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/submission_symptom_header"> <LinearLayout android:id="@+id/submission_symptom_container" @@ -81,17 +92,21 @@ android:enabled="true" android:text="@string/submission_symptom_no_information_button" /> - <Button - android:id="@+id/symptom_button_next" - style="@style/buttonPrimary" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_marginTop="@dimen/spacing_small" - android:layout_marginBottom="@dimen/spacing_small" - android:text="@string/submission_symptom_further_button" /> - </LinearLayout> </ScrollView> - </LinearLayout> + + <Button + android:id="@+id/symptom_button_next" + style="@style/buttonPrimary" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginHorizontal="@dimen/spacing_normal" + android:layout_marginVertical="@dimen/spacing_small" + android:text="@string/submission_symptom_further_button" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/scrollView" /> + </androidx.constraintlayout.widget.ConstraintLayout> </layout>