开发者

Android Button drawableLeft - how to hardcode it (no xml)

How can I add a "drawable left" icon to a button object?

I mean something like this:

Button button = 开发者_运维问答new Button();
button.setDrawableLeft(R.drawable...);


Use Button.setCompoundDrawablesWithIntrinsicBounds(..) which relates to android:drawableLeft attribute.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜