Android使用TextView图文混排
来源:互联网 发布:软件开发技术手册 编辑:程序博客网 时间:2024/06/10 04:43
//找到TextView的控件tv_text = (TextView) findViewById(R.id.jieshou02);//图文混排的内容 String html = "<font>你是</font><img src=‘strawberry'><font>大美女</font>"; CharSequence text = Html.fromHtml(html, new Html.ImageGetter() { public Drawable getDrawable(String source) {//根据图片资源ID获取图片 Log.d("source", source); if (source.equals("‘strawberry'")) {//获取一张图片 Drawable draw = getResources().getDrawable(R.mipmap.account_icon_kaixin); draw.setBounds(0, 0, draw.getIntrinsicWidth(), draw.getIntrinsicHeight()); return draw; } return null; } }, null); tv_text.setText(text);
阅读全文
0 0
- Android使用TextView图文混排
- android TextView图文混排
- android TextView图文混排
- Android中使用TextView图文混排实现动态表情
- android中TextView图文混排
- android textview里面显示图文混排
- Android EditText和TextView图文混排
- Android TextView实现图文混排
- android TextView 实现图文混排
- Android TextView加载Html图文混排
- iOS使用textView图文混排 -- 二
- TextView 图文混排
- TextView图文混排
- TextView图文混排
- TextView:图文混排
- Android中TextView深入使用----单独TextView实现图文混排
- TextView中图文混排
- TextView图文混排Gif
- eclipse快捷键
- centos7.2下安装mysql5.7,使用rpm包安装
- TensorFlow 数据集和估算器介绍
- Redis在windows下安装过程
- CodeForces
- Android使用TextView图文混排
- 使用js将多个相关联的excel数据文件整合到一起并筛选出需要的数据的整理
- Java学习笔记(28)--覆写(Override)详解
- 观察者模式
- Docker安装Prometheus,Grafana展示数据
- leetcode 260. Single Number III 位操作
- Spring-装配Bean 基于注解
- android系统ROM分区
- 第4章 MySQL数据库结构优化