Fix pause used instead of play in paused popup player when seeking
Also use `setBackgroundResource` to automatically obtain PNG drawables (from exoplayer)
This commit is contained in:
parent
158727e2f2
commit
883bcc735d
1 changed files with 4 additions and 8 deletions
|
@ -905,8 +905,7 @@ public final class PopupVideoPlayer extends Service {
|
||||||
resetNotification();
|
resetNotification();
|
||||||
updateNotification(R.drawable.exo_controls_pause);
|
updateNotification(R.drawable.exo_controls_pause);
|
||||||
|
|
||||||
videoPlayPause.setBackground(AppCompatResources.getDrawable(getApplicationContext(),
|
videoPlayPause.setBackgroundResource(R.drawable.exo_controls_pause);
|
||||||
R.drawable.ic_pause_white_24dp));
|
|
||||||
hideControls(DEFAULT_CONTROLS_DURATION, DEFAULT_CONTROLS_HIDE_TIME);
|
hideControls(DEFAULT_CONTROLS_DURATION, DEFAULT_CONTROLS_HIDE_TIME);
|
||||||
|
|
||||||
startForeground(NOTIFICATION_ID, notBuilder.build());
|
startForeground(NOTIFICATION_ID, notBuilder.build());
|
||||||
|
@ -927,8 +926,7 @@ public final class PopupVideoPlayer extends Service {
|
||||||
|
|
||||||
resetNotification();
|
resetNotification();
|
||||||
updateNotification(R.drawable.exo_controls_play);
|
updateNotification(R.drawable.exo_controls_play);
|
||||||
videoPlayPause.setBackground(AppCompatResources.getDrawable(getApplicationContext(),
|
videoPlayPause.setBackgroundResource(R.drawable.exo_controls_play);
|
||||||
R.drawable.ic_play_arrow_white_24dp));
|
|
||||||
|
|
||||||
stopForeground(false);
|
stopForeground(false);
|
||||||
}
|
}
|
||||||
|
@ -939,8 +937,7 @@ public final class PopupVideoPlayer extends Service {
|
||||||
resetNotification();
|
resetNotification();
|
||||||
updateNotification(R.drawable.exo_controls_play);
|
updateNotification(R.drawable.exo_controls_play);
|
||||||
|
|
||||||
videoPlayPause.setBackground(AppCompatResources.getDrawable(getApplicationContext(),
|
videoPlayPause.setBackgroundResource(R.drawable.exo_controls_play);
|
||||||
R.drawable.ic_pause_white_24dp));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -951,8 +948,7 @@ public final class PopupVideoPlayer extends Service {
|
||||||
|
|
||||||
resetNotification();
|
resetNotification();
|
||||||
updateNotification(R.drawable.ic_replay_white_24dp);
|
updateNotification(R.drawable.ic_replay_white_24dp);
|
||||||
videoPlayPause.setBackground(AppCompatResources.getDrawable(getApplicationContext(),
|
videoPlayPause.setBackgroundResource(R.drawable.ic_replay_white_24dp);
|
||||||
R.drawable.ic_replay_white_24dp));
|
|
||||||
|
|
||||||
stopForeground(false);
|
stopForeground(false);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue