Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Palette with Glide
Glide.with(this)
.load(url)
.asBitmap().diskCacheStrategy(DiskCacheStrategy.ALL).centerCrop()
.into(new BitmapImageViewTarget(mImageViewBackdrop) {
@Override
public void onResourceReady(Bitmap bitmap, GlideAnimation anim) {
super.onResourceReady(bitmap, anim);
Palette.from(bitmap).generate(new Palette.PaletteAsyncListener() {
@Override
public void onGenerated(Palette palette) {
int mutedColor = palette.getMutedColor(0x000000);
//todo: set actionbar color
}
});
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.