AndroidボタンDrawableLeleft-ハードコードの方法(XMLなし)
質問
「描画可能な左」アイコンをボタンオブジェクトに追加するにはどうすればよいですか?
私はこのようなことを意味します:
Button button = new Button();
button.setDrawableLeft(R.drawable...);
解決
使用する Button.setCompoundDrawablesWithIntrinsicBounds(..)
に関連しています Android:Drawablelefe 属性。
所属していません StackOverflow