How I can set a custom font as an application font? Here is my setup:
- The custom font is located in
/assets/fonts/Calibri.TTF
- In my manifest, I set the application theme like so:
android:theme="@style/AppTheme"
- Here is my
style.xml
:
<resources>
<!-- Application theme. -->
<style name="AppTheme" parent="AppBaseTheme">
<!-- All customizations that are NOT specific to a particular API-level can go here. -->
<item name="android:typeface">Calibri.ttf</item>
</style>
</resources>
Now I cannot run this app. When I try to compile it, I a get an error like this:
error: Error: String types not allowed (at 'android:typeface' with value 'Calibri.ttf')