Fábio Carballo
Fábio Carballo

Reputation: 3275

android:fontFamily is only working with AppCompatTextView

I was moving my project drop Calligraphy and use the native android android support for fonts. However, I can only make it work if I use AppCompat elements instead of the default ones (TextView, Button, etc..). I wanted to know if this is expected and if not, how could I solve it?

Upvotes: 2

Views: 469

Answers (1)

Fábio Carballo
Fábio Carballo

Reputation: 3275

So I figured it out:

The problem was that in on of the legacy BaseActivity#onCreate we were calling setContentView before the call to super.onCreate(). By doing this it will somehow disable the font from being correctly rendered.

Upvotes: 2

Related Questions