allow copying the currently played file name by long pressing it

This commit is contained in:
tibbi 2021-03-05 18:27:40 +01:00
parent 91f2e61f13
commit caef0051dd
2 changed files with 8 additions and 1 deletions

View File

@ -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'

View File

@ -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()) {