diff --git a/briar-android/src/main/java/org/briarproject/briar/android/mailbox/OfflineFragment.java b/briar-android/src/main/java/org/briarproject/briar/android/mailbox/OfflineFragment.java
index 740b10698..6d871f94b 100644
--- a/briar-android/src/main/java/org/briarproject/briar/android/mailbox/OfflineFragment.java
+++ b/briar-android/src/main/java/org/briarproject/briar/android/mailbox/OfflineFragment.java
@@ -16,13 +16,12 @@ import org.briarproject.nullsafety.ParametersNotNullByDefault;
import javax.inject.Inject;
import androidx.annotation.Nullable;
-import androidx.core.widget.NestedScrollView;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentActivity;
import androidx.lifecycle.ViewModelProvider;
-import static android.view.View.FOCUS_DOWN;
import static org.briarproject.briar.android.AppModule.getAndroidComponent;
+import static org.briarproject.briar.android.util.UiUtils.hideViewOnSmallScreen;
@MethodsNotNullByDefault
@ParametersNotNullByDefault
@@ -35,8 +34,6 @@ public class OfflineFragment extends Fragment {
protected MailboxViewModel viewModel;
- private NestedScrollView scrollView;
-
@Override
public void onAttach(Context context) {
super.onAttach(context);
@@ -54,7 +51,6 @@ public class OfflineFragment extends Fragment {
View v = inflater
.inflate(R.layout.fragment_offline, container, false);
- scrollView = (NestedScrollView) v;
Button checkButton = v.findViewById(R.id.checkButton);
checkButton.setOnClickListener(view -> {
Intent i = new Intent(requireContext(), TransportsActivity.class);
@@ -69,8 +65,7 @@ public class OfflineFragment extends Fragment {
@Override
public void onStart() {
super.onStart();
- // Scroll down in case the screen is small, so the button is visible
- scrollView.post(() -> scrollView.fullScroll(FOCUS_DOWN));
+ hideViewOnSmallScreen(requireView().findViewById(R.id.iconView));
}
protected void onTryAgainClicked() {
diff --git a/briar-android/src/main/res/drawable-v21/button_outline.xml b/briar-android/src/main/res/drawable-v21/button_outline.xml
new file mode 100644
index 000000000..d7a4382c2
--- /dev/null
+++ b/briar-android/src/main/res/drawable-v21/button_outline.xml
@@ -0,0 +1,7 @@
+
+
+
+
diff --git a/briar-android/src/main/res/drawable-v21/button_outline_background.xml b/briar-android/src/main/res/drawable-v21/button_outline_background.xml
new file mode 100644
index 000000000..960d21db4
--- /dev/null
+++ b/briar-android/src/main/res/drawable-v21/button_outline_background.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
diff --git a/briar-android/src/main/res/drawable-v21/button_outline_mask.xml b/briar-android/src/main/res/drawable-v21/button_outline_mask.xml
new file mode 100644
index 000000000..88b29c7a2
--- /dev/null
+++ b/briar-android/src/main/res/drawable-v21/button_outline_mask.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
diff --git a/briar-android/src/main/res/drawable/button_outline.xml b/briar-android/src/main/res/drawable/button_outline.xml
new file mode 100644
index 000000000..795b3fdca
--- /dev/null
+++ b/briar-android/src/main/res/drawable/button_outline.xml
@@ -0,0 +1,16 @@
+
+
+ -
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/briar-android/src/main/res/layout/fragment_hotspot_error.xml b/briar-android/src/main/res/layout/fragment_hotspot_error.xml
index 2bf918c5b..3285cffc1 100644
--- a/briar-android/src/main/res/layout/fragment_hotspot_error.xml
+++ b/briar-android/src/main/res/layout/fragment_hotspot_error.xml
@@ -56,9 +56,7 @@
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toBottomOf="@+id/coordinatorLayout" />
diff --git a/briar-android/src/main/res/layout/fragment_mailbox_error_wizard.xml b/briar-android/src/main/res/layout/fragment_mailbox_error_wizard.xml
index c8e176540..fbd026dd3 100644
--- a/briar-android/src/main/res/layout/fragment_mailbox_error_wizard.xml
+++ b/briar-android/src/main/res/layout/fragment_mailbox_error_wizard.xml
@@ -79,10 +79,11 @@
diff --git a/briar-android/src/main/res/layout/fragment_mailbox_error_wizard_access.xml b/briar-android/src/main/res/layout/fragment_mailbox_error_wizard_access.xml
index e7d3996d6..7ba205246 100644
--- a/briar-android/src/main/res/layout/fragment_mailbox_error_wizard_access.xml
+++ b/briar-android/src/main/res/layout/fragment_mailbox_error_wizard_access.xml
@@ -1,9 +1,9 @@
@@ -75,10 +75,11 @@
@@ -100,10 +101,11 @@
@@ -125,10 +127,11 @@
diff --git a/briar-android/src/main/res/layout/fragment_mailbox_status.xml b/briar-android/src/main/res/layout/fragment_mailbox_status.xml
index 8cd9a0c26..eec40a8ae 100644
--- a/briar-android/src/main/res/layout/fragment_mailbox_status.xml
+++ b/briar-android/src/main/res/layout/fragment_mailbox_status.xml
@@ -32,7 +32,8 @@
android:id="@+id/statusTitleView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_margin="16dp"
+ android:layout_marginHorizontal="16dp"
+ android:layout_marginTop="16dp"
android:gravity="center"
android:textAppearance="@style/TextAppearance.MaterialComponents.Headline6"
app:layout_constrainedWidth="true"
@@ -47,62 +48,65 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginHorizontal="16dp"
- android:layout_marginBottom="16dp"
+ android:layout_marginTop="16dp"
android:gravity="center"
android:textAppearance="@style/TextAppearance.MaterialComponents.Body1"
android:visibility="gone"
app:layout_constrainedWidth="true"
- app:layout_constraintBottom_toTopOf="@+id/checkButton"
+ app:layout_constraintBottom_toTopOf="@+id/statusInfoView"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/statusTitleView"
tools:text="@string/mailbox_status_mailbox_too_old_message"
tools:visibility="visible" />
-
-
+
+