I want to use a custom font for my android application which I am creating.
I can individually change the typeface of each object from Code, but I have hundreds of them.
So,
- Is there a way to do this from the XML? [Setting a custom typeface]
- Is there a way to do it from code in one place, to say that the whole application and all the components should use the custom typeface instead of the default one?
No, sorry. You can only specify the built-in typefaces through XML.Not that I am aware of.There are a variety of options for these nowadays:
Font resources and backports in the Android SDK, if you are using
appcompatThird-party libraries for those not using
appcompat, though not all will support defining the font in layout resources