mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-09-20 08:45:50 +01:00
Fix edge-to-edge bugs in som payment screens.
This commit is contained in:
committed by
Alex Hart
parent
87978901c8
commit
c4b0f95f72
+7
@@ -3,17 +3,20 @@ package org.thoughtcrime.securesms.payments.backup;
|
||||
import android.app.AlertDialog;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.EditText;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
import androidx.core.view.WindowInsetsCompat;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.navigation.Navigation;
|
||||
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||
|
||||
import org.thoughtcrime.securesms.R;
|
||||
import org.thoughtcrime.securesms.util.SystemWindowInsetsSetter;
|
||||
import org.thoughtcrime.securesms.util.navigation.SafeNavigation;
|
||||
import org.thoughtcrime.securesms.util.text.AfterTextChanged;
|
||||
import org.whispersystems.signalservice.api.payments.PaymentsConstants;
|
||||
@@ -30,6 +33,10 @@ public class PaymentsRecoveryPasteFragment extends Fragment {
|
||||
EditText input = view.findViewById(R.id.payments_recovery_paste_fragment_phrase);
|
||||
View next = view.findViewById(R.id.payments_recovery_paste_fragment_next);
|
||||
|
||||
toolbar.getLayoutParams().height = ViewGroup.LayoutParams.WRAP_CONTENT;
|
||||
SystemWindowInsetsSetter.attach(toolbar, getViewLifecycleOwner(), WindowInsetsCompat.Type.statusBars());
|
||||
SystemWindowInsetsSetter.attach(view, getViewLifecycleOwner(), WindowInsetsCompat.Type.navigationBars() | WindowInsetsCompat.Type.ime());
|
||||
|
||||
toolbar.setNavigationOnClickListener(v -> Navigation.findNavController(v).popBackStack());
|
||||
|
||||
if (savedInstanceState == null) {
|
||||
|
||||
+7
@@ -2,6 +2,7 @@ package org.thoughtcrime.securesms.payments.backup;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.activity.OnBackPressedCallback;
|
||||
@@ -11,6 +12,7 @@ import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
import androidx.biometric.BiometricManager;
|
||||
import androidx.biometric.BiometricPrompt;
|
||||
import androidx.core.view.WindowInsetsCompat;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.navigation.Navigation;
|
||||
|
||||
@@ -22,6 +24,7 @@ import org.thoughtcrime.securesms.BiometricDeviceLockContract;
|
||||
import org.thoughtcrime.securesms.R;
|
||||
import org.thoughtcrime.securesms.keyvalue.SignalStore;
|
||||
import org.signal.core.util.ServiceUtil;
|
||||
import org.thoughtcrime.securesms.util.SystemWindowInsetsSetter;
|
||||
import org.thoughtcrime.securesms.util.navigation.SafeNavigation;
|
||||
import org.thoughtcrime.securesms.util.views.LearnMoreTextView;
|
||||
import org.whispersystems.signalservice.api.payments.PaymentsConstants;
|
||||
@@ -52,6 +55,10 @@ public class PaymentsRecoveryStartFragment extends Fragment {
|
||||
|
||||
finishOnConfirm = args.getFinishOnConfirm();
|
||||
|
||||
toolbar.getLayoutParams().height = ViewGroup.LayoutParams.WRAP_CONTENT;
|
||||
SystemWindowInsetsSetter.attach(toolbar, getViewLifecycleOwner(), WindowInsetsCompat.Type.statusBars());
|
||||
SystemWindowInsetsSetter.attach(view.findViewById(R.id.payments_recovery_start_fragment_scroll_view), getViewLifecycleOwner(), WindowInsetsCompat.Type.navigationBars());
|
||||
|
||||
if (args.getIsRestore()) {
|
||||
title.setText(R.string.PaymentsRecoveryStartFragment__enter_recovery_phrase);
|
||||
message.setText(getString(R.string.PaymentsRecoveryStartFragment__your_recovery_phrase_is_a, PaymentsConstants.MNEMONIC_LENGTH));
|
||||
|
||||
+7
@@ -4,6 +4,7 @@ import android.app.Activity;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.EditText;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
@@ -14,6 +15,7 @@ import androidx.appcompat.content.res.AppCompatResources;
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.core.graphics.drawable.DrawableCompat;
|
||||
import androidx.core.view.WindowInsetsCompat;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.lifecycle.ViewModelProvider;
|
||||
import androidx.navigation.Navigation;
|
||||
@@ -22,6 +24,7 @@ import com.google.android.material.textfield.TextInputLayout;
|
||||
|
||||
import org.thoughtcrime.securesms.R;
|
||||
import org.thoughtcrime.securesms.keyvalue.SignalStore;
|
||||
import org.thoughtcrime.securesms.util.SystemWindowInsetsSetter;
|
||||
import org.thoughtcrime.securesms.util.ViewUtil;
|
||||
import org.thoughtcrime.securesms.util.text.AfterTextChanged;
|
||||
|
||||
@@ -53,6 +56,10 @@ public class PaymentsRecoveryPhraseConfirmFragment extends Fragment {
|
||||
|
||||
PaymentsRecoveryPhraseConfirmFragmentArgs args = PaymentsRecoveryPhraseConfirmFragmentArgs.fromBundle(requireArguments());
|
||||
|
||||
toolbar.getLayoutParams().height = ViewGroup.LayoutParams.WRAP_CONTENT;
|
||||
SystemWindowInsetsSetter.attach(toolbar, getViewLifecycleOwner(), WindowInsetsCompat.Type.statusBars());
|
||||
SystemWindowInsetsSetter.attach(view.findViewById(R.id.payments_recovery_phrase_confirm_fragment_scroll_view), getViewLifecycleOwner(), WindowInsetsCompat.Type.navigationBars() | WindowInsetsCompat.Type.ime());
|
||||
|
||||
validWordCheckMark = AppCompatResources.getDrawable(requireContext(), R.drawable.ic_check_circle_24);
|
||||
invalidWordX = AppCompatResources.getDrawable(requireContext(), R.drawable.ic_circle_x_24);
|
||||
|
||||
|
||||
+7
@@ -3,12 +3,14 @@ package org.thoughtcrime.securesms.payments.backup.entry;
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
import androidx.core.view.WindowInsetsCompat;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.lifecycle.ViewModelProvider;
|
||||
import androidx.navigation.Navigation;
|
||||
@@ -19,6 +21,7 @@ import com.google.android.material.textfield.TextInputLayout;
|
||||
import org.thoughtcrime.securesms.R;
|
||||
import org.thoughtcrime.securesms.payments.Mnemonic;
|
||||
import org.signal.core.util.Util;
|
||||
import org.thoughtcrime.securesms.util.SystemWindowInsetsSetter;
|
||||
import org.thoughtcrime.securesms.util.navigation.SafeNavigation;
|
||||
import org.thoughtcrime.securesms.util.text.AfterTextChanged;
|
||||
|
||||
@@ -37,6 +40,10 @@ public class PaymentsRecoveryEntryFragment extends Fragment {
|
||||
View next = view.findViewById(R.id.payments_recovery_entry_fragment_next);
|
||||
PaymentsRecoveryEntryViewModel viewModel = new ViewModelProvider(this).get(PaymentsRecoveryEntryViewModel.class);
|
||||
|
||||
toolbar.getLayoutParams().height = ViewGroup.LayoutParams.WRAP_CONTENT;
|
||||
SystemWindowInsetsSetter.attach(toolbar, getViewLifecycleOwner(), WindowInsetsCompat.Type.statusBars());
|
||||
SystemWindowInsetsSetter.attach(view.findViewById(R.id.payments_recovery_entry_fragment_scroll_view), getViewLifecycleOwner(), WindowInsetsCompat.Type.navigationBars() | WindowInsetsCompat.Type.ime());
|
||||
|
||||
toolbar.setNavigationOnClickListener(t -> Navigation.findNavController(view).popBackStack(R.id.paymentsHome, false));
|
||||
|
||||
viewModel.getState().observe(getViewLifecycleOwner(), state -> {
|
||||
|
||||
+7
@@ -7,12 +7,14 @@ import android.content.ClipboardManager;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
import androidx.core.view.WindowInsetsCompat;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.lifecycle.ViewModelProvider;
|
||||
import androidx.navigation.Navigation;
|
||||
@@ -29,6 +31,7 @@ import org.thoughtcrime.securesms.keyvalue.SignalStore;
|
||||
import org.thoughtcrime.securesms.payments.Mnemonic;
|
||||
import org.signal.core.util.ServiceUtil;
|
||||
import org.signal.core.util.Util;
|
||||
import org.thoughtcrime.securesms.util.SystemWindowInsetsSetter;
|
||||
import org.thoughtcrime.securesms.util.navigation.SafeNavigation;
|
||||
|
||||
import java.util.Arrays;
|
||||
@@ -59,6 +62,10 @@ public class PaymentsRecoveryPhraseFragment extends Fragment {
|
||||
GridLayoutManager gridLayoutManager = new GridLayoutManager(requireContext(), SPAN_COUNT);
|
||||
PaymentsRecoveryPhraseFragmentArgs args = PaymentsRecoveryPhraseFragmentArgs.fromBundle(requireArguments());
|
||||
|
||||
toolbar.getLayoutParams().height = ViewGroup.LayoutParams.WRAP_CONTENT;
|
||||
SystemWindowInsetsSetter.attach(toolbar, getViewLifecycleOwner(), WindowInsetsCompat.Type.statusBars());
|
||||
SystemWindowInsetsSetter.attach(view.findViewById(R.id.payments_recovery_phrase_fragment_scroll_view), getViewLifecycleOwner(), WindowInsetsCompat.Type.navigationBars());
|
||||
|
||||
final List<String> words;
|
||||
|
||||
if (args.getWords() != null) {
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
app:titleTextAppearance="@style/Signal.Text.TitleLarge" />
|
||||
|
||||
<ScrollView
|
||||
android:id="@+id/payments_recovery_entry_fragment_scroll_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fillViewport="true">
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
app:titleTextAppearance="@style/Signal.Text.TitleLarge" />
|
||||
|
||||
<ScrollView
|
||||
android:id="@+id/payments_recovery_phrase_confirm_fragment_scroll_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fillViewport="true">
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
app:titleTextAppearance="@style/Signal.Text.TitleLarge" />
|
||||
|
||||
<ScrollView
|
||||
android:id="@+id/payments_recovery_phrase_fragment_scroll_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fillViewport="true">
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
app:titleTextAppearance="@style/Signal.Text.TitleLarge" />
|
||||
|
||||
<ScrollView
|
||||
android:id="@+id/payments_recovery_start_fragment_scroll_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fillViewport="true">
|
||||
|
||||
Reference in New Issue
Block a user