Skip to content

Commit 2a9c6f0

Browse files
authored
Merge pull request #12729 from litetex/workaround-popup-player-ui-elements-being-pushed-out
2 parents ecd3e85 + c81148a commit 2a9c6f0

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,9 @@ protected void setupElementsVisibility() {
290290
binding.topControls.setFocusable(true);
291291

292292
binding.metadataView.setVisibility(isFullscreen ? View.VISIBLE : View.GONE);
293+
294+
// Reset workaround changes from popup player
295+
binding.audioTrackTextView.setMaxWidth(Integer.MAX_VALUE);
293296
}
294297

295298
@Override

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
import org.schabi.newpipe.player.gesture.BasePlayerGestureListener;
4141
import org.schabi.newpipe.player.gesture.PopupPlayerGestureListener;
4242
import org.schabi.newpipe.player.helper.PlayerHelper;
43+
import org.schabi.newpipe.util.DeviceUtils;
4344

4445
public final class PopupPlayerUi extends VideoPlayerUi {
4546
private static final String TAG = PopupPlayerUi.class.getSimpleName();
@@ -174,6 +175,8 @@ protected void setupElementsVisibility() {
174175
binding.topControls.setClickable(false);
175176
binding.topControls.setFocusable(false);
176177
binding.bottomControls.bringToFront();
178+
// Workaround that UI elements are pushed off screen
179+
binding.audioTrackTextView.setMaxWidth(DeviceUtils.dpToPx(48, context));
177180
super.setupElementsVisibility();
178181
}
179182

0 commit comments

Comments
 (0)