动态设置textview的drawableleft...

代码如下:

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

你可能感兴趣的:(动态设置textview的drawableleft...)