Skip to content

Commit 58a5c11

Browse files
Carl MillerCarl Miller
authored andcommitted
refactor: Remove 2x speed overlay text from hold-to-fast-forward feature
1 parent 6eba367 commit 58a5c11

4 files changed

Lines changed: 1 addition & 51 deletions

File tree

app/src/main/java/org/schabi/newpipe/player/ui/VideoPlayerUi.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -448,10 +448,8 @@ protected void setupElementsSize(final int buttonsMinWidth,
448448

449449
/**
450450
* Called when hold-to-fast-forward is activated (long press detected).
451-
* Shows the visual indicator overlay.
452451
*/
453452
public void onHoldToFastForwardStart() {
454-
animate(binding.holdToFastForwardOverlay, true, DEFAULT_CONTROLS_DURATION);
455453
// Hide controls while fast forwarding
456454
if (isControlsVisible()) {
457455
hideControls(DEFAULT_CONTROLS_DURATION, 0);
@@ -460,10 +458,9 @@ public void onHoldToFastForwardStart() {
460458

461459
/**
462460
* Called when hold-to-fast-forward is deactivated (finger released).
463-
* Hides the visual indicator overlay.
464461
*/
465462
public void onHoldToFastForwardEnd() {
466-
animate(binding.holdToFastForwardOverlay, false, DEFAULT_CONTROLS_DURATION);
463+
// No visual indicator to hide
467464
}
468465
//endregion
469466

app/src/main/res/drawable/ic_fast_forward.xml

Lines changed: 0 additions & 10 deletions
This file was deleted.

app/src/main/res/layout/player.xml

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -809,40 +809,4 @@
809809
android:alpha="0"
810810
android:visibility="invisible" /> <!-- Required for the first appearance fading correctly -->
811811

812-
<!-- Hold to fast forward indicator -->
813-
<LinearLayout
814-
android:id="@+id/holdToFastForwardOverlay"
815-
android:layout_width="wrap_content"
816-
android:layout_height="wrap_content"
817-
android:layout_centerHorizontal="true"
818-
android:layout_marginTop="80dp"
819-
android:background="@drawable/background_oval_black_transparent"
820-
android:gravity="center"
821-
android:orientation="horizontal"
822-
android:paddingStart="20dp"
823-
android:paddingTop="12dp"
824-
android:paddingEnd="20dp"
825-
android:paddingBottom="12dp"
826-
android:visibility="gone"
827-
tools:visibility="visible">
828-
829-
<androidx.appcompat.widget.AppCompatImageView
830-
android:layout_width="24dp"
831-
android:layout_height="24dp"
832-
android:layout_marginEnd="8dp"
833-
android:src="@drawable/ic_fast_forward"
834-
app:tint="@color/white"
835-
tools:ignore="ContentDescription" />
836-
837-
<org.schabi.newpipe.views.NewPipeTextView
838-
android:id="@+id/holdToFastForwardText"
839-
android:layout_width="wrap_content"
840-
android:layout_height="wrap_content"
841-
android:text="@string/hold_to_fast_forward_indicator"
842-
android:textColor="@android:color/white"
843-
android:textSize="16sp"
844-
android:textStyle="bold" />
845-
846-
</LinearLayout>
847-
848812
</RelativeLayout>

app/src/main/res/values/strings.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@
9393
<string name="ignore_hardware_media_buttons_summary">Useful, for instance, if you are using a headset with broken physical buttons</string>
9494
<string name="hold_to_fast_forward_title">Hold to fast forward</string>
9595
<string name="hold_to_fast_forward_summary">Tap and hold on the video to play at 2x speed while held</string>
96-
<string name="hold_to_fast_forward_indicator">2x Speed</string>
9796
<string name="show_comments_title">Show comments</string>
9897
<string name="show_comments_summary">Turn off to hide comments</string>
9998
<string name="show_next_and_similar_title">Show \'Next\' and \'Similar\' videos</string>

0 commit comments

Comments
 (0)