Switched to vector drawables.
This commit is contained in:
parent
d2f62e868f
commit
906d0f504a
350 changed files with 561 additions and 209 deletions
|
|
@ -296,7 +296,7 @@ public class AlbumDetailActivity extends AbsSlidingMusicPanelActivity implements
|
|||
if (cab != null && cab.isActive()) cab.finish();
|
||||
cab = new MaterialCab(this, R.id.cab_stub)
|
||||
.setMenu(menuRes)
|
||||
.setCloseDrawableRes(R.drawable.ic_close_white_24dp)
|
||||
.setCloseDrawableRes(R.drawable.ic_close_black_24dp)
|
||||
.setBackgroundColor(PhonographColorUtil.shiftBackgroundColorForLightText(getPaletteColor()))
|
||||
.start(new MaterialCab.Callback() {
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -382,7 +382,7 @@ public class ArtistDetailActivity extends AbsSlidingMusicPanelActivity implement
|
|||
if (cab != null && cab.isActive()) cab.finish();
|
||||
cab = new MaterialCab(this, R.id.cab_stub)
|
||||
.setMenu(menuRes)
|
||||
.setCloseDrawableRes(R.drawable.ic_close_white_24dp)
|
||||
.setCloseDrawableRes(R.drawable.ic_close_black_24dp)
|
||||
.setBackgroundColor(PhonographColorUtil.shiftBackgroundColorForLightText(getPaletteColor()))
|
||||
.start(new MaterialCab.Callback() {
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -179,7 +179,7 @@ public class MainActivity extends AbsSlidingMusicPanelActivity
|
|||
int primaryColor = ThemeStore.primaryColor(this);
|
||||
appbar.setBackgroundColor(primaryColor);
|
||||
toolbar.setBackgroundColor(primaryColor);
|
||||
toolbar.setNavigationIcon(R.drawable.ic_menu_white_24dp);
|
||||
toolbar.setNavigationIcon(R.drawable.ic_menu_black_24dp);
|
||||
setTitle(getResources().getString(R.string.app_name));
|
||||
setSupportActionBar(toolbar);
|
||||
}
|
||||
|
|
@ -544,7 +544,7 @@ public class MainActivity extends AbsSlidingMusicPanelActivity
|
|||
if (cab != null && cab.isActive()) cab.finish();
|
||||
cab = new MaterialCab(this, R.id.cab_stub)
|
||||
.setMenu(menu)
|
||||
.setCloseDrawableRes(R.drawable.ic_close_white_24dp)
|
||||
.setCloseDrawableRes(R.drawable.ic_close_black_24dp)
|
||||
.setBackgroundColor(PhonographColorUtil.shiftBackgroundColorForLightText(ThemeStore.primaryColor(this)))
|
||||
.start(callback);
|
||||
return cab;
|
||||
|
|
|
|||
|
|
@ -193,7 +193,7 @@ public class PlaylistDetailActivity extends AbsSlidingMusicPanelActivity impleme
|
|||
if (cab != null && cab.isActive()) cab.finish();
|
||||
cab = new MaterialCab(this, R.id.cab_stub)
|
||||
.setMenu(menu)
|
||||
.setCloseDrawableRes(R.drawable.ic_close_white_24dp)
|
||||
.setCloseDrawableRes(R.drawable.ic_close_black_24dp)
|
||||
.setBackgroundColor(PhonographColorUtil.shiftBackgroundColorForLightText(ThemeStore.primaryColor(this)))
|
||||
.start(callback);
|
||||
return cab;
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ public class AppIntroActivity extends com.heinrichreimersoftware.materialintro.a
|
|||
addSlide(new PhonographSimpleSlide.Builder()
|
||||
.title(R.string.label_storage)
|
||||
.description(R.string.storage_permission_explaination)
|
||||
.image(R.drawable.ic_folder_web)
|
||||
.image(R.drawable.ic_folder_black_24dp)
|
||||
.background(R.color.md_indigo_500)
|
||||
.backgroundDark(R.color.md_indigo_600)
|
||||
.build());
|
||||
|
|
|
|||
|
|
@ -167,9 +167,9 @@ public class PlaybackControlsFragment extends Fragment implements MusicServiceEv
|
|||
TintHelper.setTintAuto(playPauseFab, fabColor, true);
|
||||
|
||||
updatePlayPauseDrawableState(false);
|
||||
// Note: set the drawable AFTER TintHelper.setTintAuto() is called
|
||||
// Note: set the drawable AFTER TintHelper.setTintAuto() was called
|
||||
playPauseFab.setImageDrawable(playerFabPlayPauseDrawable);
|
||||
playPauseFab.getDrawable().mutate().setColorFilter(MaterialValueHelper.getPrimaryTextColor(getContext(), ColorUtil.isColorLight(fabColor)), PorterDuff.Mode.SRC_IN);
|
||||
playPauseFab.setColorFilter(MaterialValueHelper.getPrimaryTextColor(getContext(), ColorUtil.isColorLight(fabColor)), PorterDuff.Mode.SRC_IN);
|
||||
playPauseFab.setOnClickListener(new PlayPauseButtonOnClickHandler());
|
||||
playPauseFab.post(new Runnable() {
|
||||
@Override
|
||||
|
|
@ -224,9 +224,7 @@ public class PlaybackControlsFragment extends Fragment implements MusicServiceEv
|
|||
}
|
||||
|
||||
private void updatePrevNextColor() {
|
||||
nextButton.setImageResource(R.drawable.ic_skip_next_white_36dp);
|
||||
nextButton.setColorFilter(lastPlaybackControlsColor, PorterDuff.Mode.SRC_IN);
|
||||
prevButton.setImageResource(R.drawable.ic_skip_previous_white_36dp);
|
||||
prevButton.setColorFilter(lastPlaybackControlsColor, PorterDuff.Mode.SRC_IN);
|
||||
}
|
||||
|
||||
|
|
@ -243,11 +241,9 @@ public class PlaybackControlsFragment extends Fragment implements MusicServiceEv
|
|||
private void updateShuffleState() {
|
||||
switch (MusicPlayerRemote.getShuffleMode()) {
|
||||
case MusicService.SHUFFLE_MODE_SHUFFLE:
|
||||
shuffleButton.setImageResource(R.drawable.ic_shuffle_white_36dp);
|
||||
shuffleButton.setColorFilter(lastPlaybackControlsColor, PorterDuff.Mode.SRC_IN);
|
||||
break;
|
||||
default:
|
||||
shuffleButton.setImageResource(R.drawable.ic_shuffle_white_36dp);
|
||||
shuffleButton.setColorFilter(lastDisabledPlaybackControlsColor, PorterDuff.Mode.SRC_IN);
|
||||
break;
|
||||
}
|
||||
|
|
@ -266,15 +262,15 @@ public class PlaybackControlsFragment extends Fragment implements MusicServiceEv
|
|||
private void updateRepeatState() {
|
||||
switch (MusicPlayerRemote.getRepeatMode()) {
|
||||
case MusicService.REPEAT_MODE_NONE:
|
||||
repeatButton.setImageResource(R.drawable.ic_repeat_white_36dp);
|
||||
repeatButton.setImageResource(R.drawable.ic_repeat_black_24dp);
|
||||
repeatButton.setColorFilter(lastDisabledPlaybackControlsColor, PorterDuff.Mode.SRC_IN);
|
||||
break;
|
||||
case MusicService.REPEAT_MODE_ALL:
|
||||
repeatButton.setImageResource(R.drawable.ic_repeat_white_36dp);
|
||||
repeatButton.setImageResource(R.drawable.ic_repeat_black_24dp);
|
||||
repeatButton.setColorFilter(lastPlaybackControlsColor, PorterDuff.Mode.SRC_IN);
|
||||
break;
|
||||
case MusicService.REPEAT_MODE_THIS:
|
||||
repeatButton.setImageResource(R.drawable.ic_repeat_one_white_36dp);
|
||||
repeatButton.setImageResource(R.drawable.ic_repeat_one_black_24dp);
|
||||
repeatButton.setColorFilter(lastPlaybackControlsColor, PorterDuff.Mode.SRC_IN);
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package com.kabouzeid.gramophone.ui.fragments.player;
|
|||
import android.animation.Animator;
|
||||
import android.animation.AnimatorSet;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.PorterDuff;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
|
|
@ -194,7 +195,7 @@ public class PlayerFragment extends AbsPlayerFragment implements PlayerAlbumCove
|
|||
|
||||
private void setUpPlayerToolbar() {
|
||||
toolbar.inflateMenu(R.menu.menu_player);
|
||||
toolbar.setNavigationIcon(R.drawable.ic_close_white_24dp);
|
||||
toolbar.setNavigationIcon(R.drawable.ic_close_black_24dp);
|
||||
toolbar.setNavigationOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
|
@ -228,7 +229,7 @@ public class PlayerFragment extends AbsPlayerFragment implements PlayerAlbumCove
|
|||
|
||||
private void updateIsFavorite() {
|
||||
boolean isFavorite = MusicUtil.isFavorite(getActivity(), MusicPlayerRemote.getCurrentSong());
|
||||
int res = isFavorite ? R.drawable.ic_favorite_white_24dp : R.drawable.ic_favorite_outline_white_24dp;
|
||||
int res = isFavorite ? R.drawable.ic_favorite_black_24dp : R.drawable.ic_favorite_border_black_24dp;
|
||||
|
||||
Drawable favoriteIcon = TintHelper.createTintedDrawable(ContextCompat.getDrawable(getActivity(), res), ToolbarContentTintHelper.toolbarContentColor(getActivity(), Color.TRANSPARENT));
|
||||
toolbar.getMenu().findItem(R.id.action_toggle_favorite)
|
||||
|
|
@ -385,7 +386,8 @@ public class PlayerFragment extends AbsPlayerFragment implements PlayerAlbumCove
|
|||
currentSongViewHolder.separator.setVisibility(View.VISIBLE);
|
||||
currentSongViewHolder.shortSeparator.setVisibility(View.GONE);
|
||||
currentSongViewHolder.image.setScaleType(ImageView.ScaleType.CENTER);
|
||||
currentSongViewHolder.image.setImageDrawable(Util.getTintedDrawable(fragment.getActivity(), R.drawable.ic_volume_up_white_24dp, ATHUtil.resolveColor(fragment.getActivity(), R.attr.iconColor, ThemeStore.textColorSecondary(fragment.getActivity()))));
|
||||
currentSongViewHolder.image.setColorFilter(ATHUtil.resolveColor(fragment.getActivity(), R.attr.iconColor, ThemeStore.textColorSecondary(fragment.getActivity())), PorterDuff.Mode.SRC_IN);
|
||||
currentSongViewHolder.image.setImageResource(R.drawable.ic_volume_up_black_24dp);
|
||||
currentSongViewHolder.itemView.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue