标签:android style blog http io color ar java sp
/** * 添加表情 输入框~ * * @param context * @param imgId * @param spannableString * @return */ public SpannableString addFace(Context context, int imgId, String spannableString) { if (TextUtils.isEmpty(spannableString)) { return null; } Bitmap bitmap = BitmapFactory.decodeResource(context.getResources(), imgId); bitmap = Bitmap.createScaledBitmap(bitmap, 35, 35, true); ImageSpan imageSpan = new ImageSpan(context, bitmap); SpannableString spannable = new SpannableString(spannableString); spannable.setSpan(imageSpan, 0, spannableString.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); return spannable; }
标签:android style blog http io color ar java sp
原文地址:http://blog.csdn.net/ijustyce/article/details/41015583