From e34f666b70f49a89f5b3b89dff84513233e519de Mon Sep 17 00:00:00 2001 From: adinilfeld Date: Wed, 10 Jun 2020 14:11:06 -0700 Subject: [PATCH] set an OnLongClickListener --- .../newpipe/fragments/detail/VideoDetailFragment.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java index 36e7a206c..95d8008c6 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java @@ -479,7 +479,6 @@ public class VideoDetailFragment extends BaseStateFragment case R.id.detail_controls_download: NavigationHelper.openDownloads(getActivity()); break; - case R.id.detail_uploader_root_layout: if (TextUtils.isEmpty(currentInfo.getSubChannelUrl())) { Log.w(TAG, @@ -488,6 +487,9 @@ public class VideoDetailFragment extends BaseStateFragment openChannel(currentInfo.getUploaderUrl(), currentInfo.getUploaderName()); } break; + case R.id.detail_title_root_layout: + copyTitleText(); + break; } return true; @@ -583,6 +585,9 @@ public class VideoDetailFragment extends BaseStateFragment protected void initListeners() { super.initListeners(); + videoTitleRoot.setLongClickable(true); + videoTitleRoot.setOnLongClickListener(this); + uploaderRootLayout.setOnClickListener(this); uploaderRootLayout.setOnLongClickListener(this); videoTitleRoot.setOnClickListener(this); @@ -1422,4 +1427,8 @@ public class VideoDetailFragment extends BaseStateFragment animateView(detailPositionView, false, 500); }); } + + private void copyTitleText() { + + } }