如何把空格字符成XML字符串的名字吗?

编程入门 行业动态 更新时间:2024-10-19 04:29:13
本文介绍了如何把空格字符成XML字符串的名字吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我已经定义了的strings.xml 文件中的一些字符串。现在我需要把一些数字之间有一些额外的空间字符串研究。当我输入额外的空格字符,这是不显示的应用程序,但。

i have defined some strings in the strings.xml file. Now I need to put some extra space between some numbers in the string. When I type extra space characters this is not showing on the application though.

<string name="spelatonertext3">-4, 5, -5, 6, -6,

如果我把额外的空间是这样的:

And if I put extra space like this:

<string name="spelatonertext3">-4, 5, -5, 6, -6,

它只是看起来上的应用程序一样。我怎样才能使空格字符到XML字符串?

It just looks the same on the app. How can I make space characters into the XML string?

推荐答案

使用白色空间XML作为字符串使用&放大器;#160; 。 XML不会拿空白,因为它是。将它设置前,将修剪的空白。所以,使用&放大器;#160; ,而不是单个空格

to use white space in xml as string use &#160;. XML won't take white space as it is. it will trim the white space before setting it. So use &#160; instead of single white space

更多推荐

如何把空格字符成XML字符串的名字吗?

本文发布于:2023-11-08 20:23:36,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1570366.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:空格   字符串   字符   名字   XML

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!