Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/234.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android:某些设备中未显示Unicode字符_Android_Unicode - Fatal编程技术网

Android:某些设备中未显示Unicode字符

Android:某些设备中未显示Unicode字符,android,unicode,Android,Unicode,我试图向textView显示格鲁吉亚拉里符号,但在某些设备中失败 在某些设备中,它如下所示: 应该是这样的: 这是我的密码。我尝试在activity.class和布局文件中: <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/priceText

我试图向textView显示格鲁吉亚拉里符号,但在某些设备中失败

在某些设备中,它如下所示:

应该是这样的:

这是我的密码。我尝试在activity.class和布局文件中:

<TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:id="@+id/priceTextView"
                android:visibility="visible"
                android:layout_centerHorizontal="true"
                android:layout_centerVertical="true"
                android:textSize="25sp"
                android:textColor="@color/red"
                android:textStyle="bold"
                android:text="4 \u20BE"/>

我知道旧设备没有此符号,但我是否可以解决此问题?

您可以将包含所需符号的字体文件附加到项目中

priceTextView.setTypeface(Typeface.createFromAsset(getAssets(), "fonts/customFont.otf"));

您可以将包含所需符号的字体文件附加到项目中

priceTextView.setTypeface(Typeface.createFromAsset(getAssets(), "fonts/customFont.otf"));

谢谢,伙计,成功了。但是,有什么方法可以使文本加粗,同时使用这种字体吗?好的,我找到了解决办法。在构造函数priceTextView.setTypeface(typeface.createFromAsset(getAssets(),“fonts/customFont.otf”),“typeface.BOLD”中添加了另一种字体。谢谢,它成功了。但是,有什么方法可以使文本加粗,同时使用这种字体吗?好的,我找到了解决办法。在构造函数priceTextView.setTypeface(typeface.createFromAsset(getAssets(),“fonts/customFont.otf”),“typeface.BOLD”)中添加了另一种字体