fontFamily草书在我的手机上不起作用



这是我的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"/>

当我在安卓v9的华为P20 Lite上运行该应用程序时,Android中指定的草书字体:fontFamily="草书"不显示;我只是得到一个标准的文本样式。

手机上是否有一些设置可以覆盖这一点,或者可能还有什么问题?据我所知,API水平绝对应该足够高。

确保字体文件夹中有字体,并使用调用它

  • android:fontFamily="@font/your_font">

最新更新