File tree Expand file tree Collapse file tree
java/org/schabi/newpipe/player Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -459,7 +459,7 @@ public void onClick(View view) {
459459 if (view .getId () == repeatButton .getId ()) {
460460 player .onRepeatClicked ();
461461
462- } else if (view .getId () == backwardButton .getId ()) {
462+ } else if (view .getId () == backwardButton .getId ()) {
463463 player .onPlayPrevious ();
464464
465465 } else if (view .getId () == playPauseButton .getId ()) {
@@ -694,6 +694,12 @@ private void onMaybePlaybackAdapterChanged() {
694694 private void onMaybeMuteChanged () {
695695 if (menu != null && player != null ) {
696696 MenuItem item = menu .findItem (R .id .action_mute );
697+
698+ //Change the mute-button item in ActionBar
699+ //1) Text change:
700+ item .setTitle (player .isMuted () ? R .string .unmute : R .string .mute );
701+
702+ //2) Icon change accordingly to current App Theme
697703 TypedArray a = getTheme ().obtainStyledAttributes (R .style .Theme_AppCompat , new int []{R .attr .volume_off });
698704 int attributeResourceId = a .getResourceId (0 , 0 );
699705 Drawable drawableMuted = getResources ().getDrawable (attributeResourceId );
Original file line number Diff line number Diff line change 449449 <string name =" playlist_name_input" >Name</string >
450450 <string name =" append_playlist" >Add To Playlist</string >
451451 <string name =" mute" >Mute</string >
452+ <string name =" unmute" >Unmute</string >
452453 <string name =" set_as_playlist_thumbnail" >Set as Playlist Thumbnail</string >
453454 <string name =" bookmark_playlist" >Bookmark Playlist</string >
454455 <string name =" unbookmark_playlist" >Remove Bookmark</string >
You can’t perform that action at this time.
0 commit comments