Tuesday, October 11, 2011

[android-developers] assigning typeface to text view

Hello,

I want to assign the typeface which I had placed in my asset folder to
all the textview of my application.
So is there any way through which I can assign this time at once to
all the textview of application?
Or I have to assign manually to all textview where they are appears on
activity?

Currently I am doing like this at place where I am having textview on
layout.
TextView title = (TextView)
findViewById(android.R.id.title);
Typeface whyteny =
Typeface.createFromAsset(getApplicationContext().getAssets(),
"whitneymedium.ttf");
title.setTypeface(whyteny);

Thanks In advance

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment