TextView布局

//字体颜色

tv.setTextColor(0xff303030);

Drawable topDrawable = getResources().getDrawable( R.drawable.home_normal);

//设置drawable的大小

topDrawable .setBounds(0, 0, topDrawable .getMinimumWidth(),topDrawable .getMinimumHeight()); 


//tv.setCompoundDrawables(leftDrawable, topDrawable, rightDrawable, bottomDrawable);

tv.setCompoundDrawables(null, topDrawable , null, null);

你可能感兴趣的:(效果)