I recently developed an iPhone app and trying to make a similar version to the android.
Everything goes well, apart from android doesn’t supports bradley hand as a text font used on my buttons and labels.
I know you can possibly import your own text font, but I searched all over google and couldn’t find any hints on:
- How to do this, or perhaps an helpful tutorial somewhere online
- But more importantly, where can I get the bradley hand font source to import?
I use eclipse SDK on mac.
Any senoirs can give me a help with it?
Cheers
Phil
1) Create the folder
assets/fontsin your project directory.2) Place the font-file in the
fontsdirectory3) In the activity where you’d like to use the font, do this:
private static Typeface sTypeface;
if (sTypeface == null) {
sTypeface = Typeface.createFromAsset(getContext().getAssets(),
"fonts/you_font_filename.ttf");
}
TextView mTextView = (TextView) findViewById(R.id.you_textview);
mTextView .setTypeface(sTypeface);