Commit Graph

7 Commits

Author SHA1 Message Date
AudricV cdd5e89b86
Add ability to copy hashtags, URLs and timestamps in descriptions on long-press
This commit adds the ability to copy to clipboard hashtags, URLs and timestamps
when long-pressing them.

Some changes in our TextView class related to text setting have been required
and metadata items are now using a NewPipeTextView instead of a standard
TextView.

Six new classes have been added:

- a custom LinkMovementMethod class;
- a custom ClickableSpan class, LongPressClickableSpan, in order to set a long
  press event;
- a class to avoid code duplication in CommentTextOnTouchListener, TouchUtils;
- three implementations of LongPressClickableSpan used when linkifying text:
  - HashtagLongPressClickableSpan for hashtags;
  - TimestampLongPressClickableSpan for timestamps;
  - UrlLongPressClickableSpan for URLs.
2023-01-15 11:40:27 +01:00
Stypox 40a2df847b
Move tags layout at the bottom, use multiple lines 2021-06-13 21:56:06 +02:00
Stypox fa1d7ffac3
Const text width for metadata; scrollable tags layout 2021-06-09 15:32:07 +02:00
TobiGr 49b12ea4f8 Increase space for metadata typeview
Some translations come with longer words causing them to wrap at strange positions
2021-06-06 11:57:14 +02:00
Stypox 14256137e8
Use chips to show tags in metadata section
Clicking on chips opens the search fragment
Long clicking copies to clipboard
2021-06-02 16:15:02 +02:00
Stypox d0d5373be9
Allow copying metadata to clipboard 2021-06-02 14:19:25 +02:00
Stypox 997267bad1
Show video metadata below the decription 2021-06-02 14:19:25 +02:00