1

Possible Duplicate:
Android: Want to set custom fonts for whole application not runtime

I can add the fonts to my application through a simple code:

TextView txt = (TextView) findViewById(R.id.myText);
Typeface font = Typeface.createFromAsset(getAssets(),
        "Americana Dreams Upright Bold.ttf");
txt.setTypeface(font);

But if i want to add this font throughout the application i have to add it for each text i have to use. Is there a simpler way to use the font consistently throughout the application.

Can my XML show the font type(Typeface) that I specify manually? Default Typeface are: Normal, Sans, Serif, Monospace. Please let me know if there is a way to add font.

Community
  • 1
  • 1
sneaker_android
  • 380
  • 3
  • 8

0 Answers0