mirror of
https://gitlab.futo.org/videostreaming/grayjay.git
synced 2025-09-22 17:29:07 +00:00
Merge branch 'copy-title' into 'master'
Copy Title See merge request videostreaming/grayjay!110
This commit is contained in:
commit
2bc6127f6b
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