From f9560e419b1f632178f0c87384e3a16b17ab03ee Mon Sep 17 00:00:00 2001 From: axelherbstreith <75120552+axelherbstreith@users.noreply.github.com> Date: Thu, 20 May 2021 12:58:13 +0200 Subject: [PATCH] Align Margins on Register Test Screen (EXPOSUREAPP-7348) (#3219) * aligned margins between cards * fixed image positioning * fixed image corner radius Co-authored-by: harambasicluka <64483219+harambasicluka@users.noreply.github.com> Co-authored-by: Mohamed Metwalli <mohamed.metwalli@sap.com> --- .../src/main/res/layout/fragment_submission_dispatcher.xml | 2 +- .../src/main/res/layout/include_dispatcher_card.xml | 4 +++- Corona-Warn-App/src/main/res/values/styles.xml | 5 +++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Corona-Warn-App/src/main/res/layout/fragment_submission_dispatcher.xml b/Corona-Warn-App/src/main/res/layout/fragment_submission_dispatcher.xml index b29c9a0cb..971b3a38a 100644 --- a/Corona-Warn-App/src/main/res/layout/fragment_submission_dispatcher.xml +++ b/Corona-Warn-App/src/main/res/layout/fragment_submission_dispatcher.xml @@ -107,7 +107,7 @@ layout="@layout/include_dispatcher_card" android:layout_width="0dp" android:layout_height="wrap_content" - android:layout_marginTop="@dimen/spacing_normal" + android:layout_marginTop="16dp" android:layout_marginBottom="@dimen/spacing_normal" android:clickable="true" android:focusable="true" diff --git a/Corona-Warn-App/src/main/res/layout/include_dispatcher_card.xml b/Corona-Warn-App/src/main/res/layout/include_dispatcher_card.xml index d2a3907c5..6c000385c 100644 --- a/Corona-Warn-App/src/main/res/layout/include_dispatcher_card.xml +++ b/Corona-Warn-App/src/main/res/layout/include_dispatcher_card.xml @@ -73,15 +73,17 @@ app:layout_constraintVertical_bias="0.0" tools:text="@string/submission_dispatcher_qr_card_text" /> - <ImageView + <com.google.android.material.imageview.ShapeableImageView android:id="@+id/dispatcher_card_illustration" android:layout_width="wrap_content" + app:shapeAppearanceOverlay="@style/dispatcherImageStyle" android:layout_height="wrap_content" android:layout_marginTop="@dimen/button_icon_margin" android:src="@{illustration}" android:importantForAccessibility="no" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintVertical_bias="1.0" app:layout_constraintTop_toBottomOf="@+id/dispatcher_card_icon" tools:src="@drawable/ic_submission_illustration_qr_code_card" /> diff --git a/Corona-Warn-App/src/main/res/values/styles.xml b/Corona-Warn-App/src/main/res/values/styles.xml index 9057e165e..f9da4f1b3 100644 --- a/Corona-Warn-App/src/main/res/values/styles.xml +++ b/Corona-Warn-App/src/main/res/values/styles.xml @@ -261,6 +261,11 @@ <item name="android:background">@drawable/grey_card_ripple</item> </style> + <style name="dispatcherImageStyle"> + <item name="cornerFamily">rounded</item> + <item name="cornerSizeBottomRight">@dimen/radius_card</item> + </style> + <style name="BlueCard"> <item name="android:background">@drawable/blue_card_ripple</item> </style> -- GitLab