Brett Brett - 1 year ago 105
Android Question

Using a font and string as a Drawable

In the spirit of simple vector images on Android that always look sharp, I was wondering if I can't use custom font paired with a string (or a character) as a


For instance, if I wanted to use a Webdings character as the drawable on a
, how would I do this?

I want the best font size to be selected (using
) so that I get no distortion on the image.

Do you have any ideas how I can accomplish this goal?


Answer Source

You can check out my library IconicTextView It allows to use several iconic fonts to display vector images. Currently a subclass of TextView is used to display them but I'm working on rewriting it to use custom Drawable. The main issue here is selecting the best font size, I'm trying to find a way to auto adjust font size.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download