Switched to vector drawables.
|
|
@ -112,7 +112,7 @@ dependencies {
|
|||
transitive = true
|
||||
}
|
||||
|
||||
compile('com.afollestad:material-cab:0.1.8@aar') {
|
||||
compile('com.afollestad:material-cab:0.1.9@aar') {
|
||||
transitive = true
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
<application
|
||||
android:name=".App"
|
||||
android:allowBackup="true"
|
||||
android:icon="@drawable/ic_launcher"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:label="${appName}"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/Theme.Phonograph.Light"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.kabouzeid.gramophone.adapter;
|
||||
|
||||
import android.graphics.PorterDuff;
|
||||
import android.os.Build;
|
||||
import android.support.annotation.LayoutRes;
|
||||
import android.support.annotation.NonNull;
|
||||
|
|
@ -11,7 +12,6 @@ import android.view.View;
|
|||
import android.view.ViewGroup;
|
||||
import android.widget.PopupMenu;
|
||||
|
||||
import com.kabouzeid.appthemehelper.ThemeStore;
|
||||
import com.kabouzeid.appthemehelper.util.ATHUtil;
|
||||
import com.kabouzeid.gramophone.R;
|
||||
import com.kabouzeid.gramophone.adapter.base.AbsMultiSelectAdapter;
|
||||
|
|
@ -28,7 +28,6 @@ import com.kabouzeid.gramophone.model.Song;
|
|||
import com.kabouzeid.gramophone.model.smartplaylist.AbsSmartPlaylist;
|
||||
import com.kabouzeid.gramophone.util.MusicUtil;
|
||||
import com.kabouzeid.gramophone.util.NavigationUtil;
|
||||
import com.kabouzeid.gramophone.util.Util;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
|
@ -106,11 +105,7 @@ public class PlaylistAdapter extends AbsMultiSelectAdapter<PlaylistAdapter.ViewH
|
|||
}
|
||||
|
||||
if (holder.image != null) {
|
||||
holder.image.setImageDrawable(Util.getTintedDrawable(
|
||||
activity,
|
||||
getIconRes(playlist),
|
||||
ATHUtil.resolveColor(activity, R.attr.iconColor, ThemeStore.textColorSecondary(activity))
|
||||
));
|
||||
holder.image.setImageResource(getIconRes(playlist));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -118,7 +113,7 @@ public class PlaylistAdapter extends AbsMultiSelectAdapter<PlaylistAdapter.ViewH
|
|||
if (playlist instanceof AbsSmartPlaylist) {
|
||||
return ((AbsSmartPlaylist) playlist).iconRes;
|
||||
}
|
||||
return playlist.id == favoritePlaylistId ? R.drawable.ic_favorite_white_24dp : R.drawable.ic_queue_music_white_24dp;
|
||||
return playlist.id == favoritePlaylistId ? R.drawable.ic_favorite_black_24dp : R.drawable.ic_queue_music_black_24dp;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -198,6 +193,7 @@ public class PlaylistAdapter extends AbsMultiSelectAdapter<PlaylistAdapter.ViewH
|
|||
if (image != null) {
|
||||
int iconPadding = activity.getResources().getDimensionPixelSize(R.dimen.list_item_image_icon_padding);
|
||||
image.setPadding(iconPadding, iconPadding, iconPadding, iconPadding);
|
||||
image.setColorFilter(ATHUtil.resolveColor(activity, R.attr.iconColor), PorterDuff.Mode.SRC_IN);
|
||||
}
|
||||
|
||||
if (menu != null) {
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ public class ShuffleButtonSongAdapter extends SongAdapter {
|
|||
final int padding = activity.getResources().getDimensionPixelSize(R.dimen.default_item_margin) / 2;
|
||||
holder.image.setPadding(padding, padding, padding, padding);
|
||||
holder.image.setColorFilter(accentColor);
|
||||
holder.image.setImageResource(R.drawable.ic_shuffle_white_24dp);
|
||||
holder.image.setImageResource(R.drawable.ic_shuffle_black_24dp);
|
||||
}
|
||||
if (holder.separator != null) {
|
||||
holder.separator.setVisibility(View.VISIBLE);
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ public class WidgetMedium extends AppWidgetProvider {
|
|||
public static void updateWidgetsPlayState(@NonNull final Context context, boolean isPlaying) {
|
||||
if (widgetLayout == null)
|
||||
widgetLayout = new RemoteViews(context.getPackageName(), R.layout.widget_medium);
|
||||
int playPauseRes = isPlaying ? R.drawable.ic_pause_dark_36dp : R.drawable.ic_play_arrow_dark_36dp;
|
||||
int playPauseRes = isPlaying ? R.drawable.ic_pause_black_24dp : R.drawable.ic_play_arrow_black_24dp;
|
||||
widgetLayout.setImageViewResource(R.id.button_toggle_play_pause, playPauseRes);
|
||||
updateWidgets(context);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,18 +13,15 @@ import android.content.Intent;
|
|||
import android.graphics.Bitmap;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Build;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v4.app.NotificationCompat;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
import android.widget.RemoteViews;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.bumptech.glide.request.animation.GlideAnimation;
|
||||
import com.bumptech.glide.request.target.SimpleTarget;
|
||||
import com.bumptech.glide.request.target.Target;
|
||||
import com.kabouzeid.appthemehelper.util.ColorUtil;
|
||||
import com.kabouzeid.gramophone.R;
|
||||
import com.kabouzeid.gramophone.glide.SongGlideRequest;
|
||||
import com.kabouzeid.gramophone.glide.palette.BitmapPaletteWrapper;
|
||||
|
|
@ -131,7 +128,7 @@ public class PlayingNotificationHelper {
|
|||
notificationLayoutBig.setOnClickPendingIntent(R.id.action_quit,
|
||||
retrievePlaybackActions(4));
|
||||
|
||||
notificationLayoutBig.setImageViewResource(R.id.action_play_pause, getPlayPauseRes(isDark));
|
||||
// notificationLayoutBig.setImageViewResource(R.id.action_play_pause, getPlayPauseRes(isDark));
|
||||
}
|
||||
|
||||
private void setUpPlaybackActions() {
|
||||
|
|
@ -144,7 +141,7 @@ public class PlayingNotificationHelper {
|
|||
notificationLayout.setOnClickPendingIntent(R.id.action_prev,
|
||||
retrievePlaybackActions(3));
|
||||
|
||||
notificationLayout.setImageViewResource(R.id.action_play_pause, getPlayPauseRes(isDark));
|
||||
// notificationLayout.setImageViewResource(R.id.action_play_pause, getPlayPauseRes(isDark));
|
||||
}
|
||||
|
||||
private PendingIntent retrievePlaybackActions(final int which) {
|
||||
|
|
@ -215,7 +212,7 @@ public class PlayingNotificationHelper {
|
|||
bgColor = Color.TRANSPARENT;
|
||||
}
|
||||
setBackgroundColor(bgColor);
|
||||
setDarkNotificationContent(bgColor == Color.TRANSPARENT ? Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP : ColorUtil.isColorLight(bgColor));
|
||||
// setDarkNotificationContent(bgColor == Color.TRANSPARENT ? Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP : ColorUtil.isColorLight(bgColor));
|
||||
|
||||
if (notification != null) {
|
||||
notificationManager.notify(notificationId, notification);
|
||||
|
|
@ -238,44 +235,44 @@ public class PlayingNotificationHelper {
|
|||
if (notification == null) {
|
||||
updateNotification();
|
||||
}
|
||||
int playPauseRes = getPlayPauseRes(isDark);
|
||||
if (notificationLayout != null) {
|
||||
notificationLayout.setImageViewResource(R.id.action_play_pause, playPauseRes);
|
||||
}
|
||||
if (notificationLayoutBig != null) {
|
||||
notificationLayoutBig.setImageViewResource(R.id.action_play_pause, playPauseRes);
|
||||
}
|
||||
// int playPauseRes = getPlayPauseRes(isDark);
|
||||
// if (notificationLayout != null) {
|
||||
// notificationLayout.setImageViewResource(R.id.action_play_pause, playPauseRes);
|
||||
// }
|
||||
// if (notificationLayoutBig != null) {
|
||||
// notificationLayoutBig.setImageViewResource(R.id.action_play_pause, playPauseRes);
|
||||
// }
|
||||
if (notification != null) {
|
||||
notificationManager.notify(notificationId, notification);
|
||||
}
|
||||
}
|
||||
|
||||
private void setDarkNotificationContent(boolean dark) {
|
||||
isDark = dark;
|
||||
// private void setDarkNotificationContent(boolean dark) {
|
||||
// isDark = dark;
|
||||
//
|
||||
// if (notificationLayout != null && notificationLayoutBig != null) {
|
||||
// int darkContentColor = ContextCompat.getColor(service, R.color.primary_text_default_material_light);
|
||||
// int darkContentSecondaryColor = ContextCompat.getColor(service, R.color.secondary_text_default_material_light);
|
||||
// int contentColor = ContextCompat.getColor(service, R.color.primary_text_default_material_dark);
|
||||
// int contentSecondaryColor = ContextCompat.getColor(service, R.color.secondary_text_default_material_dark);
|
||||
//
|
||||
// notificationLayout.setTextColor(R.id.title, dark ? darkContentColor : contentColor);
|
||||
// notificationLayout.setTextColor(R.id.text, dark ? darkContentSecondaryColor : contentSecondaryColor);
|
||||
// notificationLayout.setImageViewResource(R.id.action_prev, dark ? R.drawable.ic_skip_previous_dark_36dp : R.drawable.ic_skip_previous_white_36dp);
|
||||
// notificationLayout.setImageViewResource(R.id.action_play_pause, getPlayPauseRes(dark));
|
||||
// notificationLayout.setImageViewResource(R.id.action_next, dark ? R.drawable.ic_skip_next_dark_36dp : R.drawable.ic_skip_next_white_36dp);
|
||||
//
|
||||
// notificationLayoutBig.setTextColor(R.id.title, dark ? darkContentColor : contentColor);
|
||||
// notificationLayoutBig.setTextColor(R.id.text, dark ? darkContentSecondaryColor : contentSecondaryColor);
|
||||
// notificationLayoutBig.setTextColor(R.id.text2, dark ? darkContentSecondaryColor : contentSecondaryColor);
|
||||
// notificationLayoutBig.setImageViewResource(R.id.action_prev, dark ? R.drawable.ic_skip_previous_dark_36dp : R.drawable.ic_skip_previous_white_36dp);
|
||||
// notificationLayoutBig.setImageViewResource(R.id.action_play_pause, getPlayPauseRes(dark));
|
||||
// notificationLayoutBig.setImageViewResource(R.id.action_next, dark ? R.drawable.ic_skip_next_dark_36dp : R.drawable.ic_skip_next_white_36dp);
|
||||
// notificationLayoutBig.setImageViewResource(R.id.action_quit, dark ? R.drawable.ic_close_dark_24dp : R.drawable.ic_close_white_24dp);
|
||||
// }
|
||||
// }
|
||||
|
||||
if (notificationLayout != null && notificationLayoutBig != null) {
|
||||
int darkContentColor = ContextCompat.getColor(service, R.color.primary_text_default_material_light);
|
||||
int darkContentSecondaryColor = ContextCompat.getColor(service, R.color.secondary_text_default_material_light);
|
||||
int contentColor = ContextCompat.getColor(service, R.color.primary_text_default_material_dark);
|
||||
int contentSecondaryColor = ContextCompat.getColor(service, R.color.secondary_text_default_material_dark);
|
||||
|
||||
notificationLayout.setTextColor(R.id.title, dark ? darkContentColor : contentColor);
|
||||
notificationLayout.setTextColor(R.id.text, dark ? darkContentSecondaryColor : contentSecondaryColor);
|
||||
notificationLayout.setImageViewResource(R.id.action_prev, dark ? R.drawable.ic_skip_previous_dark_36dp : R.drawable.ic_skip_previous_white_36dp);
|
||||
notificationLayout.setImageViewResource(R.id.action_play_pause, getPlayPauseRes(dark));
|
||||
notificationLayout.setImageViewResource(R.id.action_next, dark ? R.drawable.ic_skip_next_dark_36dp : R.drawable.ic_skip_next_white_36dp);
|
||||
|
||||
notificationLayoutBig.setTextColor(R.id.title, dark ? darkContentColor : contentColor);
|
||||
notificationLayoutBig.setTextColor(R.id.text, dark ? darkContentSecondaryColor : contentSecondaryColor);
|
||||
notificationLayoutBig.setTextColor(R.id.text2, dark ? darkContentSecondaryColor : contentSecondaryColor);
|
||||
notificationLayoutBig.setImageViewResource(R.id.action_prev, dark ? R.drawable.ic_skip_previous_dark_36dp : R.drawable.ic_skip_previous_white_36dp);
|
||||
notificationLayoutBig.setImageViewResource(R.id.action_play_pause, getPlayPauseRes(dark));
|
||||
notificationLayoutBig.setImageViewResource(R.id.action_next, dark ? R.drawable.ic_skip_next_dark_36dp : R.drawable.ic_skip_next_white_36dp);
|
||||
notificationLayoutBig.setImageViewResource(R.id.action_quit, dark ? R.drawable.ic_close_dark_24dp : R.drawable.ic_close_white_24dp);
|
||||
}
|
||||
}
|
||||
|
||||
private int getPlayPauseRes(boolean dark) {
|
||||
return isPlaying ? (dark ? R.drawable.ic_pause_dark_36dp : R.drawable.ic_pause_white_36dp) : (dark ? R.drawable.ic_play_arrow_dark_36dp : R.drawable.ic_play_arrow_white_36dp);
|
||||
}
|
||||
// private int getPlayPauseRes(boolean dark) {
|
||||
// return isPlaying ? (dark ? R.drawable.ic_pause_dark_36dp : R.drawable.ic_pause_white_36dp) : (dark ? R.drawable.ic_play_arrow_dark_36dp : R.drawable.ic_play_arrow_white_36dp);
|
||||
// }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ public abstract class AbsSmartPlaylist extends Playlist {
|
|||
|
||||
public AbsSmartPlaylist() {
|
||||
super();
|
||||
this.iconRes = R.drawable.ic_queue_music_white_24dp;
|
||||
this.iconRes = R.drawable.ic_queue_music_black_24dp;
|
||||
}
|
||||
|
||||
public abstract ArrayList<Song> getSongs(Context context);
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ import java.util.ArrayList;
|
|||
public class HistoryPlaylist extends AbsSmartPlaylist {
|
||||
|
||||
public HistoryPlaylist(@NonNull Context context) {
|
||||
super(context.getString(R.string.history), R.drawable.ic_access_time_white_24dp);
|
||||
super(context.getString(R.string.history), R.drawable.ic_access_time_black_24dp);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ import java.util.ArrayList;
|
|||
public class LastAddedPlaylist extends AbsSmartPlaylist {
|
||||
|
||||
public LastAddedPlaylist(@NonNull Context context) {
|
||||
super(context.getString(R.string.last_added), R.drawable.ic_queue_white_24dp);
|
||||
super(context.getString(R.string.last_added), R.drawable.ic_library_add_black_24dp);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ import java.util.ArrayList;
|
|||
public class MyTopTracksPlaylist extends AbsSmartPlaylist {
|
||||
|
||||
public MyTopTracksPlaylist(@NonNull Context context) {
|
||||
super(context.getString(R.string.my_top_tracks), R.drawable.ic_trending_up_white_24dp);
|
||||
super(context.getString(R.string.my_top_tracks), R.drawable.ic_trending_up_black_24dp);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,34 @@
|
|||
package com.kabouzeid.gramophone.views;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.PorterDuff;
|
||||
import android.support.v7.widget.AppCompatImageView;
|
||||
import android.util.AttributeSet;
|
||||
|
||||
import com.kabouzeid.appthemehelper.util.ATHUtil;
|
||||
import com.kabouzeid.gramophone.R;
|
||||
|
||||
/**
|
||||
* @author Karim Abou Zeid (kabouzeid)
|
||||
*/
|
||||
public class IconImageView extends AppCompatImageView {
|
||||
public IconImageView(Context context) {
|
||||
super(context);
|
||||
init(context);
|
||||
}
|
||||
|
||||
public IconImageView(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
init(context);
|
||||
}
|
||||
|
||||
public IconImageView(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
init(context);
|
||||
}
|
||||
|
||||
private void init(Context context) {
|
||||
if (context == null) return;
|
||||
setColorFilter(ATHUtil.resolveColor(context, R.attr.iconColor), PorterDuff.Mode.SRC_IN);
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 655 B |
|
Before Width: | Height: | Size: 534 B |
|
Before Width: | Height: | Size: 472 B |
|
Before Width: | Height: | Size: 248 B |
|
Before Width: | Height: | Size: 418 B |
|
Before Width: | Height: | Size: 307 B |
|
Before Width: | Height: | Size: 645 B |
|
Before Width: | Height: | Size: 225 B |
|
Before Width: | Height: | Size: 324 B |
|
Before Width: | Height: | Size: 189 B |
|
Before Width: | Height: | Size: 210 B |
|
Before Width: | Height: | Size: 309 B |
|
Before Width: | Height: | Size: 220 B |
|
Before Width: | Height: | Size: 128 B |
|
Before Width: | Height: | Size: 663 B |
|
Before Width: | Height: | Size: 453 B |
|
Before Width: | Height: | Size: 161 B |
|
Before Width: | Height: | Size: 164 B |
|
Before Width: | Height: | Size: 754 B |
|
Before Width: | Height: | Size: 638 B |
|
Before Width: | Height: | Size: 799 B |
|
Before Width: | Height: | Size: 558 B |
|
Before Width: | Height: | Size: 607 B |
|
Before Width: | Height: | Size: 595 B |
|
Before Width: | Height: | Size: 185 B |
|
Before Width: | Height: | Size: 116 B |
|
Before Width: | Height: | Size: 274 B |
|
Before Width: | Height: | Size: 145 B |
|
Before Width: | Height: | Size: 158 B |
|
Before Width: | Height: | Size: 360 B |
|
Before Width: | Height: | Size: 277 B |
|
Before Width: | Height: | Size: 294 B |
|
Before Width: | Height: | Size: 416 B |
|
Before Width: | Height: | Size: 279 B |
|
Before Width: | Height: | Size: 131 B |
|
Before Width: | Height: | Size: 271 B |
|
Before Width: | Height: | Size: 227 B |
|
Before Width: | Height: | Size: 680 B |
|
Before Width: | Height: | Size: 377 B |
|
Before Width: | Height: | Size: 322 B |
|
Before Width: | Height: | Size: 552 B |
|
Before Width: | Height: | Size: 488 B |
|
Before Width: | Height: | Size: 361 B |
|
Before Width: | Height: | Size: 436 B |
|
Before Width: | Height: | Size: 283 B |
|
Before Width: | Height: | Size: 304 B |
|
Before Width: | Height: | Size: 315 B |
|
Before Width: | Height: | Size: 334 B |
|
Before Width: | Height: | Size: 283 B |
|
Before Width: | Height: | Size: 538 B |
|
Before Width: | Height: | Size: 427 B |
|
Before Width: | Height: | Size: 748 B |
|
Before Width: | Height: | Size: 424 B |
|
Before Width: | Height: | Size: 385 B |
|
Before Width: | Height: | Size: 288 B |
|
Before Width: | Height: | Size: 170 B |
|
Before Width: | Height: | Size: 248 B |
|
Before Width: | Height: | Size: 233 B |
|
Before Width: | Height: | Size: 439 B |
|
Before Width: | Height: | Size: 195 B |
|
Before Width: | Height: | Size: 279 B |
|
Before Width: | Height: | Size: 129 B |
|
Before Width: | Height: | Size: 159 B |
|
Before Width: | Height: | Size: 243 B |
|
Before Width: | Height: | Size: 161 B |
|
Before Width: | Height: | Size: 105 B |
|
Before Width: | Height: | Size: 424 B |
|
Before Width: | Height: | Size: 287 B |
|
Before Width: | Height: | Size: 118 B |
|
Before Width: | Height: | Size: 140 B |
|
Before Width: | Height: | Size: 522 B |
|
Before Width: | Height: | Size: 426 B |
|
Before Width: | Height: | Size: 483 B |
|
Before Width: | Height: | Size: 358 B |
|
Before Width: | Height: | Size: 417 B |
|
Before Width: | Height: | Size: 376 B |
|
Before Width: | Height: | Size: 153 B |
|
Before Width: | Height: | Size: 99 B |
|
Before Width: | Height: | Size: 199 B |
|
Before Width: | Height: | Size: 119 B |
|
Before Width: | Height: | Size: 126 B |
|
Before Width: | Height: | Size: 278 B |