How to highlight a Bitmap? Like Google play.
My images are in a server, so I´d like to not download two images to make this effect.
What I have tried:
I just try to use Layers but it don't make a transparent highlight effect.
The Bitmap is set on an Imagebutton
.
Maybe canvas should work, creating a drawable transparent with a light color, I tried some codes but doesn't work or its because I don't know how to handle this.
BitmapDrawable bitmapDrawable = new BitmapDrawable(bitmap);
Drawable[] layers = new Drawable[2];
layers[0] = bitmapDrawable;
layers[1] = r.getDrawable(R.drawable.default_button_pressed);
LayerDrawable layerDrawable = new LayerDrawable(layers);
imageView.setImageDrawable(layerDrawable);
default_button_pressed
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="3dp" />
<gradient android:endColor="#FFFFFF" android:startColor="#ccffff" android:angle="90" />
<stroke android:width="1dp" android:color="#33364252" />
</shape>