You will need to extend the View you are displaying the drawable and
override the draw method to add your custom text like this:
@Override
public void draw(Canvas canvas) {
super.draw(canvas);
canvas.drawText("Title", x,
y, titlePaint);
}
On Apr 1, 3:11 am, Erik H <[email protected]> wrote:
> Hi,
>
> I need help to add text in a custom drawable. I'm looking in tha API
> (android.graphics...) but cannot find any way of doing this.
>
> What I basically want is a drawable that contains text that I can
> change. Is this even possible today?
>
> It must be a drawable as I use it where a drawable is required.
>
> Thanks!
>
> // Erik
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---