© 1999-2048 dssz.net 粤ICP备11031372号
This text is normal
" + "" + "" + "" + ""; textView.setText(html); button1.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { Spanned sp = Html.fromHtml(html); textView.setText(sp); } }); button2.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { Spanned sp = Html.fromHtml(html, new Html.ImageGetter() { @Override public Drawable getDrawable(String source) { InputStream is = null; try { is = (InputStream) new URL(source).getContent(); Drawable d = Drawable.createFromStream(is, "src"); d.setBounds(0, 0, d.getIntrinsicWidth(), d.getIntrinsicHeight()); is.close(); return d; } catch (Exception e) { return null; } } }, null); textView.setText(sp); } }); } ...展开收缩