1

I managed to include a custom font by creating an assets/fonts folder in my project and I am able to apply it to a TextView by creating a Typeface and applying it to the TextView.

But this method is exhausting because I must set an id property to every TextView, find each of them in every layout and apply the typeface to each of them.

Is there a clean way of doing this? Like with a style property that I could use in my xml layout files?

Raphael Royer-Rivard
  • 2,252
  • 1
  • 30
  • 53

1 Answers1

0

I found an acceptable answer from Mark Phillip here : How to change the font on the TextView?

You actually can. You're creating a class that extends TextView and calls setTypeface from the constructor.

Community
  • 1
  • 1
Raphael Royer-Rivard
  • 2,252
  • 1
  • 30
  • 53