I want to change the font face in my application. I want change for all components TextView in my application, how can do that ?
Asked
Active
Viewed 1,061 times
4
-
See my answer here http://stackoverflow.com/a/12591991/746347 – mixel Sep 25 '12 at 22:29
2 Answers
1
UPDATED ANSWER:
@Override
public View getView(int position, View view, ViewGroup viewGroup)
{
View v = super.getView(position, view, viewGroup);
((TextView)v).setTypeface(font);
return v;
}
Override the default getView method and set your font as typeface as mentioned above.

Pattabi Raman
- 5,814
- 10
- 39
- 60
-
You don't answer to my question. I know set a typeface programmatically. – FinalSpirit Feb 13 '12 at 19:07
-
For each component, we must create a custom class who override getView ? I can't set a value in the manifest or an other file to use the same font for all components in my application ? – FinalSpirit Feb 14 '12 at 14:55
0
I think the best way for you is to set theme for your application. Applying styles and themes link should help.

brighteyed
- 146
- 3
- 6
-
I already see this link, but i can't set a font face in xml... i can only programmatically. – FinalSpirit Aug 22 '11 at 13:51