0

构建新闻提要应用程序作为学习练习。我可以连接到 google 并接收 json 流,并使用它来填充新闻项目的 ListView。除了一件事。我认为“内容”字段是 HTML,带有很多 Unicode 字符。它看起来像这样:

"content":"\u003ctable border\u003d\"0\" cellpadding\u003d\"2\" cellspacing\u003d\"7\"   style\u003d\"vertical-align:top\"\u003e\u003ctr\u003e\u003ctd width\u003d\"80\"   align\u003d\"center\" valign\u003d\"top\"\u003e\u003cfont style\u003d\"font-size:85%;font-  family:arial,sans-serif\"\u003e\u003ca href\u003d\"http://news.google.com/news/url?  sa\u003dt\u0026amp;fd\u003dR\u0026amp;usg\u003dAFQjCNFxFgqMWvxBxPVu6p-  aU3v0pJu2gQ\u0026amp;url\u003dhttp://www.usnews.com/news/newsgram/articles/2013/09/13/flash     -floods-force-thousands-of-evacuations-in-colorado\"\u003e\u003cimg sr    c\u003d\"//t0.gstatic.com/images?  q\u003dtbn:ANd9GcSxoCFv79Ha0yUykBX1dB_2DZ4EKcS1ZNeqvOH1iadwNXYcCt24RarH73QM2SLhZlDneouYmLcD    \" alt\u003d\"\" border\u003d\"1\" width\u003d\"80\"    height\u003d\"80\"\u003e\u003cbr\u003e\u003cfont size\u003d\"-2\"\u003eU.S. News \u0026amp;  World Report\u003c/font\u003e\u003c/a\u003e\u003c/font\u003e\u003c/td\u003e\u003ctd  valign\u003d\"top\"\u003e\u003cfont style\u003d\"font-size:85%;font-family:arial,sans- serif\"\u003e\u003cbr\u003e\u003cdiv style\u003d\"padding-top:0.8em\"\u003e\u003cimg  alt\u003d\"\" height\u003d\"1\"  width\u003d\"1\"\u003e\u003c/div\u003e\u003cdiv\u003e\u003ca  href\u003d\"http://news.google.com/news/url? sa\u003dt\u0026amp;fd\u003dR\u0026amp;usg\u003dAFQjCNHCJS1c-eurSg- 8tAt0PjZ4tiaLdA\u0026amp;url\u003dhttp://www.foxnews.com/weather/2013/09/15/colorado- braces-for-more-heavy-rain-deadly-floods/\"\u003e\u003cb\u003eMajor air rescue planned in  flooded Colorado county\u003c/b\u003e\u003c/a\u003e\u003cbr\u003e\u003cfont  size\u003d\"-1\"\u003e\u003cb\u003e\u003cfont color\u003d\"#6f6f6f\"\u003eFox  News\u003c/font\u003e\u003c/b\u003e\u003c/font\u003e\u003cbr\u003e\u003cfont  size\u003d\"-1\"\u003eResidents of Boulder County, Colorado are being asked to help guide  helicopter pilots to their locations Monday as a major air rescue is being planned to take  advantage of a clear weather forecast. \u0026quot;The pilots are going to go anywhere and  everywhere they \u003cb\u003e...\u003c/b\u003e\u003c/font\u003e\u003cbr\u003e\u003cfont  size\u003d\"-1\"\u003e\u003ca href\u003d\"http://news.google.com/news/url? sa\u003dt\u0026amp;fd\u003dR\u0026amp;usg\u003dAFQjCNHc6lIe9u_YShLkh7NV5WR9rO6YHQ\u0026amp; url\u003dhttp://www.therepublic.com/view/story/b663f09bbf48403c9041a86623fe428e/CO-- Colorado-Flooding-National-Guard\"\u003eNational Guard members trapped during evacuations  from flooded Colorado town\u003c/a\u003e\u003cfont size\u003d\"-1\"  color\u003d\"#6f6f6f\"\u003eThe  Republic\u003c/font\u003e\u003c/font\u003e\u003cbr\u003e\u003cfont  size\u003d\"-1\"\u003e\u003ca href\u003d\"http://news.google.com/news/url? sa\u003dt\u0026amp;fd\u003dR\u0026amp;usg\u003dAFQjCNFij70BTG-5dO69JM0BVO32S0S- aA\u0026amp;url\u003dhttp://www.cnn.com/2013/09/15/us/colorado-flooding/? hpt%3Dhp_t1\"\u003eColorado floods: More than 500 still unaccounted for as  \u0026#39;devastating\u0026#39; rain looms\u003c/a\u003e\u003cfont size\u003d\"-1\"  color\u003d\"#6f6f6f\"\u003eCNN  International\u003c/font\u003e\u003c/font\u003e\u003cbr\u003e\u003cfont  size\u003d\"-1\"\u003e\u003ca href\u003d\"http://news.google.com/news/url? sa\u003dt\u0026amp;fd\u003dR\u0026amp;usg\u003dAFQjCNE-gAC_OO- 9Ts2O4rbr8EoZZMIO6Q\u0026amp;url\u003dhttp://www.washingtonpost.com/national/residents- return-to-find-colorados-gore-tex-vortex-transformed-by-flooding/2013/09/15/83ce1dc0-1e72- 11e3-9ad0-96244100e647_story.html\"\u003eFlooded Colo. mountain towns reopening as cleanup  effort begins despite more \u003cb\u003e...\u003c/b\u003e\u003c/a\u003e\u003cfont  size\u003d\"-1\" color\u003d\"#6f6f6f\"\u003eWashington  Post\u003c/font\u003e\u003c/font\u003e\u003cbr\u003e\u003cfont  size\u003d\"-1\"\u003e\u003ca href\u003d\"http://news.google.com/news/url? sa\u003dt\u0026amp;fd\u003dR\u0026amp;usg\u003dAFQjCNE_Ko-9omCmhO1-z6P- kCXPSNANuQ\u0026amp;url\u003dhttp://kunc.org/post/after-rain-delay-colorado-flood-rescues- resume\"\u003eKUNC\u003c/a\u003e -\u003ca href\u003d\"http://news.google.com/news/url? sa\u003dt\u0026amp;fd\u003dR\u0026amp;usg\u003dAFQjCNEyuScNidVouVzOkoA6_lqZLOWR9Q\u0026amp; url\u003dhttp://nhpr.org/post/rescue-efforts-resume-flooded-colorado-more-rain- due\"\u003eNew Hampshire Public  Radio\u003c/a\u003e\u003c/font\u003e\u003cbr\u003e\u003cfont size\u003d\"-1\"\u003e\u003ca  href\u003d\"http://news.google.com/news/more? ncl\u003ddQHisuNx5u46LtMZh5z80DBxCCRjM\u0026amp;ned\u003dus\u0026amp;topic\u003dh\"\u003e\u 003cb\u003eall 1,507 news articles  »\u003c/b\u003e\u003c/a\u003e\u003c/font\u003e\u003c/div\u003e\u003c/font\u003e\u003c/td\u0 03e\u003c/tr\u003e\u003c/table\u003e"  

我使用的 JSON 解析器显示如下:

注意:很抱歉,我是新手,没有足够的声誉来发布图片。该图像是一个屏幕截图,显示了文章中的缩略图(对我来说最重要)以及标题和文本以及其他链接——我真的不需要这些。

如何在 Android 中从“内容”到成品?我真正需要的是找到缩略图,因为我已经有了完整新闻文章的链接。但从教育的角度来看,我在哪里可以找到有用的 Android 课程。我能找到的文档不多。

4

0 回答 0