相关疑难解决方法(0)

当我们更改Samsung设备中的设备字体样式时,如何防止TextView字体更改

我想说我在设置textview字体时有一个奇怪的问题.如果我从设置 - >显示更改设备字体样式,则textview字体样式也会更改.我该如何防止这种情况?

这是我的xml布局中的textview.

<TextView
        android:id="@+id/textView1"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:background="@drawable/title_bar_bg"
        android:fontFamily="sans-serif"
        android:typeface="sans"
        android:gravity="center"
        android:text="@string/people_finder"
        android:textColor="@color/WHITE"
        android:textSize="18sp"
        android:textStyle="bold">

    </TextView>
Run Code Online (Sandbox Code Playgroud)

android:fontFamily ="sans-serif"android:typeface ="sans"

它也适用于三星Galaxy Grand,三星Note 2等设备.但不适用于三星Note 8,三星Note 10.1等.

还有其他办法吗?

谢谢

fonts android textview typeface

6
推荐指数
1
解决办法
4308
查看次数

标签 统计

android ×1

fonts ×1

textview ×1

typeface ×1