Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/218.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/xml/15.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
来自自定义xml或html的Android setText_Android_Xml - Fatal编程技术网

来自自定义xml或html的Android setText

来自自定义xml或html的Android setText,android,xml,Android,Xml,我不确定,但是否可以在android中通过自定义xml或html设置文本 示例:我有text.xml或text.html,其中包含 <item> <id>1</id> <question>how r u?</question> <answer>fine</answer> <answer right>good</answer> <answer>bad</answer>

我不确定,但是否可以在android中通过自定义xml或html设置文本

示例:我有text.xml或text.html,其中包含

<item>
<id>1</id>
<question>how r u?</question>
<answer>fine</answer>
<answer right>good</answer>
<answer>bad</answer>
<answer>not in mood</answer>
</item>

1.
你怎么样?
好的
好的
坏的
没心情
现在在我的活动中,我有5个文本视图。第一个被设置为质数,所以它将是“how r u?”。。另外四个是“好”、“好”、“坏”和“心情不好”。
现在,当我单击“good”时,因为文件中是
,所以我使用intent进入另一个活动,当我单击其余答案时,它们也会带我进入另一个特定活动。

您需要XmlParser来解析xml文件并在TextView中设置文本

检查此链接


您需要XmlParser来解析xml文件并在TextView中设置文本

检查此链接


是的。检查我提供的链接。它有示例。这个链接来自网络。。我正在寻找项目中的xml,它本身,相同的方法?是的,它是..检查我提供的链接..它有示例。这个链接来自网络。。我正在寻找项目中的xml,它本身,相同的方法?