标签:android style blog color os ar sp div on
ImageGetter imageGetter = new Html.ImageGetter() { @Override public Drawable getDrawable(String source) { Drawable drawable = null; drawable = historyBtn.getResources().getDrawable(Integer.parseInt(source)); drawable.setBounds(0, 0, drawable.getIntrinsicWidth(),drawable.getIntrinsicHeight()); return drawable; } }; StringBuffer sb = new StringBuffer(); sb.append("<img src=\"").append(R.drawable.xhsf_button_download).append("\"/>").append("<font color=\"6f6f6f\"> 历史</font>");; Spanned span = Html.fromHtml(sb.toString(), imageGetter, null); historyBtn.setText(span); sb = null;
标签:android style blog color os ar sp div on
原文地址:http://www.cnblogs.com/zhaoxiaomeng/p/4034560.html