From 02002297c0fd487eafce69874c1c39fcbb3f0b9b Mon Sep 17 00:00:00 2001 From: tibbi Date: Thu, 27 Sep 2018 12:19:40 +0200 Subject: [PATCH] fix #250, allow copying phone number to clipboard by long pressing it Works at the View contact screen only --- .../contacts/activities/ViewContactActivity.kt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/activities/ViewContactActivity.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/activities/ViewContactActivity.kt index 886d86c5..a7995535 100644 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/activities/ViewContactActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/contacts/activities/ViewContactActivity.kt @@ -235,6 +235,12 @@ class ViewContactActivity : ContactActivity() { startCallIntent(phoneNumber.value) } } + + setOnLongClickListener { + copyToClipboard(phoneNumber.value) + toast(R.string.value_copied_to_clipboard) + true + } } } contact_numbers_image.beVisible()