Tweaks to the Palette used for colorizing notification

This commit is contained in:
Samriddha Basu 2017-03-13 18:47:05 +05:30
commit 2dc6147255

View file

@ -37,6 +37,7 @@ import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.media.session.MediaSessionCompat;
import android.support.v7.app.NotificationCompat;
import android.support.v7.graphics.Palette;
import android.text.TextUtils;
import android.widget.Toast;
@ -1122,7 +1123,8 @@ public class MusicService extends Service implements SharedPreferences.OnSharedP
request.into(new SimpleTarget<BitmapPaletteWrapper>(bigNotificationImageSize, bigNotificationImageSize) {
@Override
public void onResourceReady(BitmapPaletteWrapper resource, GlideAnimation<? super BitmapPaletteWrapper> glideAnimation) {
update(resource.getBitmap(), resource.getPalette().getDarkVibrantColor(Color.TRANSPARENT));
Palette palette = resource.getPalette();
update(resource.getBitmap(), palette.getVibrantColor(palette.getMutedColor(Color.TRANSPARENT)));
}
@Override
public void onLoadFailed(Exception e, Drawable errorDrawable) {