setLayoutMarginLeft

fun View.setLayoutMarginLeft(margin: Int?)

Sets the ViewGroup.MarginLayoutParams.leftMargin of the View to the given margin. If margin is null, the left margin is set to 0.