Fix pause button is not focused on player control activation
This commit is contained in:
parent
aa1cc32d17
commit
0ec22c7a6e
|
@ -246,6 +246,7 @@ public final class MainVideoPlayer extends AppCompatActivity
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!playerImpl.isControlsVisible()) {
|
if (!playerImpl.isControlsVisible()) {
|
||||||
|
playerImpl.playPauseButton.requestFocus();
|
||||||
playerImpl.showControlsThenHide();
|
playerImpl.showControlsThenHide();
|
||||||
showSystemUi();
|
showSystemUi();
|
||||||
return true;
|
return true;
|
||||||
|
@ -1002,6 +1003,7 @@ public final class MainVideoPlayer extends AppCompatActivity
|
||||||
animateView(playPauseButton, AnimationUtils.Type.SCALE_AND_ALPHA, false, 80, 0, () -> {
|
animateView(playPauseButton, AnimationUtils.Type.SCALE_AND_ALPHA, false, 80, 0, () -> {
|
||||||
playPauseButton.setImageResource(R.drawable.ic_pause_white);
|
playPauseButton.setImageResource(R.drawable.ic_pause_white);
|
||||||
animatePlayButtons(true, 200);
|
animatePlayButtons(true, 200);
|
||||||
|
playPauseButton.requestFocus();
|
||||||
animateView(closeButton, false, DEFAULT_CONTROLS_DURATION);
|
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, () -> {
|
animateView(playPauseButton, AnimationUtils.Type.SCALE_AND_ALPHA, false, 80, 0, () -> {
|
||||||
playPauseButton.setImageResource(R.drawable.ic_play_arrow_white);
|
playPauseButton.setImageResource(R.drawable.ic_play_arrow_white);
|
||||||
animatePlayButtons(true, 200);
|
animatePlayButtons(true, 200);
|
||||||
|
playPauseButton.requestFocus();
|
||||||
animateView(closeButton, false, DEFAULT_CONTROLS_DURATION);
|
animateView(closeButton, false, DEFAULT_CONTROLS_DURATION);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -1294,6 +1297,7 @@ public final class MainVideoPlayer extends AppCompatActivity
|
||||||
if (playerImpl.isControlsVisible()) {
|
if (playerImpl.isControlsVisible()) {
|
||||||
playerImpl.hideControls(150, 0);
|
playerImpl.hideControls(150, 0);
|
||||||
} else {
|
} else {
|
||||||
|
playerImpl.playPauseButton.requestFocus();
|
||||||
playerImpl.showControlsThenHide();
|
playerImpl.showControlsThenHide();
|
||||||
showSystemUi();
|
showSystemUi();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue