Fix Dark elements in Light Theme
This commit is contained in:
parent
1d51002173
commit
fd14c8cdce
288 changed files with 327 additions and 560 deletions
|
|
@ -50,11 +50,11 @@ public final class NotificationConstants {
|
|||
R.drawable.exo_icon_fastforward,
|
||||
R.drawable.exo_icon_previous,
|
||||
R.drawable.exo_icon_next,
|
||||
R.drawable.ic_pause_white_24dp,
|
||||
R.drawable.ic_hourglass_top_white_24dp,
|
||||
R.drawable.ic_pause,
|
||||
R.drawable.ic_hourglass_top,
|
||||
R.drawable.exo_icon_repeat_all,
|
||||
R.drawable.exo_icon_shuffle_on,
|
||||
R.drawable.ic_close_white_24dp,
|
||||
R.drawable.ic_close,
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -273,14 +273,14 @@ public final class NotificationUtil {
|
|||
|| player.getCurrentState() == Player.STATE_BLOCKED
|
||||
|| player.getCurrentState() == Player.STATE_BUFFERING) {
|
||||
// null intent -> show hourglass icon that does nothing when clicked
|
||||
return new NotificationCompat.Action(R.drawable.ic_hourglass_top_white_24dp_png,
|
||||
return new NotificationCompat.Action(R.drawable.ic_hourglass_top,
|
||||
player.getContext().getString(R.string.notification_action_buffering),
|
||||
null);
|
||||
}
|
||||
|
||||
case NotificationConstants.PLAY_PAUSE:
|
||||
if (player.getCurrentState() == Player.STATE_COMPLETED) {
|
||||
return getAction(player, R.drawable.ic_replay_white_24dp_png,
|
||||
return getAction(player, R.drawable.ic_replay,
|
||||
R.string.exo_controls_pause_description, ACTION_PLAY_PAUSE);
|
||||
} else if (player.isPlaying()
|
||||
|| player.getCurrentState() == Player.STATE_PREFLIGHT
|
||||
|
|
@ -315,7 +315,7 @@ public final class NotificationUtil {
|
|||
}
|
||||
|
||||
case NotificationConstants.CLOSE:
|
||||
return getAction(player, R.drawable.ic_close_white_24dp_png,
|
||||
return getAction(player, R.drawable.ic_close,
|
||||
R.string.close, ACTION_CLOSE);
|
||||
|
||||
case NotificationConstants.NOTHING:
|
||||
|
|
|
|||
|
|
@ -589,15 +589,15 @@ public final class PlayQueueActivity extends AppCompatActivity
|
|||
switch (state) {
|
||||
case Player.STATE_PAUSED:
|
||||
queueControlBinding.controlPlayPause
|
||||
.setImageResource(R.drawable.ic_play_arrow_white_24dp);
|
||||
.setImageResource(R.drawable.ic_play_arrow);
|
||||
break;
|
||||
case Player.STATE_PLAYING:
|
||||
queueControlBinding.controlPlayPause
|
||||
.setImageResource(R.drawable.ic_pause_white_24dp);
|
||||
.setImageResource(R.drawable.ic_pause);
|
||||
break;
|
||||
case Player.STATE_COMPLETED:
|
||||
queueControlBinding.controlPlayPause
|
||||
.setImageResource(R.drawable.ic_replay_white_24dp);
|
||||
.setImageResource(R.drawable.ic_replay);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
@ -670,8 +670,7 @@ public final class PlayQueueActivity extends AppCompatActivity
|
|||
//2) Icon change accordingly to current App Theme
|
||||
// using rootView.getContext() because getApplicationContext() didn't work
|
||||
final Context context = queueControlBinding.getRoot().getContext();
|
||||
item.setIcon(ThemeHelper.resolveResourceIdFromAttr(context,
|
||||
player.isMuted() ? R.attr.ic_volume_off : R.attr.ic_volume_up));
|
||||
item.setIcon(player.isMuted() ? R.drawable.ic_volume_off : R.drawable.ic_volume_up);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -957,7 +957,7 @@ public final class Player implements
|
|||
= LinearLayout.LayoutParams.MATCH_PARENT;
|
||||
binding.secondaryControls.setVisibility(View.INVISIBLE);
|
||||
binding.moreOptionsButton.setImageDrawable(AppCompatResources.getDrawable(context,
|
||||
R.drawable.ic_expand_more_white_24dp));
|
||||
R.drawable.ic_expand_more));
|
||||
binding.share.setVisibility(View.VISIBLE);
|
||||
binding.openInBrowser.setVisibility(View.VISIBLE);
|
||||
binding.switchMute.setVisibility(View.VISIBLE);
|
||||
|
|
@ -2020,7 +2020,7 @@ public final class Player implements
|
|||
animate(binding.loadingPanel, true, 0);
|
||||
animate(binding.surfaceForeground, true, 100);
|
||||
|
||||
binding.playPauseButton.setImageResource(R.drawable.ic_play_arrow_white_24dp);
|
||||
binding.playPauseButton.setImageResource(R.drawable.ic_play_arrow);
|
||||
animatePlayButtons(false, 100);
|
||||
binding.getRoot().setKeepScreenOn(false);
|
||||
|
||||
|
|
@ -2049,7 +2049,7 @@ public final class Player implements
|
|||
|
||||
animate(binding.playPauseButton, false, 80, AnimationType.SCALE_AND_ALPHA, 0,
|
||||
() -> {
|
||||
binding.playPauseButton.setImageResource(R.drawable.ic_pause_white_24dp);
|
||||
binding.playPauseButton.setImageResource(R.drawable.ic_pause);
|
||||
animatePlayButtons(true, 200);
|
||||
if (!isQueueVisible) {
|
||||
binding.playPauseButton.requestFocus();
|
||||
|
|
@ -2090,7 +2090,7 @@ public final class Player implements
|
|||
|
||||
animate(binding.playPauseButton, false, 80, AnimationType.SCALE_AND_ALPHA, 0,
|
||||
() -> {
|
||||
binding.playPauseButton.setImageResource(R.drawable.ic_play_arrow_white_24dp);
|
||||
binding.playPauseButton.setImageResource(R.drawable.ic_play_arrow);
|
||||
animatePlayButtons(true, 200);
|
||||
if (!isQueueVisible) {
|
||||
binding.playPauseButton.requestFocus();
|
||||
|
|
@ -2129,7 +2129,7 @@ public final class Player implements
|
|||
|
||||
animate(binding.playPauseButton, false, 0, AnimationType.SCALE_AND_ALPHA, 0,
|
||||
() -> {
|
||||
binding.playPauseButton.setImageResource(R.drawable.ic_replay_white_24dp);
|
||||
binding.playPauseButton.setImageResource(R.drawable.ic_replay);
|
||||
animatePlayButtons(true, DEFAULT_CONTROLS_DURATION);
|
||||
});
|
||||
|
||||
|
|
@ -2290,7 +2290,7 @@ public final class Player implements
|
|||
|
||||
private void setMuteButton(final ImageButton button, final boolean isMuted) {
|
||||
button.setImageDrawable(AppCompatResources.getDrawable(context, isMuted
|
||||
? R.drawable.ic_volume_off_white_24dp : R.drawable.ic_volume_up_white_24dp));
|
||||
? R.drawable.ic_volume_off : R.drawable.ic_volume_up));
|
||||
}
|
||||
//endregion
|
||||
|
||||
|
|
@ -2734,7 +2734,7 @@ public final class Player implements
|
|||
}
|
||||
seekBy(retrieveSeekDurationFromPreferences(this));
|
||||
triggerProgressUpdate();
|
||||
showAndAnimateControl(R.drawable.ic_fast_forward_white_24dp, true);
|
||||
showAndAnimateControl(R.drawable.ic_fast_forward, true);
|
||||
}
|
||||
|
||||
public void fastRewind() {
|
||||
|
|
@ -2743,7 +2743,7 @@ public final class Player implements
|
|||
}
|
||||
seekBy(-retrieveSeekDurationFromPreferences(this));
|
||||
triggerProgressUpdate();
|
||||
showAndAnimateControl(R.drawable.ic_fast_rewind_white_24dp, true);
|
||||
showAndAnimateControl(R.drawable.ic_fast_rewind, true);
|
||||
}
|
||||
//endregion
|
||||
|
||||
|
|
@ -3691,8 +3691,8 @@ public final class Player implements
|
|||
|| DeviceUtils.isTablet(context))
|
||||
? View.VISIBLE : View.GONE);
|
||||
binding.screenRotationButton.setImageDrawable(AppCompatResources.getDrawable(context,
|
||||
isFullscreen ? R.drawable.ic_fullscreen_exit_white_24dp
|
||||
: R.drawable.ic_fullscreen_white_24dp));
|
||||
isFullscreen ? R.drawable.ic_fullscreen_exit
|
||||
: R.drawable.ic_fullscreen));
|
||||
}
|
||||
|
||||
private void setResizeMode(@AspectRatioFrameLayout.ResizeMode final int resizeMode) {
|
||||
|
|
|
|||
|
|
@ -147,10 +147,10 @@ public class PlayerGestureListener
|
|||
|
||||
player.getVolumeImageView().setImageDrawable(
|
||||
AppCompatResources.getDrawable(service, currentProgressPercent <= 0
|
||||
? R.drawable.ic_volume_off_white_24dp
|
||||
: currentProgressPercent < 0.25 ? R.drawable.ic_volume_mute_white_24dp
|
||||
: currentProgressPercent < 0.75 ? R.drawable.ic_volume_down_white_24dp
|
||||
: R.drawable.ic_volume_up_white_24dp)
|
||||
? R.drawable.ic_volume_off
|
||||
: currentProgressPercent < 0.25 ? R.drawable.ic_volume_mute
|
||||
: currentProgressPercent < 0.75 ? R.drawable.ic_volume_down
|
||||
: R.drawable.ic_volume_up)
|
||||
);
|
||||
|
||||
if (player.getVolumeRelativeLayout().getVisibility() != View.VISIBLE) {
|
||||
|
|
@ -189,10 +189,10 @@ public class PlayerGestureListener
|
|||
player.getBrightnessImageView().setImageDrawable(
|
||||
AppCompatResources.getDrawable(service,
|
||||
currentProgressPercent < 0.25
|
||||
? R.drawable.ic_brightness_low_white_24dp
|
||||
? R.drawable.ic_brightness_low
|
||||
: currentProgressPercent < 0.75
|
||||
? R.drawable.ic_brightness_medium_white_24dp
|
||||
: R.drawable.ic_brightness_high_white_24dp)
|
||||
? R.drawable.ic_brightness_medium
|
||||
: R.drawable.ic_brightness_high)
|
||||
);
|
||||
|
||||
if (player.getBrightnessRelativeLayout().getVisibility() != View.VISIBLE) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue