xml里设置
android:drawableRight="@mipmap/company_expand_down"
android:drawablePadding="@dimen/dp_4"
代码设置
Drawable drawable =mContext.getResources().getDrawable(R.mipmap.company_expand_down);
下面这一步必须有,不然图标可显示不出来哟!!!
drawable.setBounds(0, 0, drawable.getIntrinsicWidth(), drawable.getIntrinsicHeight());
tvExpand.setCompoundDrawables(null, null, drawable, null);
网友评论