如何向按钮对象添加“可向左绘制”图标?
我的意思是这样的:
Button button = new Button();
button.setDrawableLeft(R.drawable...);
最佳答案
使用与android:drawableLeft相关的Button.setCompoundDrawablesWithIntrinsicBounds(..)
属性。
关于Android Button drawableLeft - 如何对其进行硬编码(无 xml),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4092361/