This is a repost of an answer I wrote on Stack Overflow.
Beginning with Android 8.0 (API 26), there is native support for setting the fonts in XML. However, using the support library extends this down to Android 4.1 (API 16).
1. Add a font to your project
- Right click the
res
folder and go to New > Android Resource Directory…