diff --git a/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java
index 5310570c8..a83acd476 100644
--- a/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java
+++ b/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java
@@ -570,10 +570,6 @@ public class VideoDetailFragment
@Override
public void onClick(final View v) {
- if (isLoading.get() || currentInfo == null) {
- return;
- }
-
switch (v.getId()) {
case R.id.detail_controls_background:
openBackgroundPlayer(false);
@@ -2168,6 +2164,7 @@ public class VideoDetailFragment
@Override
public void onStateChanged(@NonNull final View bottomSheet, final int newState) {
bottomSheetState = newState;
+ ViewGroup mainFragment = requireActivity().findViewById(R.id.fragment_holder);
switch (newState) {
case BottomSheetBehavior.STATE_HIDDEN:
@@ -2175,6 +2172,7 @@ public class VideoDetailFragment
cleanUp();
break;
case BottomSheetBehavior.STATE_EXPANDED:
+ mainFragment.setDescendantFocusability(ViewGroup.FOCUS_BLOCK_DESCENDANTS);
bottomSheetBehavior.setPeekHeight(peekHeight);
// Disable click because overlay buttons located on top of buttons
// from the player
@@ -2191,6 +2189,8 @@ public class VideoDetailFragment
}
break;
case BottomSheetBehavior.STATE_COLLAPSED:
+ mainFragment.setDescendantFocusability(ViewGroup.FOCUS_AFTER_DESCENDANTS);
+ mainFragment.requestFocus();
// Re-enable clicks
setOverlayElementsClickable(true);
if (player != null) {
@@ -2236,7 +2236,7 @@ public class VideoDetailFragment
}
private void setOverlayPlayPauseImage() {
- final int attr = player != null && player.getPlayer().getPlayWhenReady()
+ final int attr = player != null && player.isPlaying()
? R.attr.ic_pause
: R.attr.ic_play_arrow;
overlayPlayPauseButton.setImageResource(
diff --git a/app/src/main/java/org/schabi/newpipe/player/VideoPlayer.java b/app/src/main/java/org/schabi/newpipe/player/VideoPlayer.java
index 51f9f3ca2..e621f9f33 100644
--- a/app/src/main/java/org/schabi/newpipe/player/VideoPlayer.java
+++ b/app/src/main/java/org/schabi/newpipe/player/VideoPlayer.java
@@ -204,7 +204,7 @@ public abstract class VideoPlayer extends BasePlayer
final CaptionStyleCompat captionStyle = PlayerHelper.getCaptionStyle(context);
setupSubtitleView(subtitleView, captionScale, captionStyle);
- this.resizeView = view.findViewById(R.id.resizeTextView);
+ this.resizeView = view.findViewById(R.id.resizeTextView);
resizeView.setText(PlayerHelper
.resizeTypeOf(context, getSurfaceView().getResizeMode()));
diff --git a/app/src/main/java/org/schabi/newpipe/player/VideoPlayerImpl.java b/app/src/main/java/org/schabi/newpipe/player/VideoPlayerImpl.java
index fd3f38ab7..4eea23a0b 100644
--- a/app/src/main/java/org/schabi/newpipe/player/VideoPlayerImpl.java
+++ b/app/src/main/java/org/schabi/newpipe/player/VideoPlayerImpl.java
@@ -22,8 +22,6 @@ package org.schabi.newpipe.player;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.annotation.SuppressLint;
-import android.content.Context;
-import android.content.DialogInterface;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.SharedPreferences;
@@ -60,7 +58,6 @@ import android.widget.SeekBar;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
-import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.content.res.AppCompatResources;
import androidx.recyclerview.widget.ItemTouchHelper;
@@ -892,7 +889,7 @@ public class VideoPlayerImpl extends VideoPlayer
if (DEBUG) {
Log.i(TAG, "Failed to start kore", e);
}
- showInstallKoreDialog(getParentActivity());
+ KoreUtil.showInstallKoreDialog(getParentActivity());
}
}
@@ -917,16 +914,6 @@ public class VideoPlayerImpl extends VideoPlayer
? View.VISIBLE : View.GONE);
}
- private static void showInstallKoreDialog(final Context context) {
- final AlertDialog.Builder builder = new AlertDialog.Builder(context);
- builder.setMessage(R.string.kore_not_found)
- .setPositiveButton(R.string.install, (DialogInterface dialog, int which) ->
- NavigationHelper.installKore(context))
- .setNegativeButton(R.string.cancel, (DialogInterface dialog, int which) -> {
- });
- builder.create().show();
- }
-
private void setupScreenRotationButton() {
final boolean orientationLocked = PlayerHelper.globalScreenOrientationLocked(service);
final boolean tabletInLandscape = DeviceUtils.isTablet(service) && service.isLandscape();
diff --git a/app/src/main/res/drawable/ic_list_black_24dp.xml b/app/src/main/res/drawable/ic_list_black_24dp.xml
index 7020c1c56..4c2fb8834 100644
--- a/app/src/main/res/drawable/ic_list_black_24dp.xml
+++ b/app/src/main/res/drawable/ic_list_black_24dp.xml
@@ -1,8 +1,9 @@
-
+ android:viewportWidth="24.0"
+ android:viewportHeight="24.0">
+
diff --git a/app/src/main/res/drawable/ic_list_white_24dp.xml b/app/src/main/res/drawable/ic_list_white_24dp.xml
index c9ae06017..f47037629 100644
--- a/app/src/main/res/drawable/ic_list_white_24dp.xml
+++ b/app/src/main/res/drawable/ic_list_white_24dp.xml
@@ -1,9 +1,5 @@
-
-
+
+
diff --git a/app/src/main/res/layout-large-land/activity_main_player.xml b/app/src/main/res/layout-large-land/activity_main_player.xml
index 92288933b..91627f2d4 100644
--- a/app/src/main/res/layout-large-land/activity_main_player.xml
+++ b/app/src/main/res/layout-large-land/activity_main_player.xml
@@ -247,9 +247,12 @@
-
-
-
+ android:layout_height="match_parent">
+
-
-
-
+ android:id="@+id/fragment_player_holder"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_gravity="center_horizontal"
+ app:behavior_hideable="true"
+ app:behavior_peekHeight="0dp"
+ app:layout_behavior="org.schabi.newpipe.player.event.CustomBottomSheetBehavior">
-
-
+
diff --git a/app/src/main/res/layout/activity_main_player.xml b/app/src/main/res/layout/activity_main_player.xml
index e4a1e7c0c..fabb46bcc 100644
--- a/app/src/main/res/layout/activity_main_player.xml
+++ b/app/src/main/res/layout/activity_main_player.xml
@@ -250,9 +250,12 @@
-
Use fast inexact seek
Inexact seek allows the player to seek to positions faster with reduced precision. Seeking for 5, 15 or 25 seconds doesn\'t work with this.
Fast-forward/-rewind seek duration
- Ask confirmation before clearing a queue
+ Ask for confirmation before clearing a queue
After switching from one player to another your queue may be replaced
Queue from the active player will be replaced
Load thumbnails