From 9eee83dd54875789d4592b3fa667d57258545cd5 Mon Sep 17 00:00:00 2001
From: BMItter <Berndus@gmx.de>
Date: Thu, 22 Apr 2021 16:37:28 +0200
Subject: [PATCH] Create QR code card - Overlapping views issue
 (EXPOSUREAPP-6544) (#2910)

* fixed overlapping items - trace location card

* androidx.appcompat.widget.AppCompatImageView
---
 .../home_create_trace_location_card.xml       | 28 ++++++++++++-------
 1 file changed, 18 insertions(+), 10 deletions(-)

diff --git a/Corona-Warn-App/src/main/res/layout/home_create_trace_location_card.xml b/Corona-Warn-App/src/main/res/layout/home_create_trace_location_card.xml
index e63bb3580..ff2b328fa 100644
--- a/Corona-Warn-App/src/main/res/layout/home_create_trace_location_card.xml
+++ b/Corona-Warn-App/src/main/res/layout/home_create_trace_location_card.xml
@@ -1,12 +1,10 @@
 <?xml version="1.0" encoding="utf-8"?>
-<androidx.constraintlayout.widget.ConstraintLayout
-    xmlns:android="http://schemas.android.com/apk/res/android"
+<androidx.constraintlayout.widget.ConstraintLayout 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="wrap_content"
-    android:padding="@dimen/spacing_normal"
-    tools:showIn="@layout/home_card_container_layout">
+    android:padding="@dimen/spacing_normal">
 
     <TextView
         android:id="@+id/create_trace_location_card_headline"
@@ -30,26 +28,36 @@
         android:text="@string/create_trace_location_card_subtitle"
         app:layout_constraintEnd_toStartOf="@id/create_trace_location_card_icon"
         app:layout_constraintStart_toStartOf="@id/create_trace_location_card_headline"
-        app:layout_constraintTop_toBottomOf="@id/create_trace_location_card_headline" />
+        app:layout_constraintTop_toBottomOf="@id/create_trace_location_card_headline"
+        tools:text="@string/create_trace_location_card_subtitle" />
 
-    <ImageView
+    <androidx.appcompat.widget.AppCompatImageView
         android:id="@+id/create_trace_location_card_icon"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        app:srcCompat="@drawable/ic_event_organizer"
         android:importantForAccessibility="no"
+        app:layout_constraintBottom_toTopOf="@+id/create_trace_location_card_button"
         app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintTop_toTopOf="@id/create_trace_location_card_subtitle" />
+        app:layout_constraintTop_toTopOf="@+id/create_trace_location_card_headline"
+        app:srcCompat="@drawable/ic_event_organizer"
+        tools:src="@drawable/ic_event_organizer" />
+
+    <androidx.constraintlayout.widget.Barrier
+        android:id="@+id/button_barrier_event_card"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        app:barrierDirection="bottom"
+        app:constraint_referenced_ids="create_trace_location_card_icon,create_trace_location_card_subtitle" />
 
     <Button
         android:id="@+id/create_trace_location_card_button"
         style="@style/buttonPrimary"
         android:layout_width="0dp"
         android:layout_height="wrap_content"
-        android:layout_marginTop="@dimen/spacing_normal"
+        android:layout_marginTop="@dimen/spacing_small"
         android:text="@string/create_trace_location_card_button"
         app:layout_constraintEnd_toEndOf="parent"
         app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toBottomOf="@id/create_trace_location_card_subtitle" />
+        app:layout_constraintTop_toBottomOf="@id/button_barrier_event_card" />
 
 </androidx.constraintlayout.widget.ConstraintLayout>
-- 
GitLab