[Popup player] Workaround that UI elements are pushed off screen
This commit is contained in:
parent
384cc26a87
commit
8271f62b46
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.topControls.setFocusable(true);
|
||||||
|
|
||||||
binding.metadataView.setVisibility(isFullscreen ? View.VISIBLE : View.GONE);
|
binding.metadataView.setVisibility(isFullscreen ? View.VISIBLE : View.GONE);
|
||||||
|
|
||||||
|
// Reset workaround changes from popup player
|
||||||
|
binding.audioTrackTextView.setMaxWidth(Integer.MAX_VALUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,7 @@ import org.schabi.newpipe.player.Player;
|
||||||
import org.schabi.newpipe.player.gesture.BasePlayerGestureListener;
|
import org.schabi.newpipe.player.gesture.BasePlayerGestureListener;
|
||||||
import org.schabi.newpipe.player.gesture.PopupPlayerGestureListener;
|
import org.schabi.newpipe.player.gesture.PopupPlayerGestureListener;
|
||||||
import org.schabi.newpipe.player.helper.PlayerHelper;
|
import org.schabi.newpipe.player.helper.PlayerHelper;
|
||||||
|
import org.schabi.newpipe.util.DeviceUtils;
|
||||||
|
|
||||||
public final class PopupPlayerUi extends VideoPlayerUi {
|
public final class PopupPlayerUi extends VideoPlayerUi {
|
||||||
private static final String TAG = PopupPlayerUi.class.getSimpleName();
|
private static final String TAG = PopupPlayerUi.class.getSimpleName();
|
||||||
|
|
@ -174,6 +175,8 @@ public final class PopupPlayerUi extends VideoPlayerUi {
|
||||||
binding.topControls.setClickable(false);
|
binding.topControls.setClickable(false);
|
||||||
binding.topControls.setFocusable(false);
|
binding.topControls.setFocusable(false);
|
||||||
binding.bottomControls.bringToFront();
|
binding.bottomControls.bringToFront();
|
||||||
|
// Workaround that UI elements are pushed off screen
|
||||||
|
binding.audioTrackTextView.setMaxWidth(DeviceUtils.dpToPx(48, context));
|
||||||
super.setupElementsVisibility();
|
super.setupElementsVisibility();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue