refactor: Remove 2x speed overlay text from hold-to-fast-forward feature

This commit is contained in:
Carl Miller 2025-11-27 22:54:55 -06:00
parent 6eba36700a
commit 58a5c119cd
4 changed files with 1 additions and 51 deletions

View File

@ -448,10 +448,8 @@ public abstract class VideoPlayerUi extends PlayerUi implements SeekBar.OnSeekBa
/**
* Called when hold-to-fast-forward is activated (long press detected).
* Shows the visual indicator overlay.
*/
public void onHoldToFastForwardStart() {
animate(binding.holdToFastForwardOverlay, true, DEFAULT_CONTROLS_DURATION);
// Hide controls while fast forwarding
if (isControlsVisible()) {
hideControls(DEFAULT_CONTROLS_DURATION, 0);
@ -460,10 +458,9 @@ public abstract class VideoPlayerUi extends PlayerUi implements SeekBar.OnSeekBa
/**
* Called when hold-to-fast-forward is deactivated (finger released).
* Hides the visual indicator overlay.
*/
public void onHoldToFastForwardEnd() {
animate(binding.holdToFastForwardOverlay, false, DEFAULT_CONTROLS_DURATION);
// No visual indicator to hide
}
//endregion

View File

@ -1,10 +0,0 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:tint="@color/defaultIconTint"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#ffffff"
android:pathData="M4,18l8.5,-6L4,6v12zM13,6v12l8.5,-6L13,6z" />
</vector>

View File

@ -809,40 +809,4 @@
android:alpha="0"
android:visibility="invisible" /> <!-- Required for the first appearance fading correctly -->
<!-- Hold to fast forward indicator -->
<LinearLayout
android:id="@+id/holdToFastForwardOverlay"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="80dp"
android:background="@drawable/background_oval_black_transparent"
android:gravity="center"
android:orientation="horizontal"
android:paddingStart="20dp"
android:paddingTop="12dp"
android:paddingEnd="20dp"
android:paddingBottom="12dp"
android:visibility="gone"
tools:visibility="visible">
<androidx.appcompat.widget.AppCompatImageView
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginEnd="8dp"
android:src="@drawable/ic_fast_forward"
app:tint="@color/white"
tools:ignore="ContentDescription" />
<org.schabi.newpipe.views.NewPipeTextView
android:id="@+id/holdToFastForwardText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/hold_to_fast_forward_indicator"
android:textColor="@android:color/white"
android:textSize="16sp"
android:textStyle="bold" />
</LinearLayout>
</RelativeLayout>

View File

@ -93,7 +93,6 @@
<string name="ignore_hardware_media_buttons_summary">Useful, for instance, if you are using a headset with broken physical buttons</string>
<string name="hold_to_fast_forward_title">Hold to fast forward</string>
<string name="hold_to_fast_forward_summary">Tap and hold on the video to play at 2x speed while held</string>
<string name="hold_to_fast_forward_indicator">2x Speed</string>
<string name="show_comments_title">Show comments</string>
<string name="show_comments_summary">Turn off to hide comments</string>
<string name="show_next_and_similar_title">Show \'Next\' and \'Similar\' videos</string>