TextView中设置DrawableLeft
来源:互联网 发布:网络维修基础知识 编辑:程序博客网 时间:2024/05/29 03:47
public void setCompoundDrawables (Drawable left, Drawable top, Drawable right, Drawable bottom);
类似调用方法如下:
1.在XML中使用android:drawableLeft="@drawable/icon"2.代码中动态变化Drawable drawable= getResources().getDrawable(R.drawable.drawable);/// 这一步必须要做,否则不会显示.drawable.setBounds(0, 0, drawable.getMinimumWidth(), drawable.getMinimumHeight());myTextview.setCompoundDrawables(drawable,null,null,null);
也或参考另一个函数
public void setCompoundDrawablesWithIntrinsicBounds (Drawable left,
Drawable top, Drawable right, Drawable bottom)
0 0
- TextView中设置DrawableLeft
- Android TextView 代码中设置DrawableLeft 图片
- Android TextView 代码中设置 drawableLeft
- TextView设置DrawableLeft
- TextView中drawableLeft使用方法
- 在java代码中设置TextView中DrawableLeft的方法
- 关于在TextView中设置DrawableLeft不显示的问题
- 关于在TextView中设置DrawableLeft的问题
- 如何在Android中为TextView动态设置drawableLeft等
- 代码中设置drawableleft
- 使用代码为textview设置drawableLeft
- 使用代码为textview设置drawableLeft
- 使用代码为textview设置drawableLeft
- 使用代码为textview设置drawableLeft
- 使用代码为textview设置drawableLeft
- 使用代码为textview设置drawableLeft
- 使用代码为textview设置drawableLeft
- 使用代码为textview设置drawableLeft
- 自己拿傅里叶变换公式实现2维傅里叶变换
- Android应用一般上架流程
- 【JQuery】表单验证插件——validate
- 学习笔记之linux文件相关函数
- Android MediaPlayer实现音乐播放
- TextView中设置DrawableLeft
- IE和FF浏览器的区别
- Hadoop集群搭建
- JSP如何输出当前时间
- Android Studio如何更改JDK和SDK的路径?
- 学习笔记之智能指针简单理解
- hdu3400 Line belt 【三分搜索】
- linux interrupt, deferrable function
- 第七周项目1:成员函数、友元函数和一般函数的区别