From 5d1d0fb12a254a6eb0a19dba4418e0eec79e8df9 Mon Sep 17 00:00:00 2001 From: Torsten Grote Date: Wed, 19 Oct 2022 16:04:11 -0300 Subject: [PATCH] Replace illustration for adding contacts nearby --- briar-android/artwork/il_qr_code_dark.svg | 20 ++ briar-android/artwork/il_qr_code_light.svg | 20 ++ .../artwork/il_qr_code_nearby_dark.svg | 49 +++++ .../artwork/il_qr_code_nearby_light.svg | 49 +++++ briar-android/artwork/qr_code.svg | 67 ------- .../nearby/AddNearbyContactIntroFragment.java | 9 - .../main/res/drawable-night/il_qr_code.xml | 70 +++++++ .../res/drawable-night/il_qr_code_nearby.xml | 176 ++++++++++++++++++ .../drawable-night/qr_code_explanation.xml | 28 --- .../main/res/drawable/border_explanation.xml | 13 -- .../src/main/res/drawable/il_qr_code.xml | 70 +++++++ .../main/res/drawable/il_qr_code_nearby.xml | 176 ++++++++++++++++++ .../main/res/drawable/qr_code_explanation.xml | 29 --- .../src/main/res/drawable/qr_code_intro.xml | 24 --- .../layout-land/fragment_keyagreement_id.xml | 154 ++++++++------- .../res/layout/fragment_keyagreement_id.xml | 141 +++++++------- .../src/main/res/values-night/color.xml | 2 +- briar-android/src/main/res/values/color.xml | 3 +- briar-android/src/main/res/values/strings.xml | 1 + 19 files changed, 778 insertions(+), 323 deletions(-) create mode 100644 briar-android/artwork/il_qr_code_dark.svg create mode 100644 briar-android/artwork/il_qr_code_light.svg create mode 100644 briar-android/artwork/il_qr_code_nearby_dark.svg create mode 100644 briar-android/artwork/il_qr_code_nearby_light.svg delete mode 100644 briar-android/artwork/qr_code.svg create mode 100644 briar-android/src/main/res/drawable-night/il_qr_code.xml create mode 100644 briar-android/src/main/res/drawable-night/il_qr_code_nearby.xml delete mode 100644 briar-android/src/main/res/drawable-night/qr_code_explanation.xml delete mode 100644 briar-android/src/main/res/drawable/border_explanation.xml create mode 100644 briar-android/src/main/res/drawable/il_qr_code.xml create mode 100644 briar-android/src/main/res/drawable/il_qr_code_nearby.xml delete mode 100644 briar-android/src/main/res/drawable/qr_code_explanation.xml delete mode 100644 briar-android/src/main/res/drawable/qr_code_intro.xml diff --git a/briar-android/artwork/il_qr_code_dark.svg b/briar-android/artwork/il_qr_code_dark.svg new file mode 100644 index 000000000..3ca2dafb9 --- /dev/null +++ b/briar-android/artwork/il_qr_code_dark.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/briar-android/artwork/il_qr_code_light.svg b/briar-android/artwork/il_qr_code_light.svg new file mode 100644 index 000000000..9862f9a42 --- /dev/null +++ b/briar-android/artwork/il_qr_code_light.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/briar-android/artwork/il_qr_code_nearby_dark.svg b/briar-android/artwork/il_qr_code_nearby_dark.svg new file mode 100644 index 000000000..c629c1b04 --- /dev/null +++ b/briar-android/artwork/il_qr_code_nearby_dark.svg @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/briar-android/artwork/il_qr_code_nearby_light.svg b/briar-android/artwork/il_qr_code_nearby_light.svg new file mode 100644 index 000000000..042e0d0db --- /dev/null +++ b/briar-android/artwork/il_qr_code_nearby_light.svg @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/briar-android/artwork/qr_code.svg b/briar-android/artwork/qr_code.svg deleted file mode 100644 index 07930f849..000000000 --- a/briar-android/artwork/qr_code.svg +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/briar-android/src/main/java/org/briarproject/briar/android/contact/add/nearby/AddNearbyContactIntroFragment.java b/briar-android/src/main/java/org/briarproject/briar/android/contact/add/nearby/AddNearbyContactIntroFragment.java index 7136b497e..7f60b4d8b 100644 --- a/briar-android/src/main/java/org/briarproject/briar/android/contact/add/nearby/AddNearbyContactIntroFragment.java +++ b/briar-android/src/main/java/org/briarproject/briar/android/contact/add/nearby/AddNearbyContactIntroFragment.java @@ -4,7 +4,6 @@ import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; -import android.widget.ScrollView; import org.briarproject.briar.R; import org.briarproject.briar.android.activity.ActivityComponent; @@ -19,8 +18,6 @@ import androidx.activity.result.ActivityResultLauncher; import androidx.activity.result.contract.ActivityResultContracts.RequestMultiplePermissions; import androidx.lifecycle.ViewModelProvider; -import static android.view.View.FOCUS_DOWN; - @MethodsNotNullByDefault @ParametersNotNullByDefault public class AddNearbyContactIntroFragment extends BaseFragment { @@ -34,8 +31,6 @@ public class AddNearbyContactIntroFragment extends BaseFragment { private AddNearbyContactViewModel viewModel; private AddNearbyContactPermissionManager permissionManager; - private ScrollView scrollView; - private final ActivityResultLauncher permissionLauncher = registerForActivityResult(new RequestMultiplePermissions(), r -> { permissionManager.onRequestPermissionResult(r); @@ -67,10 +62,8 @@ public class AddNearbyContactIntroFragment extends BaseFragment { public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { - View v = inflater.inflate(R.layout.fragment_keyagreement_id, container, false); - scrollView = v.findViewById(R.id.scrollView); View button = v.findViewById(R.id.continueButton); button.setOnClickListener(view -> { viewModel.stopDiscovery(); @@ -98,8 +91,6 @@ public class AddNearbyContactIntroFragment extends BaseFragment { permissionManager.resetPermissions(); // Reset plugins in case they were assigned when we weren't signed-in viewModel.resetPlugins(); - // Scroll down in case the screen is small, so the button is visible - scrollView.post(() -> scrollView.fullScroll(FOCUS_DOWN)); } @Override diff --git a/briar-android/src/main/res/drawable-night/il_qr_code.xml b/briar-android/src/main/res/drawable-night/il_qr_code.xml new file mode 100644 index 000000000..510019bad --- /dev/null +++ b/briar-android/src/main/res/drawable-night/il_qr_code.xml @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/briar-android/src/main/res/drawable-night/il_qr_code_nearby.xml b/briar-android/src/main/res/drawable-night/il_qr_code_nearby.xml new file mode 100644 index 000000000..dc005356d --- /dev/null +++ b/briar-android/src/main/res/drawable-night/il_qr_code_nearby.xml @@ -0,0 +1,176 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/briar-android/src/main/res/drawable-night/qr_code_explanation.xml b/briar-android/src/main/res/drawable-night/qr_code_explanation.xml deleted file mode 100644 index 5a4866585..000000000 --- a/briar-android/src/main/res/drawable-night/qr_code_explanation.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - diff --git a/briar-android/src/main/res/drawable/border_explanation.xml b/briar-android/src/main/res/drawable/border_explanation.xml deleted file mode 100644 index f54513376..000000000 --- a/briar-android/src/main/res/drawable/border_explanation.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/briar-android/src/main/res/drawable/il_qr_code.xml b/briar-android/src/main/res/drawable/il_qr_code.xml new file mode 100644 index 000000000..8971fba28 --- /dev/null +++ b/briar-android/src/main/res/drawable/il_qr_code.xml @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/briar-android/src/main/res/drawable/il_qr_code_nearby.xml b/briar-android/src/main/res/drawable/il_qr_code_nearby.xml new file mode 100644 index 000000000..52fc5e4b6 --- /dev/null +++ b/briar-android/src/main/res/drawable/il_qr_code_nearby.xml @@ -0,0 +1,176 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/briar-android/src/main/res/drawable/qr_code_explanation.xml b/briar-android/src/main/res/drawable/qr_code_explanation.xml deleted file mode 100644 index 557b7cd85..000000000 --- a/briar-android/src/main/res/drawable/qr_code_explanation.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/briar-android/src/main/res/drawable/qr_code_intro.xml b/briar-android/src/main/res/drawable/qr_code_intro.xml deleted file mode 100644 index 6b09db32d..000000000 --- a/briar-android/src/main/res/drawable/qr_code_intro.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - diff --git a/briar-android/src/main/res/layout-land/fragment_keyagreement_id.xml b/briar-android/src/main/res/layout-land/fragment_keyagreement_id.xml index fb2fe2c21..9fd9ff420 100644 --- a/briar-android/src/main/res/layout-land/fragment_keyagreement_id.xml +++ b/briar-android/src/main/res/layout-land/fragment_keyagreement_id.xml @@ -1,89 +1,83 @@ - - + + + + + + + + + + + + + + + + + +