mirror of
https://gitlab.futo.org/videostreaming/grayjay.git
synced 2025-08-09 09:39:51 +00:00
add long tap to copy playing video title
Changelog: added
This commit is contained in:
parent
c94c2721d7
commit
8e70f1b865
1 changed files with 10 additions and 0 deletions
|
@ -2,6 +2,8 @@ package com.futo.platformplayer.fragment.mainactivity.main
|
|||
|
||||
import android.app.PictureInPictureParams
|
||||
import android.app.RemoteAction
|
||||
import android.content.ClipData
|
||||
import android.content.ClipboardManager
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.content.res.Configuration
|
||||
|
@ -408,6 +410,14 @@ class VideoDetailView : ConstraintLayout {
|
|||
showChaptersUI();
|
||||
};
|
||||
|
||||
_title.setOnLongClickListener {
|
||||
val clipboard = context.getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager;
|
||||
val clip = ClipData.newPlainText("Video Title", (it as TextView).text);
|
||||
clipboard.setPrimaryClip(clip);
|
||||
UIDialogs.toast(context, "Copied", false)
|
||||
// let other interactions happen based on the touch
|
||||
false
|
||||
}
|
||||
|
||||
_buttonSubscribe.onSubscribed.subscribe {
|
||||
_slideUpOverlay = UISlideOverlays.showSubscriptionOptionsOverlay(it, _overlayContainer);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue