Java 单击列表行打开webview中解析xml的url

Java 单击列表行打开webview中解析xml的url,java,android,list,webview,xml-parsing,Java,Android,List,Webview,Xml Parsing,我有一个自定义的列表视图,它在xml文件中解析,该文件包含如下数据 </issue> <article> <id>Arts and Culture</id> <title>Boycott the Boycott</title> <author> LouLou Castonguay</author> <description>There is a rumor going around tha

我有一个自定义的列表视图,它在xml文件中解析,该文件包含如下数据

</issue>
<article>
<id>Arts and Culture</id>
<title>Boycott the Boycott</title>
<author> LouLou Castonguay</author>
<description>There is a rumor going around that no one is going to pitch a theme for next years fashion show. I dont get it!</discription>
<thumb_url>http://graffiti.hostoi.com/00Graffiti00/Photos/Art/show.png</thumb_url>
<key>http://www.google.com</key>
</article>
</issue>
除了onclick打开web视图的空白活动,而不是在google.com中加载关于我做错了什么或如何做的任何想法之外,其他一切都可以正常工作?谢谢。

您已经定义了

 static final String KEY_LINK = "link";
您正在将
KEY\u LINK
发送到
文章
活动,随后您将设置
WevView
的url。由于您没有更新
KEY\u LINK
的值,因此
WevView
结果如下所示

webview.loadUrl("link"); 
这将呈现一个空白屏幕

希望你现在明白了

编辑

我假设您需要来自xml的以下url

   <key>http://www.google.com</key>

并将以下内容添加到解析xml的循环的
onPostExecute
方法中

 map.put(KEY_LINK, parser.getValue(e, KEY_LINK));

因为我想,
KEY\u LINK
没有链接。解析后,您是否正在更新
KEY\u链接
?我不这么认为,如果我需要,您可以告诉我如何更新KEY\u链接吗?谢谢,但是您知道如何更新KEY\u链接,使其适用于
webview
,您可以参考本教程,我按照您的指示做了所有事情,但仍然没有渲染,非常感谢您的帮助我猜
webview.setInitialScale(1)导致问题。试着评论那句话。
   <key>http://www.google.com</key>
static final String KEY_LINK = "link";
static final String KEY_LINK = "key";
 map.put(KEY_LINK, parser.getValue(e, KEY_LINK));