现在的位置: 首页 > 综合 > 正文

在代码中设置Textview的drawableRight

2018年01月31日 ⁄ 综合 ⁄ 共 238字 ⁄ 字号 评论关闭

代码如下:

<span style="font-size:14px;">private Drawable fire;
fire = context.getResources().getDrawable(R.drawable.fire);
fire.setBounds(0, 0, fire.getMinimumWidth() * 4 / 5,fire.getMinimumHeight() * 4 / 5);
t1.setCompoundDrawables(null, null, fire, null);</span>

抱歉!评论已关闭.