From 55fa8ead3ea8de4fb8ee10c79ac06df588e11ee1 Mon Sep 17 00:00:00 2001
From: Oliver Zimmerman <oezimmerman@gmail.com>
Date: Tue, 1 Dec 2020 16:33:24 +0000
Subject: [PATCH] Adjsuted layout to include ScrollView so that content is
 scrollable on smaller screens

---
 ...t_submission_test_result_consent_given.xml | 77 +++++++++++--------
 1 file changed, 47 insertions(+), 30 deletions(-)

diff --git a/Corona-Warn-App/src/main/res/layout/fragment_submission_test_result_consent_given.xml b/Corona-Warn-App/src/main/res/layout/fragment_submission_test_result_consent_given.xml
index 9e9097af2..1ef59dcf8 100644
--- a/Corona-Warn-App/src/main/res/layout/fragment_submission_test_result_consent_given.xml
+++ b/Corona-Warn-App/src/main/res/layout/fragment_submission_test_result_consent_given.xml
@@ -29,40 +29,57 @@
             app:layout_constraintTop_toTopOf="parent"
             app:title="@{@string/submission_test_result_consent_given_heading}" />
 
-        <de.rki.coronawarnapp.ui.view.TestResultSectionView
-            android:id="@+id/submission_test_result_section"
+        <ScrollView
             android:layout_width="@dimen/match_constraint"
-            android:layout_height="wrap_content"
-            android:layout_marginTop="@dimen/spacing_small"
-            android:focusable="true"
-            android:importantForAccessibility="yes"
-            app:layout_constraintEnd_toEndOf="parent"
-            app:layout_constraintStart_toStartOf="parent"
-            app:layout_constraintTop_toBottomOf="@+id/submission_test_result_consent_given_header" />
-
-        <TextView
-            android:id="@+id/submission_test_result_consent_given_subtitle"
-            style="@style/headline6"
-            android:accessibilityHeading="true"
-            android:layout_width="@dimen/match_constraint"
-            android:layout_height="wrap_content"
-            android:layout_marginTop="@dimen/spacing_medium"
-            android:text="@string/submission_test_result_consent_given_subtitle"
+            android:layout_height="@dimen/match_constraint"
             app:layout_constraintEnd_toEndOf="@+id/guideline_end"
             app:layout_constraintStart_toStartOf="@+id/guideline_start"
-            app:layout_constraintTop_toBottomOf="@+id/submission_test_result_section" />
+            android:fillViewport="true"
+            app:layout_constraintTop_toBottomOf="@+id/submission_test_result_consent_given_header"
+            app:layout_constraintBottom_toTopOf="@+id/include_submission_test_result_consent_given_buttons"
+            app:layout_constraintVertical_bias="1.0">
 
-        <TextView
-            android:id="@+id/submission_test_result_consent_given_body"
-            style="@style/body1"
-            android:accessibilityHeading="true"
-            android:layout_width="@dimen/match_constraint"
-            android:layout_height="wrap_content"
-            android:layout_marginTop="@dimen/spacing_medium"
-            android:text="@string/submission_test_result_consent_given_body"
-            app:layout_constraintEnd_toEndOf="@+id/guideline_end"
-            app:layout_constraintStart_toStartOf="@+id/guideline_start"
-            app:layout_constraintTop_toBottomOf="@+id/submission_test_result_consent_given_subtitle" />
+            <androidx.constraintlayout.widget.ConstraintLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:focusable="true">
+
+                <de.rki.coronawarnapp.ui.view.TestResultSectionView
+                    android:id="@+id/submission_test_result_section"
+                    android:layout_width="@dimen/match_constraint"
+                    android:layout_height="wrap_content"
+                    android:layout_marginTop="@dimen/spacing_small"
+                    android:focusable="true"
+                    android:importantForAccessibility="yes"
+                    app:layout_constraintEnd_toEndOf="parent"
+                    app:layout_constraintStart_toStartOf="parent"
+                    app:layout_constraintTop_toTopOf="parent" />
+
+                <TextView
+                    android:id="@+id/submission_test_result_consent_given_subtitle"
+                    style="@style/headline6"
+                    android:layout_width="@dimen/match_constraint"
+                    android:layout_height="wrap_content"
+                    android:layout_marginTop="@dimen/spacing_medium"
+                    android:accessibilityHeading="true"
+                    android:text="@string/submission_test_result_consent_given_subtitle"
+                    app:layout_constraintEnd_toEndOf="parent"
+                    app:layout_constraintStart_toStartOf="parent"
+                    app:layout_constraintTop_toBottomOf="@+id/submission_test_result_section" />
+
+                <TextView
+                    android:id="@+id/submission_test_result_consent_given_body"
+                    style="@style/body1"
+                    android:layout_width="@dimen/match_constraint"
+                    android:layout_height="wrap_content"
+                    android:layout_marginTop="@dimen/spacing_medium"
+                    android:accessibilityHeading="true"
+                    android:text="@string/submission_test_result_consent_given_body"
+                    app:layout_constraintEnd_toEndOf="parent"
+                    app:layout_constraintStart_toStartOf="parent"
+                    app:layout_constraintTop_toBottomOf="@+id/submission_test_result_consent_given_subtitle" />
+            </androidx.constraintlayout.widget.ConstraintLayout>
+        </ScrollView>
 
         <androidx.constraintlayout.widget.Barrier
             android:id="@+id/include_submission_test_result_consent_given_buttons"
-- 
GitLab