I want to set the fontFamily
of the Toolbar's texts, Buttons, TextViews and for all the text of the Xamarin.Andrid application in general. How do I do that in a single place? I tried putting the following in the Base application theme
in styles.xml
:
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<!-- Customize your theme here. -->
.....
<item name="fontFamily">@drawable/Exo2_ExtraBold</item>
.....
</style>
But it only changed the fontFamily
of the MainActivity
, I guess it's because only that activity has Theme = "@style/AppTheme"
attribute above it. If I put that attribute above the rest of the activities I guess it will also work, but isn't there an easier way to achieve all the app to have one fontFamily
setting it in a single place of the application? And also I put the .otf
file in the drawables
folder I tried putting it in the font
folder I created manually but it gave me an error when trying to rebuild the solution. So I'd like to know how can I fix that also, to put the .oft
in the correct folder.