Fix pause button is not focused on player control activation
This commit is contained in:
parent
aa1cc32d17
commit
0ec22c7a6e
1 changed files with 4 additions and 0 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue