0

For all my labels I'm using a Font that only now I discover that is present only in the API 21+.

Since my app support API 16+ I need to change all the font of the labels in my app if < API21.

I can upload in my app the .tff font file but then:

  • I should check programmatically in every Activity if the current API is < 21 and than change programmatically the font of all the labels

But the problem is that I have a TON of Activities and Labels.

Since I'm really new to Android I ask if you guys have a better solution.

The font is 'DancingScript-Regular/Bold'

GMX
  • 950
  • 1
  • 14
  • 29
  • refer this answer http://stackoverflow.com/a/16883281/7387249 – Malwinder Singh Jan 19 '17 at 20:38
  • I'd put the font in your assets, subclass TextView, and override its constructor to have it set the font to that one in assets. And then use that class instead of TextView in all your xml. – Gabe Sechan Jan 19 '17 at 20:46
  • @Gabe Sechan - I used your solution even if is really annoying (have to manage bold/regular + buttons) – GMX Jan 19 '17 at 22:29

0 Answers0