Suzan Cioc
Suzan Cioc

Reputation: 30097

Best way to put vectorized symbols on button? Wingdings button title

Suppose I want to draw simple icon on the button surface. Let it be the cross or some letter.

What is the best way to do this? Can I use wingdings or webdings font on button?

Upvotes: 0

Views: 1184

Answers (1)

BREMI
BREMI

Reputation: 834

As Android uses Unicode (utf-8) you can use any sign defined there, as long your font supports that. Just use copy and paste. The better solutions i think is using ImageButton using images from your drawables folder. This folder can be found in project/res/drawables or via Ecplipse Package-Explorer and you should use this to copy and paste your files in place (png, gif and jpg are supported)

In XML layout file a image is assigned the following way to an ImageButton

<ImageButton
    android:id="@+id/imageButton"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:src="@drawable/ic_launcher" />

See also:

Upvotes: 0

Related Questions