使用HTML查看HTML代码。fromHtml()不';t获取图像-Android

使用HTML查看HTML代码。fromHtml()不';t获取图像-Android,android,html,web-services,textview,Android,Html,Web Services,Textview,我正在开发一个新闻应用程序。 Webservice返回一个HTML代码字符串。这是一篇文章的内容: String result; // result is returned from Webservice result = "<p>Simply put, the 2013 Billboard Music Awards included a sizable helping of Bieber, with two performances in three hours and a Top

我正在开发一个新闻应用程序。 Webservice返回一个HTML代码字符串。这是一篇文章的内容:

String result;
// result is returned from Webservice
result = "<p>Simply put, the 2013 Billboard Music Awards included a sizable helping of Bieber, with two performances in three hours and a Top Male Artist win before the Milestone Award was presented. Three months after another Justin -- Mr. Timberlake -- kept popping up at the 2013 Grammys and threatened overexposure, perhaps the audience at the Billboard Music Awards simply tired of seeing Bieber show up on stage and snag more of the spotlight.<br/><img align=\"Middle\" alt=\"\" border=\"0\" class=\"oImage\" height=\"335\" src=\"http://img2.news.zing.vn/2013/05/22/u2.jpg\" width=\"500\" \\/><br/>Plus, in the middle of the perceived mayhem was a monster-selling tour, with tons of Beliebers blissfully taking in the spectacle. But a dark cloud seemed embedded within the scraps of news coming from Bieber's tour over the past few months, and the Billboard Music Award boos could have been festering ill will toward one, some or all of them.<br/><img align=\"Middle\" alt=\"\" border=\"0\" class=\"oImage\" height=\"289\" src=\"http://img2.news.zing.vn/2013/05/22/u1.jpg\" width=\"500\"/></p>";
如何显示本文内容以适应屏幕并显示所有图像。 这是


谢谢你的帮助。

你需要一个网络视图,而不是文本视图。下面是它的实现方式

    Description = (WebView)findViewById(R.id.webView1);
        Description.getSettings().setLayoutAlgorithm(LayoutAlgorithm.SINGLE_COLUMN);
        WebSettings webSettings = Description.getSettings();
        webSettings.setTextSize(WebSettings.TextSize.NORMAL);
Description.loadDataWithBaseURL (null, "<html><p>Simply put, the 2013 Billboard Music Awards included a sizable helping of Bieber, with two performances in three hours and a Top Male Artist win before the Milestone Award was presented. Three months after another Justin -- Mr. Timberlake -- kept popping up at the 2013 Grammys and threatened overexposure, perhaps the audience at the Billboard Music Awards simply tired of seeing Bieber show up on stage and snag more of the spotlight.<br/><img align=\"Middle\" alt=\"\" border=\"0\" class=\"oImage\" height=\"335\" src=\"http://img2.news.zing.vn/2013/05/22/u2.jpg\" width=\"500\" \\/><br/>Plus, in the middle of the perceived mayhem was a monster-selling tour, with tons of Beliebers blissfully taking in the spectacle. But a dark cloud seemed embedded within the scraps of news coming from Bieber's tour over the past few months, and the Billboard Music Award boos could have been festering ill will toward one, some or all of them.<br/><img align=\"Middle\" alt=\"\" border=\"0\" class=\"oImage\" height=\"289\" src=\"http://img2.news.zing.vn/2013/05/22/u1.jpg\" width=\"500\"/></p></html>", "text/html", "UTF-8",null);
Description=(WebView)findViewById(R.id.webView1);
Description.getSettings().setLayoutAlgorithm(LayoutAlgorithm.SINGLE_列);
WebSettings WebSettings=Description.getSettings();
webSettings.setTextSize(webSettings.TextSize.NORMAL);
Description.loadDataWithBaseURL(空,"简言之,2013年的Billboard音乐奖包括比伯的巨大帮助,在里程碑奖颁发之前,比伯在三小时内完成了两次演出,并赢得了一位顶级男艺人。三个月后,另一位贾斯汀——Timberlake先生——不断出现在2013年格莱美颁奖典礼上,并威胁要过度曝光,也许是Billboard M的观众UICIC奖只是厌倦了看到比伯出现在舞台上,并抢走了更多的聚光灯。
BR/>另外,在感觉到的混乱中,有一个怪物在兜售旅游,有很多的信徒们欣喜若狂地观看这一场面。但是在过去几个月比伯的巡演中,一个乌云笼罩在新闻的碎片之中。公告牌音乐奖的嘘声可能是对其中一人、部分人或全部人的恶意侵蚀。

,“text/html”,“UTF-8”,null);
还有你的布局

    <?xml version="1.0" encoding="utf-8"?>
    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="match_parent"
        android:layout_height="match_parent" >
            <WebView
                android:id="@+id/webView1"
                android:layout_width="match_parent"
                android:layout_height="match_parent" />

   </RelativeLayout>

查看此线程
    <?xml version="1.0" encoding="utf-8"?>
    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="match_parent"
        android:layout_height="match_parent" >
            <WebView
                android:id="@+id/webView1"
                android:layout_width="match_parent"
                android:layout_height="match_parent" />

   </RelativeLayout>