1
0
mirror of https://github.com/TeamNewPipe/NewPipe synced 2024-11-15 22:46:53 +01:00

Fix pause button is not focused on player control activation

This commit is contained in:
Stypox 2020-04-20 21:11:56 +02:00
parent aa1cc32d17
commit 0ec22c7a6e
No known key found for this signature in database
GPG Key ID: 4BDF1B40A49FDD23

View File

@ -246,6 +246,7 @@ public final class MainVideoPlayer extends AppCompatActivity
}
if (!playerImpl.isControlsVisible()) {
playerImpl.playPauseButton.requestFocus();
playerImpl.showControlsThenHide();
showSystemUi();
return true;
@ -1002,6 +1003,7 @@ public final class MainVideoPlayer extends AppCompatActivity
animateView(playPauseButton, AnimationUtils.Type.SCALE_AND_ALPHA, false, 80, 0, () -> {
playPauseButton.setImageResource(R.drawable.ic_pause_white);
animatePlayButtons(true, 200);
playPauseButton.requestFocus();
animateView(closeButton, false, DEFAULT_CONTROLS_DURATION);
});
@ -1014,6 +1016,7 @@ public final class MainVideoPlayer extends AppCompatActivity
animateView(playPauseButton, AnimationUtils.Type.SCALE_AND_ALPHA, false, 80, 0, () -> {
playPauseButton.setImageResource(R.drawable.ic_play_arrow_white);
animatePlayButtons(true, 200);
playPauseButton.requestFocus();
animateView(closeButton, false, DEFAULT_CONTROLS_DURATION);
});
@ -1294,6 +1297,7 @@ public final class MainVideoPlayer extends AppCompatActivity
if (playerImpl.isControlsVisible()) {
playerImpl.hideControls(150, 0);
} else {
playerImpl.playPauseButton.requestFocus();
playerImpl.showControlsThenHide();
showSystemUi();
}