Skip to content

Instantly share code, notes, and snippets.

View machadaCosta's full-sized avatar

macha machadaCosta

View GitHub Profile
@machadaCosta
machadaCosta / MyApp.java
Created October 7, 2015 12:56 — forked from artem-zinnatullin/MyApp.java
If you need to set one font for all TextViews in android application you can use this solution. It will override ALL TextView's typefaces, includes action bar and other standard components, but EditText's password font won't be overriden.
public class MyApp extends Application {
@Override
public void onCreate() {
TypefaceUtil.overrideFont(getApplicationContext(), "SERIF", "fonts/Roboto-Regular.ttf"); // font from assets: "assets/fonts/Roboto-Regular.ttf
}
}