Created
November 18, 2016 19:52
-
-
Save yusufcakmak/6a97ec8c0a9f8b088a9e7662c2b75e75 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void updatePlayPauseButton() { | |
if (!isVisible() || !isAttachedToWindow) { | |
return; | |
} | |
boolean playing = player != null && player.getPlayWhenReady(); | |
String contentDescription = getResources().getString( | |
playing ? com.google.android.exoplayer2.R.string.exo_controls_pause_description : com.google.android.exoplayer2.R.string.exo_controls_play_description); | |
playButton.setContentDescription(contentDescription); | |
playButton.setImageResource( | |
playing ? R.drawable.pausecontrol : R.drawable.playcontrol); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment