player.xml: Rename fullscreen buttons
Their names must have come from a very old version of the app, they both toggle the fullscreen mode and rotate the screen depending on circumstances. So `fullscreenButton` -> `fullscreenToggleButtonSecondaryMenu` because it is only visible in the secondary video menu on some configurations. and `screenRotationButton` -> `fullscreenToggleButton` because it is the main fullscreen button next to the video progress bar.
This commit is contained in:
parent
b2d89a41fb
commit
753a3e68d5
@ -154,7 +154,7 @@ public final class MainPlayerUi extends VideoPlayerUi implements View.OnLayoutCh
|
||||
protected void initListeners() {
|
||||
super.initListeners();
|
||||
|
||||
binding.screenRotationButton.setOnClickListener(makeOnClickListener(() -> {
|
||||
binding.fullscreenToggleButton.setOnClickListener(makeOnClickListener(() -> {
|
||||
// Only if it's not a vertical video or vertical video but in landscape with locked
|
||||
// orientation a screen orientation can be changed automatically
|
||||
if (!isVerticalVideo || (isLandscape() && globalScreenOrientationLocked(context))) {
|
||||
@ -270,7 +270,7 @@ public final class MainPlayerUi extends VideoPlayerUi implements View.OnLayoutCh
|
||||
|
||||
closeItemsList();
|
||||
showHideKodiButton();
|
||||
binding.fullScreenButton.setVisibility(View.GONE);
|
||||
binding.fullscreenToggleButtonSecondaryMenu.setVisibility(View.GONE);
|
||||
setupScreenRotationButton();
|
||||
binding.resizeTextView.setVisibility(View.VISIBLE);
|
||||
binding.getRoot().findViewById(R.id.metadataView).setVisibility(View.VISIBLE);
|
||||
@ -885,10 +885,10 @@ public final class MainPlayerUi extends VideoPlayerUi implements View.OnLayoutCh
|
||||
//region Video size, orientation, fullscreen
|
||||
|
||||
private void setupScreenRotationButton() {
|
||||
binding.screenRotationButton.setVisibility(globalScreenOrientationLocked(context)
|
||||
binding.fullscreenToggleButton.setVisibility(globalScreenOrientationLocked(context)
|
||||
|| isVerticalVideo || DeviceUtils.isTablet(context)
|
||||
? View.VISIBLE : View.GONE);
|
||||
binding.screenRotationButton.setImageDrawable(AppCompatResources.getDrawable(context,
|
||||
binding.fullscreenToggleButton.setImageDrawable(AppCompatResources.getDrawable(context,
|
||||
isFullscreen ? R.drawable.ic_fullscreen_exit
|
||||
: R.drawable.ic_fullscreen));
|
||||
}
|
||||
|
||||
@ -153,8 +153,8 @@ public final class PopupPlayerUi extends VideoPlayerUi {
|
||||
|
||||
@Override
|
||||
protected void setupElementsVisibility() {
|
||||
binding.fullScreenButton.setVisibility(View.VISIBLE);
|
||||
binding.screenRotationButton.setVisibility(View.GONE);
|
||||
binding.fullscreenToggleButtonSecondaryMenu.setVisibility(View.VISIBLE);
|
||||
binding.fullscreenToggleButton.setVisibility(View.GONE);
|
||||
binding.resizeTextView.setVisibility(View.GONE);
|
||||
binding.getRoot().findViewById(R.id.metadataView).setVisibility(View.GONE);
|
||||
binding.queueButton.setVisibility(View.GONE);
|
||||
|
||||
@ -234,7 +234,7 @@ public abstract class VideoPlayerUi extends PlayerUi implements SeekBar.OnSeekBa
|
||||
ShareUtils.copyToClipboard(context, player.getVideoUrlAtCurrentTime());
|
||||
return true;
|
||||
});
|
||||
binding.fullScreenButton.setOnClickListener(makeOnClickListener(() -> {
|
||||
binding.fullscreenToggleButtonSecondaryMenu.setOnClickListener(makeOnClickListener(() -> {
|
||||
player.setRecovery();
|
||||
NavigationHelper.playOnMainPlayer(context,
|
||||
Objects.requireNonNull(player.getPlayQueue()), true);
|
||||
@ -301,8 +301,8 @@ public abstract class VideoPlayerUi extends PlayerUi implements SeekBar.OnSeekBa
|
||||
binding.moreOptionsButton.setOnLongClickListener(null);
|
||||
binding.share.setOnClickListener(null);
|
||||
binding.share.setOnLongClickListener(null);
|
||||
binding.fullScreenButton.setOnClickListener(null);
|
||||
binding.screenRotationButton.setOnClickListener(null);
|
||||
binding.fullscreenToggleButtonSecondaryMenu.setOnClickListener(null);
|
||||
binding.fullscreenToggleButton.setOnClickListener(null);
|
||||
binding.playWithKodi.setOnClickListener(null);
|
||||
binding.openInBrowser.setOnClickListener(null);
|
||||
binding.playerCloseButton.setOnClickListener(null);
|
||||
@ -1455,7 +1455,7 @@ public abstract class VideoPlayerUi extends PlayerUi implements SeekBar.OnSeekBa
|
||||
if (player.getCurrentState() == STATE_PLAYING && !isSomePopupMenuVisible) {
|
||||
if (v == binding.playPauseButton
|
||||
// Hide controls in fullscreen immediately
|
||||
|| (v == binding.screenRotationButton && isFullscreen())) {
|
||||
|| (v == binding.fullscreenToggleButton && isFullscreen())) {
|
||||
hideControls(0, 0);
|
||||
} else {
|
||||
hideControls(DEFAULT_CONTROLS_DURATION, DEFAULT_CONTROLS_HIDE_TIME);
|
||||
|
||||
@ -363,7 +363,7 @@
|
||||
tools:ignore="RtlHardcoded" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageButton
|
||||
android:id="@+id/fullScreenButton"
|
||||
android:id="@+id/fullscreenToggleButtonSecondaryMenu"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
@ -457,7 +457,7 @@
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="2dp"
|
||||
android:layout_weight="1"
|
||||
android:nextFocusDown="@id/screenRotationButton"
|
||||
android:nextFocusDown="@id/fullscreenToggleButton"
|
||||
tools:progress="25"
|
||||
tools:secondaryProgress="50" />
|
||||
|
||||
@ -486,7 +486,7 @@
|
||||
tools:ignore="HardcodedText,RtlHardcoded,RtlSymmetry" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageButton
|
||||
android:id="@+id/screenRotationButton"
|
||||
android:id="@+id/fullscreenToggleButton"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginStart="4dp"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user