0
的android TextView中显示这是我的XML字符串的内容:图像是使用html.fromHtml
<style>
img {padding:0 10px 10px 0; width:99% !important;}
p,div,ul,ol,em,a,span,u,strong,strike,h1,h2,h3,h4,h5,h6
{font-family: verdana;font-size: 14px;color: #fff;}
html,body{background:#414042;}
a{ color:#3400f3;}p{width:100%;}
</style>
<p>
<img alt="Ajay Devgn" pimcore_disable_thumbnail="true" pimcore_id="6813"
pimcore_type="asset" src="http://dev2.mercuryminds.com/bolly/feb2013/
bolly---ajay-devgn-on-a-satyagraha/kangna-and-kareena.jpg" style="width: 500px;
height: 370px; float: left;" />
</p>
这里的图像是在Android TextView的显示。
但图像不显示....我的代码有什么错?我怎样才能显示在TextView的图像......请给我的解决方案...
String fullcontent = in.getStringExtra("Content");
content = fullcontent.substring(1);
content = (TextView) findViewById(R.id.title1);
content.setText(Html.fromHtml(full_content));
什么让你决定使用TextView,因为你要显示图像?看起来你真正需要的是一个WebView。 – RRTW 2013-04-23 06:58:50
这将帮助你http://stackoverflow.com/questions/2865452/is-it-possible-to-display-inline-images-from-html-in-an-android-textview – Pragnani 2013-04-23 07:01:59