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

pull/12729/head
litetex 2025-10-20 21:06:39 +02:00 zatwierdzone przez Stypox
rodzic ecd3e85d49
commit c81148ae0a
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4BDF1B40A49FDD23
2 zmienionych plików z 6 dodań i 0 usunięć

Wyświetl plik

@ -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

Wyświetl plik

@ -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();
}