SpannableStringBuilder stringBuilder = new SpannableStringBuilder();
SpannableString string = new SpannableString("GFDTH");
//给textView设置颜色
stringBuilder.append(Html.fromHtml("<font color='#ff0000'>" + "恭喜"
+ "</font>" + "<font color='#00ff00'>" + "GFDTH" + "</font>"
+ "<font color='#0000ff'>" + "获得了" + "</font>"));
//在textView里手动添加图片
Bitmap bitmap = BitmapFactory.decodeResource(getResources(), R.drawable.ic_launcher);
ImageSpan imageSpan = new ImageSpan(this, bitmap);
string.setSpan(imageSpan, 0, 5, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
代码的链接:http://download.csdn.net/detail/how_old/9530407