icon change implemented in queque
This commit is contained in:
parent
2a63f2a3a6
commit
c4d5886059
|
@ -398,6 +398,12 @@ public final class BackgroundPlayer extends Service {
|
|||
updatePlayback();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMuteUnmuteButtonClicled() {
|
||||
super.onMuteUnmuteButtonClicled();
|
||||
updatePlayback();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdateProgress(int currentProgress, int duration, int bufferPercent) {
|
||||
updateProgress(currentProgress, duration, bufferPercent);
|
||||
|
|
|
@ -607,6 +607,12 @@ public final class PopupVideoPlayer extends Service {
|
|||
updatePlayback();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMuteUnmuteButtonClicled() {
|
||||
super.onMuteUnmuteButtonClicled();
|
||||
updatePlayback();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdateProgress(int currentProgress, int duration, int bufferPercent) {
|
||||
updateProgress(currentProgress, duration, bufferPercent);
|
||||
|
|
|
@ -7,6 +7,7 @@ import android.os.Bundle;
|
|||
import android.os.IBinder;
|
||||
import android.provider.Settings;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
|
@ -22,6 +23,7 @@ import android.widget.PopupMenu;
|
|||
import android.widget.ProgressBar;
|
||||
import android.widget.SeekBar;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.google.android.exoplayer2.PlaybackParameters;
|
||||
import com.google.android.exoplayer2.Player;
|
||||
|
@ -560,6 +562,7 @@ public abstract class ServicePlayerActivity extends AppCompatActivity
|
|||
onPlayModeChanged(repeatMode, shuffled);
|
||||
onPlaybackParameterChanged(parameters);
|
||||
onMaybePlaybackAdapterChanged();
|
||||
onMaybeMuteChanged();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -682,4 +685,13 @@ public abstract class ServicePlayerActivity extends AppCompatActivity
|
|||
itemsList.setAdapter(maybeNewAdapter);
|
||||
}
|
||||
}
|
||||
|
||||
private void onMaybeMuteChanged(){
|
||||
if (player.isMuted()) {
|
||||
muteButton.setColorFilter(ContextCompat.getColor(getApplicationContext(), R.color.white));
|
||||
}
|
||||
else {
|
||||
muteButton.setColorFilter(ContextCompat.getColor(getApplicationContext(), R.color.gray));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue