FinalSpirit
FinalSpirit

Reputation: 589

Change font face in all application

I want to change the font face in my application. I want change for all components TextView in my application, how can do that ?

Upvotes: 4

Views: 1065

Answers (2)

Pattabi Raman
Pattabi Raman

Reputation: 5854

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.

Upvotes: 1

brighteyed
brighteyed

Reputation: 146

I think the best way for you is to set theme for your application. Applying styles and themes link should help.

Upvotes: 0

Related Questions