From a390bf1c4f883c6ffcbaf8ff98272be8095b13d8 Mon Sep 17 00:00:00 2001 From: akwizgran Date: Wed, 18 Aug 2021 16:29:37 +0100 Subject: [PATCH] Use consistent layout style for all screens with "hero icons". --- .../briar/android/fragment/FinalFragment.java | 6 +- .../src/main/res/layout/fragment_crash.xml | 37 ++-- .../src/main/res/layout/fragment_error.xml | 85 ++++---- .../fragment_error_contact_exchange.xml | 184 +++++++++--------- .../src/main/res/layout/fragment_final.xml | 30 ++- .../res/layout/fragment_hotspot_intro.xml | 150 +++++++------- .../res/layout/fragment_onboarding_full.xml | 46 ++--- .../layout/fragment_transfer_data_chooser.xml | 24 +-- .../layout/fragment_transfer_data_receive.xml | 23 ++- .../layout/fragment_transfer_data_send.xml | 23 ++- briar-android/src/main/res/values/dimens.xml | 5 + 11 files changed, 310 insertions(+), 303 deletions(-) diff --git a/briar-android/src/main/java/org/briarproject/briar/android/fragment/FinalFragment.java b/briar-android/src/main/java/org/briarproject/briar/android/fragment/FinalFragment.java index 0cb4b4a8a..099e988fe 100644 --- a/briar-android/src/main/java/org/briarproject/briar/android/fragment/FinalFragment.java +++ b/briar-android/src/main/java/org/briarproject/briar/android/fragment/FinalFragment.java @@ -7,7 +7,6 @@ import android.view.View; import android.view.ViewGroup; import android.widget.Button; import android.widget.ImageView; -import android.widget.ScrollView; import android.widget.TextView; import org.briarproject.bramble.api.nullsafety.MethodsNotNullByDefault; @@ -22,6 +21,7 @@ import androidx.annotation.StringRes; import androidx.appcompat.app.ActionBar; import androidx.appcompat.app.AppCompatActivity; import androidx.core.widget.ImageViewCompat; +import androidx.core.widget.NestedScrollView; import androidx.fragment.app.Fragment; import static android.view.View.FOCUS_DOWN; @@ -58,7 +58,7 @@ public class FinalFragment extends Fragment { return f; } - private ScrollView scrollView; + private NestedScrollView scrollView; protected Button buttonView; @Nullable @@ -69,7 +69,7 @@ public class FinalFragment extends Fragment { View v = inflater .inflate(R.layout.fragment_final, container, false); - scrollView = (ScrollView) v; + scrollView = (NestedScrollView) v; ImageView iconView = v.findViewById(R.id.iconView); TextView titleView = v.findViewById(R.id.titleView); TextView textView = v.findViewById(R.id.textView); diff --git a/briar-android/src/main/res/layout/fragment_crash.xml b/briar-android/src/main/res/layout/fragment_crash.xml index cbfdc7ab2..02c136de4 100644 --- a/briar-android/src/main/res/layout/fragment_crash.xml +++ b/briar-android/src/main/res/layout/fragment_crash.xml @@ -5,31 +5,30 @@ android:layout_width="match_parent" android:layout_height="match_parent"> - + android:layout_margin="@dimen/margin_xlarge"> + app:layout_constraintTop_toBottomOf="@+id/errorIcon" /> - +