Friday 15 June 2012

Set Any type of font in your application


Download .ttf file of the font which you like


Go to computer font (I’ve windows 7) and copy shruti font.
Paste it in android assets folder.
Use it in TextView.


Following is a code that can help you:


TextView detailText = (TextView) findViewById(R.id.detailText);
Typeface font = Typeface.createFromAsset(getAssets(), “SHRUTI.TTF”);
detailText.setTypeface(font);

No comments: