用冒号分割字符串并在xml的新行中显示

时间:2013-02-22 18:51:27

标签: java android string split

我在xml标签中有这样的字符串:

He is what do you need to study: <Enter>
(i) Study chapter by chapter.
(ii) Work out the revision question.

但它显示如下

He is what do you need to study:(i) Study chapter by chapter.(ii) Work out the revision question.

那么我怎样才能在xml中显示它。

2 个答案:

答案 0 :(得分:2)

假设您使用的是HTML:

Here is what do you need to study:
    <ul type="upper-roman">
       <li>Study chapter by chapter.</li>
       <li>Work out the revision question.</li>

    </ul>

你的意思是这样吗?

<div>
    Here is what do you need to study:
    <ul type="upper-roman">
       <li style="padding-left:20pt" >Study chapter by chapter.</li>
       <li style="padding-left:20pt" >Work out the revision question.</li>
    </ul>
</div>

答案 1 :(得分:0)

<?xml version="1.0"?>
<a>
<![CDATA[
He is what do you need to study: <Enter>
(i) Study chapter by chapter.
(ii) Work out the revision question.
]]>
</a>