【发布时间】:2014-03-26 19:42:01
【问题描述】:
我正在使用 Android 应用程序,我有一个字符串,它具有从使用 jsoup 的 html 解析中获取的不同值,我在这个字符串中有一些玩家名称现在我想让所有玩家名称单独点击,我需要显示每个玩家的一些统计数据,我如何让它们单独点击,因为所有玩家都在一个字符串中,
String result;
Element nodeBlogStats = document.getElementById("forwards");
for (org.jsoup.nodes.Element row : nodeBlogStats.select("tr")) {
for (org.jsoup.nodes.Element column : row.select("td")) {
for (int i = 0; i <= 5; i++) {
for (org.jsoup.nodes.Element n : column.select("td#LW" + i)) {
result += column.text();
}
}
}
result = "<u>" + result + "</u>";
result += "<br><br>";
}
这是我从特定网址获取玩家姓名的代码,我的“result”字符串中有玩家姓名,我想让每个玩家姓名都可点击,然后我如何使用其中的某些功能可点击功能。 提前致谢
【问题讨论】:
-
首先将名称与结果分开,并根据自己的喜好对待每个人