I have a TextView in my activity_main.xml, and I want to change its fontFamily attribute. It works in the AppTheme and the AppCompat themes:
However, in other themes like the Material themes, the font family is always set to default:
Is it that the themes don't support those fonts or I've done something wrong?
activity_main.xml:
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<TextView
android:id="@+id/time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="This is some text"
android:textColor="@android:color/background_light"
android:textSize="50sp"
app:fontFamily="cursive"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.223" />
</android.support.constraint.ConstraintLayout>