Textview动态添加右图片
2016-07-04 16:13
239 查看
Drawable drawable; TextView textview; drawable = getResources().getDrawable(R.mipmap.work_shouqi_jiantou); drawable.setBounds(0, 0, drawable.getMinimumWidth(), drawable.getMinimumHeight()); textview.setCompoundDrawables(null, null, drawable, null);
注:drawable.setBounds(0, 0, drawable.getMinimumWidth(), drawable.getMinimumHeight());
这句不写,不起作用
setCompoundDrawables(left ,top ,right, bottom);
相关文章推荐
- Bootstrap实现水平排列的表单
- 软件详细设计的几个参考模板
- mydumper工作原理 :myownstars专家
- 非关系型数据库redis(三):Redis数据类型
- WKWebView
- [bzoj1064][NOI2008]假面舞会
- android线程池详解(一)
- Oracle----oracle 事务总结
- 【WPF】WPF通过RelativeSource绑定父控件的属性
- “$Bitmap 有标记已使用的未用簇”
- 点击搜索按钮地址传参
- C++ 继承、函数重载
- 数组中的逆序对
- 测试一下这个东西监控东方大厦
- Volley加载网络图片
- 《python算法笔记》(二)基础知识
- Android中Service和Thread的区别
- 新建iOS工程如何给所有类名添加前缀
- js的一些数据处理
- composer 报 zlib_decode(): data error