From 09db6f7f8b7e9b35fc24e99d5605fd20275c3bcd Mon Sep 17 00:00:00 2001
From: Torsten Grote <t@grobox.de>
Date: Thu, 3 Feb 2022 17:38:16 -0300
Subject: [PATCH] Constrain onboarding bullets to description above

instead of parent
---
 .../res/layout-land/fragment_onboarding.xml   | 10 ++++-----
 .../main/res/layout/fragment_onboarding.xml   | 21 +++++--------------
 2 files changed, 10 insertions(+), 21 deletions(-)

diff --git a/mailbox-android/src/main/res/layout-land/fragment_onboarding.xml b/mailbox-android/src/main/res/layout-land/fragment_onboarding.xml
index 365e2e40..5faf30bc 100644
--- a/mailbox-android/src/main/res/layout-land/fragment_onboarding.xml
+++ b/mailbox-android/src/main/res/layout-land/fragment_onboarding.xml
@@ -42,7 +42,7 @@
     <TextView
         android:id="@+id/description"
         android:layout_width="0dp"
-        android:layout_height="wrap_content"
+        android:layout_height="0dp"
         android:layout_margin="16dp"
         android:textAppearance="@style/TextAppearance.Material3.BodyLarge"
         app:layout_constraintBottom_toTopOf="@+id/bullet1"
@@ -63,7 +63,7 @@
         app:layout_constraintEnd_toStartOf="@id/bullet2"
         app:layout_constraintHorizontal_chainStyle="packed"
         app:layout_constraintStart_toStartOf="@+id/guideline"
-        app:layout_constraintTop_toTopOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/description"
         app:layout_constraintVertical_bias="1.0"
         app:layout_constraintVertical_chainStyle="packed"
         app:srcCompat="@drawable/ic_circle"
@@ -82,7 +82,7 @@
         app:layout_constraintBottom_toTopOf="@+id/topButton"
         app:layout_constraintEnd_toStartOf="@id/bullet3"
         app:layout_constraintStart_toEndOf="@+id/bullet1"
-        app:layout_constraintTop_toTopOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/description"
         app:layout_constraintVertical_bias="1.0"
         app:layout_constraintVertical_chainStyle="packed"
         app:srcCompat="@drawable/ic_circle"
@@ -101,7 +101,7 @@
         app:layout_constraintBottom_toTopOf="@+id/topButton"
         app:layout_constraintEnd_toStartOf="@id/bullet4"
         app:layout_constraintStart_toEndOf="@+id/bullet2"
-        app:layout_constraintTop_toTopOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/description"
         app:layout_constraintVertical_bias="1.0"
         app:layout_constraintVertical_chainStyle="packed"
         app:srcCompat="@drawable/ic_circle"
@@ -120,7 +120,7 @@
         app:layout_constraintBottom_toTopOf="@+id/topButton"
         app:layout_constraintEnd_toEndOf="parent"
         app:layout_constraintStart_toEndOf="@+id/bullet3"
-        app:layout_constraintTop_toTopOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/description"
         app:layout_constraintVertical_bias="1.0"
         app:layout_constraintVertical_chainStyle="packed"
         app:srcCompat="@drawable/ic_circle"
diff --git a/mailbox-android/src/main/res/layout/fragment_onboarding.xml b/mailbox-android/src/main/res/layout/fragment_onboarding.xml
index af06d824..47da6fef 100644
--- a/mailbox-android/src/main/res/layout/fragment_onboarding.xml
+++ b/mailbox-android/src/main/res/layout/fragment_onboarding.xml
@@ -38,7 +38,6 @@
         android:layout_height="wrap_content"
         android:layout_margin="16dp"
         android:textAppearance="@style/TextAppearance.Material3.BodyLarge"
-        app:layout_constraintBottom_toTopOf="@+id/bullet1"
         app:layout_constraintEnd_toEndOf="parent"
         app:layout_constraintHorizontal_bias="0.0"
         app:layout_constraintStart_toStartOf="parent"
@@ -59,7 +58,7 @@
         app:layout_constraintEnd_toStartOf="@id/bullet2"
         app:layout_constraintHorizontal_chainStyle="packed"
         app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toTopOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/description"
         app:layout_constraintVertical_bias="1.0"
         app:layout_constraintVertical_chainStyle="packed"
         app:srcCompat="@drawable/ic_circle"
@@ -71,16 +70,13 @@
         android:layout_height="16dp"
         android:layout_marginStart="4dp"
         android:layout_marginLeft="4dp"
-        android:layout_marginTop="16dp"
         android:layout_marginEnd="4dp"
         android:layout_marginRight="4dp"
         android:layout_marginBottom="16dp"
         app:layout_constraintBottom_toTopOf="@+id/topButton"
         app:layout_constraintEnd_toStartOf="@id/bullet3"
         app:layout_constraintStart_toEndOf="@+id/bullet1"
-        app:layout_constraintTop_toTopOf="parent"
-        app:layout_constraintVertical_bias="1.0"
-        app:layout_constraintVertical_chainStyle="packed"
+        app:layout_constraintTop_toTopOf="@+id/bullet1"
         app:srcCompat="@drawable/ic_circle"
         app:tint="?attr/colorPrimary" />
 
@@ -90,16 +86,13 @@
         android:layout_height="16dp"
         android:layout_marginStart="4dp"
         android:layout_marginLeft="4dp"
-        android:layout_marginTop="16dp"
         android:layout_marginEnd="4dp"
         android:layout_marginRight="4dp"
         android:layout_marginBottom="16dp"
         app:layout_constraintBottom_toTopOf="@+id/topButton"
         app:layout_constraintEnd_toStartOf="@id/bullet4"
         app:layout_constraintStart_toEndOf="@+id/bullet2"
-        app:layout_constraintTop_toTopOf="parent"
-        app:layout_constraintVertical_bias="1.0"
-        app:layout_constraintVertical_chainStyle="packed"
+        app:layout_constraintTop_toTopOf="@+id/bullet1"
         app:srcCompat="@drawable/ic_circle"
         app:tint="?attr/colorPrimary" />
 
@@ -109,16 +102,13 @@
         android:layout_height="16dp"
         android:layout_marginStart="4dp"
         android:layout_marginLeft="4dp"
-        android:layout_marginTop="16dp"
         android:layout_marginEnd="16dp"
         android:layout_marginRight="16dp"
         android:layout_marginBottom="16dp"
         app:layout_constraintBottom_toTopOf="@+id/topButton"
         app:layout_constraintEnd_toEndOf="parent"
         app:layout_constraintStart_toEndOf="@+id/bullet3"
-        app:layout_constraintTop_toTopOf="parent"
-        app:layout_constraintVertical_bias="1.0"
-        app:layout_constraintVertical_chainStyle="packed"
+        app:layout_constraintTop_toTopOf="@+id/bullet1"
         app:srcCompat="@drawable/ic_circle"
         app:tint="?attr/colorPrimary" />
 
@@ -132,8 +122,7 @@
         app:layout_constraintBottom_toTopOf="@+id/bottomButton"
         app:layout_constraintEnd_toEndOf="parent"
         app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toBottomOf="@+id/bullet1"
-        app:layout_constraintVertical_bias="1.0" />
+        app:layout_constraintTop_toBottomOf="@+id/bullet1" />
 
     <com.google.android.material.button.MaterialButton
         android:id="@+id/bottomButton"
-- 
GitLab