Apply application-wide custom font on Android -


i trying use android oreo custom font feature in application. works fine if set font manually on each textview, when trying set globally in application theme, has issues.

my theme looks this:

<style name="mytheme" parent="theme.appcompat.daynight.noactionbar">     <!-- other attributes -->     <item name="fontfamily">@font/custom_font</item> </style> 

the font correctly applied in bottomnavigationview , buttons, not in toolbar or textview style (like body1).

is there simple way set custom font on whole application? have override each style add fontfamilly attribute?

update: using style attribute set text appearance, instead of android:textappearance. using later fixed of issues custom font. now, toolbar still using default font.

i don't think there way apply font application wide, activity wide possible.

checkout calligraphy, works charm.


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -