I am writing a custom Drawable, text above a bitmap:
@Override
public void draw(Canvas canvas) {
canvas.drawBitmap(badge, matrix, null);
canvas.drawText(count, size / 2, size / 2 + (text_size) / 2 , p);
}
When I use my drawable in imageView, everything is fine.

But if I use this with a text view (composite drawing), this alignment is wrong.

I tried both setCompoundDrawablesWithIntrinsicBounds and setCompoundDrawables
The same results that I missed?
Thank.
vieux source
share