Android中TextView显示插入的图片实现方法

上传:dingjing75818 浏览: 20 推荐: 0 文件:PDF 大小:39.72KB 上传时间:2021-01-16 22:56:22 版权申诉
本文实例讲述了Android中TextView显示插入的图片实现方法。分享给大家供大家参考,具体如下: Android系统默认给TextView插入图片提供了三种方式: 1、ImageSpan 2、Html.ImageGetter 3、TextView.setCompoundDrawables(left, top, right, bottom) 1、TextView使用ImageSpan显示图片 ImageSpan span = new ImageSpan(this, R.drawable.ic_launcher); SpannableString spanStr = new Spannab
上传资源
用户评论