[Popup player] Workaround that UI elements are pushed off screen

This commit is contained in:
litetex
2025-10-21 18:09:06 +02:00
committed by Stypox
parent ecd3e85d49
commit c81148ae0a
2 changed files with 6 additions and 0 deletions
@@ -290,6 +290,9 @@ public final class MainPlayerUi extends VideoPlayerUi implements View.OnLayoutCh
binding.topControls.setFocusable(true);
binding.metadataView.setVisibility(isFullscreen ? View.VISIBLE : View.GONE);
// Reset workaround changes from popup player
binding.audioTrackTextView.setMaxWidth(Integer.MAX_VALUE);
}
@Override
@@ -40,6 +40,7 @@ import org.schabi.newpipe.player.Player;
import org.schabi.newpipe.player.gesture.BasePlayerGestureListener;
import org.schabi.newpipe.player.gesture.PopupPlayerGestureListener;
import org.schabi.newpipe.player.helper.PlayerHelper;
import org.schabi.newpipe.util.DeviceUtils;
public final class PopupPlayerUi extends VideoPlayerUi {
private static final String TAG = PopupPlayerUi.class.getSimpleName();
@@ -174,6 +175,8 @@ public final class PopupPlayerUi extends VideoPlayerUi {
binding.topControls.setClickable(false);
binding.topControls.setFocusable(false);
binding.bottomControls.bringToFront();
// Workaround that UI elements are pushed off screen
binding.audioTrackTextView.setMaxWidth(DeviceUtils.dpToPx(48, context));
super.setupElementsVisibility();
}