Wade Byron Profe
Wade Byron Profe

Reputation: 176

fontFamily cursive not working on my phone

This is my xml:

        <TextView
            android:id="@+id/title"
            android:layout_width="match_parent"
            android:layout_height="50dp"
            android:text="@string/bus_title"
            android:layout_alignParentTop="true"
            android:layout_centerInParent="true"
            android:textColor="#000"
            android:autoSizeTextType="uniform"
            android:fontFamily="cursive"
            android:layout_marginBottom="16dp"
            android:layout_marginTop="16dp"/>

When I run the application on my Huawei P20 Lite with Android v9, the cursive font specified in android:fontFamily="cursive" does not display; I just get a standard text style.

Is there some setting on the phone that overrides this, or what else may be the problem? As far as I know the API level should definitely be high enough.

Upvotes: 0

Views: 337

Answers (1)

Abhay Paul
Abhay Paul

Reputation: 31

Make sure you have fonts in fonts folder and call it using

  • android:fontFamily="@font/your_font"

Upvotes: 1

Related Questions