diff --git a/app/src/main/java/org/schabi/newpipe/fragments/detail/DescriptionFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/detail/DescriptionFragment.java index b44841fdb..df16ee7f4 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/detail/DescriptionFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/detail/DescriptionFragment.java @@ -19,6 +19,7 @@ import org.schabi.newpipe.databinding.ItemMetadataBinding; import org.schabi.newpipe.extractor.stream.Description; import org.schabi.newpipe.extractor.stream.StreamInfo; import org.schabi.newpipe.util.Localization; +import org.schabi.newpipe.util.ShareUtils; import org.schabi.newpipe.util.TextLinkifier; import icepick.State; @@ -139,6 +140,10 @@ public class DescriptionFragment extends BaseFragment { final ItemMetadataBinding binding = ItemMetadataBinding.inflate(inflater, layout, false); binding.metadataTypeView.setText(type); + binding.metadataTypeView.setOnLongClickListener(v -> { + ShareUtils.copyToClipboard(requireContext(), content); + return true; + }); if (linkifyContent) { TextLinkifier.createLinksFromPlainText(layout.getContext(), content, diff --git a/app/src/main/res/layout/item_metadata.xml b/app/src/main/res/layout/item_metadata.xml index 441b916e8..4da962d5c 100644 --- a/app/src/main/res/layout/item_metadata.xml +++ b/app/src/main/res/layout/item_metadata.xml @@ -15,10 +15,10 @@