From caef0051dd0a35869899471b59c866ba74dadd16 Mon Sep 17 00:00:00 2001 From: tibbi Date: Fri, 5 Mar 2021 18:27:40 +0100 Subject: [PATCH] allow copying the currently played file name by long pressing it --- app/build.gradle | 2 +- .../voicerecorder/fragments/PlayerFragment.kt | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index 5e68947..36d8e26 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -56,7 +56,7 @@ android { } dependencies { - implementation 'com.simplemobiletools:commons:5.34.10' + implementation 'com.simplemobiletools:commons:5.34.11' implementation 'org.greenrobot:eventbus:3.2.0' implementation 'com.github.Armen101:AudioRecordView:1.0.2' implementation 'androidx.documentfile:documentfile:1.0.1' diff --git a/app/src/main/kotlin/com/simplemobiletools/voicerecorder/fragments/PlayerFragment.kt b/app/src/main/kotlin/com/simplemobiletools/voicerecorder/fragments/PlayerFragment.kt index a71f601..6156fc0 100644 --- a/app/src/main/kotlin/com/simplemobiletools/voicerecorder/fragments/PlayerFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/voicerecorder/fragments/PlayerFragment.kt @@ -113,6 +113,13 @@ class PlayerFragment(context: Context, attributeSet: AttributeSet) : MyViewPager playRecording(prevRecording, true) } + player_title.setOnLongClickListener { + if (player_title.value.isNotEmpty()) { + context.copyToClipboard(player_title.value) + } + true + } + next_btn.setOnClickListener { val adapter = getRecordingsAdapter() if (adapter == null || adapter.recordings.isEmpty()) {