I\'m just starting with Android development and I\'m coming from JavaScript/HTML world so I\'m currently investigating the possibilities of the Android SDK.
The HTML 5 c
Composition is handled by drawing on a Canvas
with a Paint
that uses a PorterDuffXfermode
.
Paint p=new Paint();
p.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.DARKEN));
canvas.drawBitmap(bitmap, 0, 0, p);
See here for more info. I also managed to override onPaint
so that we can apply this composition to elements that draw themeselves.