From 6ef2997b5e304d31e68c759ea3645ad40bc2603c Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Sun, 26 Feb 2023 19:36:26 +0100 Subject: [PATCH] add some menu items to setup screen --- .../ui/fragment/setup/SignInFragment.java | 5 ++++- .../res/drawable/ic_qr_code_scanner_24dp.xml | 10 ++++++++++ app/src/main/res/menu/activity_setup.xml | 16 +++++++++++++--- app/src/main/res/values/strings.xml | 1 + 4 files changed, 28 insertions(+), 4 deletions(-) create mode 100644 app/src/main/res/drawable/ic_qr_code_scanner_24dp.xml diff --git a/app/src/main/java/im/conversations/android/ui/fragment/setup/SignInFragment.java b/app/src/main/java/im/conversations/android/ui/fragment/setup/SignInFragment.java index 3bb96f74c..92d06982e 100644 --- a/app/src/main/java/im/conversations/android/ui/fragment/setup/SignInFragment.java +++ b/app/src/main/java/im/conversations/android/ui/fragment/setup/SignInFragment.java @@ -15,10 +15,13 @@ public class SignInFragment extends AbstractSetupFragment { public View onCreateView( @NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { super.onCreateView(inflater, container, savedInstanceState); - FragmentSignInBinding binding = + final FragmentSignInBinding binding = DataBindingUtil.inflate(inflater, R.layout.fragment_sign_in, container, false); binding.setSetupViewModel(setupViewModel); binding.setLifecycleOwner(getViewLifecycleOwner()); + final var menu = binding.materialToolbar.getMenu(); + menu.findItem(R.id.scan_qr_code).setVisible(true); + menu.findItem(R.id.certificate_login).setVisible(true); return binding.getRoot(); } } diff --git a/app/src/main/res/drawable/ic_qr_code_scanner_24dp.xml b/app/src/main/res/drawable/ic_qr_code_scanner_24dp.xml new file mode 100644 index 000000000..3d6820dc6 --- /dev/null +++ b/app/src/main/res/drawable/ic_qr_code_scanner_24dp.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/menu/activity_setup.xml b/app/src/main/res/menu/activity_setup.xml index 515dd2fca..4ae1af9eb 100644 --- a/app/src/main/res/menu/activity_setup.xml +++ b/app/src/main/res/menu/activity_setup.xml @@ -2,9 +2,19 @@ + + \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 08f82c9b8..08433a720 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1041,5 +1041,6 @@ Opportunistic TLS (STARTTLS) Info required Invalid! + Certificate login