I want to set a margin / padding between my radiobutton drawable and the left side of it, e.g: Setting a margin of 8dp between my radiobutton drawable and the left side of the screen. I know how to set a margin between the radiobutton itself, but not how to do it with the radiobutton drawable. I also know how to set a margin right side of the radiobutton drawable with paddngStart="YOUR_PADDING".
Is this possible?
Here a picture of what I mean:
Currently
What I want
EDIT
The aboven written answer does work. For those wo want to set the value inside the layout and not programmatically, I have written a binding adapter:
@BindingAdapter("setDrawableLeftPadding")
fun setDrawableLeftPadding(view: CustomRadioButton, padding: Float) {
view.setStartPaddingDp(padding)
}
You can then use it inside your CustomRadioButton layout with app:setDrawableLeftPadding="@{8f}"