SpannableString ss = new SpannableString(getText().toString()+"[smile]"); Drawable d = getResources().getDrawable(id); d.setBounds(0, 0, d.getIntrinsicWidth(), d.getIntrinsicHeight()); ImageSpan span = new ImageSpan(d, ImageSpan.ALIGN_BASELINE); ss.setSpan(span, getText().length(),getText().length()+"[smile]".length(), Spannable.SPAN_INCLUSIVE_EXCLUSIVE); setText(ss);附件上传: 转载:http://www.adobex.com/android/source/details/00000362.htm