From 2dfb09bc2ba0513714f7000afd4c26590730945a Mon Sep 17 00:00:00 2001 From: Robin Linden Date: Tue, 20 Feb 2024 00:02:31 +0100 Subject: [PATCH] Add a more obvious way of getting to the QR display --- .../ui/userprofile/UserProfileFragment.kt | 4 ++ atox/src/main/res/drawable/ic_qr_code.xml | 40 +++++++++++++++++++ .../main/res/layout/fragment_user_profile.xml | 15 ++++++- 3 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 atox/src/main/res/drawable/ic_qr_code.xml diff --git a/atox/src/main/kotlin/ui/userprofile/UserProfileFragment.kt b/atox/src/main/kotlin/ui/userprofile/UserProfileFragment.kt index 697ba6cd0..1ac010c2d 100644 --- a/atox/src/main/kotlin/ui/userprofile/UserProfileFragment.kt +++ b/atox/src/main/kotlin/ui/userprofile/UserProfileFragment.kt @@ -97,6 +97,10 @@ class UserProfileFragment : BaseFragment(FragmentUse } registerForContextMenu(profileShareId) + showQr.setOnClickListener { + createQrCodeDialog().show() + } + profileOptions.profileChangeNickname.setOnClickListener { val nameEdit = EditText(requireContext()).apply { text.append(binding.userName.text) diff --git a/atox/src/main/res/drawable/ic_qr_code.xml b/atox/src/main/res/drawable/ic_qr_code.xml new file mode 100644 index 000000000..8b813a3e5 --- /dev/null +++ b/atox/src/main/res/drawable/ic_qr_code.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + diff --git a/atox/src/main/res/layout/fragment_user_profile.xml b/atox/src/main/res/layout/fragment_user_profile.xml index 8d57e4f37..884763047 100644 --- a/atox/src/main/res/layout/fragment_user_profile.xml +++ b/atox/src/main/res/layout/fragment_user_profile.xml @@ -123,7 +123,20 @@ android:layout_height="wrap_content" android:layout_marginBottom="8dp" android:text="@string/tox_id" - android:textSize="16sp"/> + android:textSize="16sp" + tools:ignore="RelativeOverlap" /> + + + +