Textview动态添加右图片

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);


你可能感兴趣的:(IT)