リソースIDによる配置
不要な箇所は0
を入れる
binding.button.setCompoundDrawablesWithIntrinsicBounds(R.drawable.image_left, R.drawable.image_top, R.drawable.image_right, R.drawable.image_bottom)
Drawableによる配置
不要な箇所はnull
を入れる
val imageLeft:Drawable = //省略
val imageTop:Drawable = //省略
val imageRight:Drawable = //省略
val imageBottom:Drawable = //省略
binding.button.setCompoundDrawablesWithIntrinsicBounds( imageLeft, imageTop, imageRight, imageBottom)