Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/xml/12.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
当我在strings.xml文件中包含连字符时,为什么不在我的应用程序中显示连字符?_Xml_String_Android Studio_Kotlin - Fatal编程技术网

当我在strings.xml文件中包含连字符时,为什么不在我的应用程序中显示连字符?

当我在strings.xml文件中包含连字符时,为什么不在我的应用程序中显示连字符?,xml,string,android-studio,kotlin,Xml,String,Android Studio,Kotlin,我在strings.xml资源文件中定义了一个字符串资源,如下所示: <string name="title_counties">--- Counties ---</string> 但当我运行我的应用程序时,我只看到前三个破折号,之后什么也不显示 当我将字符串资源编辑为: <string name="title_counties">--- Counties &#8211;&#8211;&#8211;</strin

我在strings.xml资源文件中定义了一个字符串资源,如下所示:

    <string name="title_counties">--- Counties ---</string>
但当我运行我的应用程序时,我只看到前三个破折号,之后什么也不显示

当我将字符串资源编辑为:

    <string name="title_counties">--- Counties &#8211;&#8211;&#8211;</string>

我仍然看不到尾随的破折号。

有点不清楚您想要的是连字符-减号还是连字符,但请注意各种破折号之间的区别:

-是连字符减去0x2D,直接显示在ASCII键盘上。 -是连字符&8208; –是一个en破折号&8211;这是第二个例子的结尾。 -是em短跑&8212;
请参见

我在截断尾随的破折号/连字符时增加了文本视图的宽度