Android: Using the built-in fonts and adding effects

Currently Android has a few built-in fonts that can be easily harnessed in your applications. Today I’m going to quickly go over how to use these as well as some added effects like creating shadows, bold, italic, colors, etc.

I created a new Android Project in Eclipse called “AndroidFonts”:

From here I modified the “main.xml” file in the layout folder.

When I run the project I get this result in the emulator:

As you can see from the code I used the fonts: sans, serif, and monospace. Then I showed off how to make a string bold and italic: