This is the first article in my “five days of Android articles“.
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:
Then a string utilizing the shadowing effect:
android:shadowColor ="#0f0f0f" android:shadowRadius="1.6" android:shadowDx="1.5" android:shadowDy="1.3"
Colors are as simple as adding: