mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2024-12-23 08:30:44 +00:00
Refactored code
This commit is contained in:
parent
fe42206e94
commit
65bb1dcdbf
@ -529,6 +529,10 @@ public final class Player implements
|
|||||||
binding.resizeTextView.setOnClickListener(this);
|
binding.resizeTextView.setOnClickListener(this);
|
||||||
binding.playbackLiveSync.setOnClickListener(this);
|
binding.playbackLiveSync.setOnClickListener(this);
|
||||||
|
|
||||||
|
playerGestureListener = new PlayerGestureListener(this, service);
|
||||||
|
gestureDetector = new GestureDetectorCompat(context, playerGestureListener);
|
||||||
|
binding.getRoot().setOnTouchListener(playerGestureListener);
|
||||||
|
|
||||||
binding.queueButton.setOnClickListener(this);
|
binding.queueButton.setOnClickListener(this);
|
||||||
binding.segmentsButton.setOnClickListener(this);
|
binding.segmentsButton.setOnClickListener(this);
|
||||||
binding.repeatButton.setOnClickListener(this);
|
binding.repeatButton.setOnClickListener(this);
|
||||||
@ -583,10 +587,6 @@ public final class Player implements
|
|||||||
* Initializes the Fast-For/Backward overlay.
|
* Initializes the Fast-For/Backward overlay.
|
||||||
*/
|
*/
|
||||||
private void setupPlayerSeekOverlay() {
|
private void setupPlayerSeekOverlay() {
|
||||||
playerGestureListener = new PlayerGestureListener(this, service);
|
|
||||||
gestureDetector = new GestureDetectorCompat(context, playerGestureListener);
|
|
||||||
binding.getRoot().setOnTouchListener(playerGestureListener);
|
|
||||||
|
|
||||||
binding.fastSeekOverlay
|
binding.fastSeekOverlay
|
||||||
.seekSeconds((int) (retrieveSeekDurationFromPreferences(this) / 1000.0f))
|
.seekSeconds((int) (retrieveSeekDurationFromPreferences(this) / 1000.0f))
|
||||||
.performListener(new PlayerFastSeekOverlay.PerformListener() {
|
.performListener(new PlayerFastSeekOverlay.PerformListener() {
|
||||||
|
Loading…
Reference in New Issue
Block a user