Commit Graph

87 Commits

Author SHA1 Message Date
Isira Seneviratne f3b458c803
Bump compileSdk to 34 2023-12-23 11:38:32 +01:00
TobiGr c69bcaafbb Fixed some Sonar warnings 2023-08-03 12:02:08 +02:00
Stypox 22c201be39
Create text subpackage in util 2023-01-15 11:51:07 +01:00
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
Isira Seneviratne f1dab11f1f Remove deprecated method calls in FocusAwareCoordinator. 2022-07-21 09:01:19 +05:30
litetex 8b209df253 Changed the code accordingly
+ Removed some unused code
2022-07-15 19:55:19 +02:00
Stypox b3f99645a3
Fix some crashes / issues after player refactor 2022-07-13 23:27:23 +02:00
Stypox 76ced59b62
Refactor player: separate UIs and more 2022-07-13 23:25:26 +02:00
litetex 99104fc11d
Clean up pre-Lollipop checks 2022-07-13 19:02:24 +02:00
litetex 57231382a6
Merge pull request #8066 from TacoTheDank/simpleSeekbarChange
Create stub implementation for OnSeekBarChangeListener
2022-03-19 14:37:10 +01:00
TacoTheDank 979a320347 Delete some unused code 2022-03-17 23:26:34 -04:00
TacoTheDank 20bddd8e47 Use Animator.addListener() KTX extension 2022-03-17 22:01:51 -04:00
litetex af79479716 Fixed "Changing the seeks duration does not update the displayed seconds" 2022-01-25 20:44:49 +01:00
litetex 1c20eabb48 Code cleanup 2022-01-21 22:49:25 +01:00
litetex f8c52c4dac Fixed SonarLint problems
* Removed alphaRelativeDuration as there is no use for it
2022-01-21 22:49:24 +01:00
litetex 345ba74d58 Fixed naming 2022-01-21 22:49:24 +01:00
litetex 452fe3a8e2 Respect disabled animations 2022-01-21 22:49:24 +01:00
litetex c25e523df6 Removed all animations to be consistent with the current behavior 2022-01-21 22:49:23 +01:00
litetex fe42206e94 Code cleanup and minimization
* Deduplicated and simplified a lot of code
* Fixed ``invalidSeekConditions`` so that it's possible to seek while the player is loading (like currently the case)
2022-01-21 22:49:23 +01:00
Stypox 95631dba46 Convert SecondsView from kotlin synthetics to view binding 2022-01-21 22:49:22 +01:00
vkay94 3aebfa22e9 SeekOverlay: Switch to merge for SecondsView and other adjustments 2022-01-21 22:49:21 +01:00
vkay94 72eb3b4415 SeekOverlay: Add seek overlay logic to player 2022-01-21 22:49:21 +01:00
vkay94 3a40759cd2 SeekOverlay: Add Views 2022-01-21 22:49:21 +01:00
TiA4f8R a744775fe7
Adress requested changes and remove an unused return value in NewPipeTextViewHelper 2021-10-16 13:41:05 +02:00
TiA4f8R aab09c0c65
Merge the Share process of the two classes into one
A new class has been added in the util package: NewPipeTextViewHelper.
It shares the selected text of a TextView with ShareUtils#shareText (with the created shareSelectedTextWithShareUtils static method).
Only this static method can be used by other classes, other methods are private.
2021-10-16 13:41:04 +02:00
TiA4f8R 3ded6feddb
Improve code of created views
Use the same logic as Android TextViews
2021-10-16 13:41:04 +02:00
TiA4f8R c8802fe5d0
Add JavaDocs on created views 2021-10-16 13:41:04 +02:00
TiA4f8R 411b3129f9
Use a custom EditText everywhere to be able to share with ShareUtils the selected text
This EditText class extends the AppCompatEditText class from androidx.

These changes (only in XML ressources) allow us to share the selected text by using ShareUtils.shareText, which opens the Android system chooser instead of the Huawei system chooser on EMUI devices.
2021-10-16 13:41:03 +02:00
TiA4f8R a55acd38df
Use a custom TextView everywhere to be able to share with ShareUtils the selected text
This TextView class extends the AppCompatTextView class from androidx.

These changes (only in XML ressources) allow us to share the selected text by using ShareUtils.shareText, which opens the Android system chooser instead of the Huawei system chooser on EMUI devices.
2021-10-16 13:40:54 +02:00
TiA4f8R 79e98db3bd
Apply the requested changes and little improvements
Apply the requested changes, use ShareUtils.shareText to share an stream in the play queue and optimize imports for Java files, using Android Studio functionality.

Apply the requested changes and do little improvements
Apply the requested changes, use ShareUtils.shareText to share an stream in the play queue and optimize imports for Java files, using Android Studio functionality.
2021-01-16 13:23:42 +01:00
Isira Seneviratne 920e560b4b Convert AnimationUtils functions to extension functions. 2021-01-16 14:49:37 +05:30
TacoTheDank 0274cd6beb Lint: Inner class may be static 2020-11-18 18:02:33 -05:00
TacoTheDank 39e5d8ccc2 Lint: Make a bunch of stuff final 2020-11-18 17:50:00 -05:00
TacoTheDank 1e1fb32558 Fix some version checks to use android.os.Build 2020-10-31 15:54:02 -04:00
Avently d0fc9fda71 Fixed player's ZOOM mode for KitKat devices 2020-09-27 04:25:06 +03:00
Avently f41549ccf1 Added a comment and excluded automatic switch of orientation on tablets and Android TVs 2020-09-19 17:21:01 +03:00
Avently a1e4ef9e8e Fix for multiple listeners of insets 2020-09-16 04:49:26 +03:00
Avently 150e156d26 Reimagined player positioning 2020-09-15 14:43:43 +03:00
TacoTheDank 06d54ef77e
Clean up SDK version checks 2020-09-06 12:55:30 +02:00
TacoTheDank 6cb16be5df
Use enhanced 'for' loops 2020-09-06 12:52:43 +02:00
wb9688 87228673b4 Use final where possible 2020-08-16 10:25:09 +02:00
Avently ec8b00042b Merged the latest code 2020-07-25 04:18:41 +03:00
Avently 08db1d59e5 Android TV: ability to select all buttons in the main player, as well as in the main fragment 2020-07-25 04:14:29 +03:00
Alexander-- 801267df18
Add @NonNull annotation to method argument
Co-authored-by: Tobias Groza <TobiGr@users.noreply.github.com>
2020-07-22 07:57:04 -04:00
Alexander-- 6e73e0b395 Use View.isShown() to avoid focus overlay glitches
A View can become focused while being invisible, if it's
parent is invisible. Use global draw listener and
View.isShown() to catch such cases.
2020-07-22 06:21:25 +06:59
Avently c7ccf9bab8 AndroidTvUtils -> DeviceUtils 2020-07-21 01:43:49 +03:00
Avently d8f7db4715 Made checkStyle happy 2020-07-14 20:21:32 +03:00
Avently d2aaa6f691 Merged the latest changes 2020-07-13 04:17:21 +03:00
Avently b2164ce5fc Marked many (too many) variables as final 2020-07-12 03:59:47 +03:00
Avently a7fbe05a73 Changes for review 2020-06-27 06:25:50 +03:00