From 5439e2d5496c3731ce40e0b50c99e09f5f76bd57 Mon Sep 17 00:00:00 2001 From: mcarare Date: Thu, 19 Sep 2019 11:13:46 +0300 Subject: [PATCH] [fenix] For https://github.com/mozilla-mobile/fenix/issues/5383 Refactored ETP layout to keep appearance for larger font size. Added paddingTop to layout to maintain similar space above title. Added image's bottom colour as background color to fill space below image. Refactored TextViews alignment to chain. Changed guideline to percent instead of dp for wider screens including tablets. --- ...cking_protection_learn_more_preference.xml | 21 ++++++++++++------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/app/src/main/res/layout/tracking_protection_learn_more_preference.xml b/app/src/main/res/layout/tracking_protection_learn_more_preference.xml index 30a5255b9..62a39a7c3 100644 --- a/app/src/main/res/layout/tracking_protection_learn_more_preference.xml +++ b/app/src/main/res/layout/tracking_protection_learn_more_preference.xml @@ -6,7 +6,9 @@ xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginBottom="12dp"> + android:layout_marginBottom="12dp" + android:paddingTop="20dp" + android:background="#FF0250BB"> @@ -39,22 +40,24 @@ android:id="@android:id/summary" android:layout_width="0dp" android:layout_height="wrap_content" + android:paddingTop="12dp" + android:paddingBottom="12dp" android:ellipsize="none" android:scrollHorizontally="false" android:text="@string/preference_enhanced_tracking_protection_explanation" android:textColor="@color/primary_text_dark_theme" android:textSize="12sp" - app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintBottom_toTopOf="@id/learn_more" app:layout_constraintEnd_toStartOf="@id/guideline" app:layout_constraintHorizontal_bias="0.5" app:layout_constraintStart_toStartOf="@android:id/title" - app:layout_constraintTop_toTopOf="parent" /> + app:layout_constraintTop_toBottomOf="@android:id/title" /> + app:layout_constraintTop_toBottomOf="@android:id/summary" + app:layout_constraintBottom_toBottomOf="parent"/> + app:layout_constraintGuide_percent="0.5" />