动态设置textview的drawableleft...

代码如下:

Drawable leftDrawable = getResources().getDrawable(R.mipmap.ic_launcher);
//要加这行!
drawable.setBounds(0, 0, drawable.getMinimumWidth(), drawable.getMinimumHeight());
textView2.setCompoundDrawables(leftDrawable ,null,null,null);

推荐阅读更多精彩内容